当前位置: 首页>>代码示例>>Java>>正文


Java ContentModel.getElements方法代码示例

本文整理汇总了Java中javax.swing.text.html.parser.ContentModel.getElements方法的典型用法代码示例。如果您正苦于以下问题:Java ContentModel.getElements方法的具体用法?Java ContentModel.getElements怎么用?Java ContentModel.getElements使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.text.html.parser.ContentModel的用法示例。


在下文中一共展示了ContentModel.getElements方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testGetElements004

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")).getElements(null)
 * Expected: NullPointerException
 */
public void testGetElements004() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(0);
        bs1.set(1);
        BitSet bs2 = new BitSet(168);
        bs2.set(45);
        AttributeList al = new AttributeList("1");
        Element el = dtd.defineElement("elemento", ',', false, false, cm2,
                bs1, bs2, al);
        cm = new ContentModel(el);

        cm.getElements(null);

        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:28,代码来源:ContentModelCompatilityTest.java

示例2: testGetElements005

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)).getElements(null) Expected:
 * NullPointerException
 */
public void testGetElements005() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(128);
        bs1.set(1);
        BitSet bs2 = new BitSet(7);
        AttributeList al = new AttributeList("bigC", -2147483648, -1,
                "value", new Vector(), new AttributeList(null));
        Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
                al);
        cm = new ContentModel(el);
        cm.getElements(null);
        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:27,代码来源:ContentModelCompatilityTest.java

示例3: testGetElements010

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")).getElements(new
 * Vector()) Expected: "elemento"
 */
public void testGetElements010() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(0);
    bs1.set(1);
    BitSet bs2 = new BitSet(168);
    bs2.set(45);
    AttributeList al = new AttributeList("1");
    Element el = dtd.defineElement("elemento", ',', false, false, cm2,
            bs1, bs2, al);
    cm = new ContentModel(el);
    Vector v = new Vector();
    cm.getElements(v);
    assertEquals("[elemento]", v.toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:23,代码来源:ContentModelCompatilityTest.java

示例4: testGetElements011

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)).getElements(new Vector()) Expected: ""
 */
public void testGetElements011() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(128);
    bs1.set(1);
    BitSet bs2 = new BitSet(7);
    AttributeList al = new AttributeList("bigC", -2147483648, -1,
            "value", new Vector(), new AttributeList(null));
    Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
            al);
    cm = new ContentModel(el);
    Vector v = new Vector();
    cm.getElements(v);
    assertEquals("[]", v.toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:23,代码来源:ContentModelCompatilityTest.java

示例5: testGetElements001

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel().getElements(null) Expected: NullPointerException
 */

public void testGetElements001() {
    try {
        cm = new ContentModel();
        cm.getElements(null);
        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:16,代码来源:ContentModelCompatilityTest.java

示例6: testGetElements002

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel(null).getElements(null) Expected: NullPointerException
 */
public void testGetElements002() {
    try {
        cm = new ContentModel(null);
        cm.getElements(null);
        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:15,代码来源:ContentModelCompatilityTest.java

示例7: testGetElements006

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("1",0,true,true,null,null,null,null).getElements(null)
 * Expected: NullPointerException
 */
public void testGetElements006() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        Element el = dtd.defineElement("1", 0, true, true, null, null,
                null, null);
        cm = new ContentModel(el);
        cm.getElements(null);
        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:ContentModelCompatilityTest.java

示例8: testGetElements026

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel(43,null) parameter: new Vector() expected:
 * NullPointerException
 */
public void testGetElements026() {
    try {
        cm = new ContentModel(43, null);
        Vector v = new Vector();
        cm.getElements(v);

        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:18,代码来源:ContentModelCompatilityTest.java

示例9: testGetElements025

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel(42,null) parameter: new Vector() expected:
 * NullPointerException
 */
public void testGetElements025() {
    try {

        cm = new ContentModel(42, null);
        Vector v = new Vector();
        cm.getElements(v);

        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:ContentModelCompatilityTest.java

示例10: testGetElements012

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("1",0,true,true,null,null,null,null).getElements(new
 * Vector()) Expected: "1"
 */
public void testGetElements012() {
    dtd = new DTDGetter("TestContentModelSemantic");
    Element el = dtd.defineElement("1", 0, true, true, null, null,
            null, null);
    cm = new ContentModel(el);
    Vector v = new Vector();
    cm.getElements(v);
    assertEquals("[1]", v.toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:16,代码来源:ContentModelCompatilityTest.java

示例11: testGetElements013

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel().getElements(new Vector("el")) Expected: "[el, null]"
 */

public void testGetElements013() {
    Vector v = new Vector();
    v.add("el");
    cm = new ContentModel();

    cm.getElements(v);
    assertEquals(2, v.size());
    assertEquals("[el, null]", v.toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:16,代码来源:ContentModelCompatilityTest.java

示例12: testGetElements038

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel(0,ContentModel(0,ContentModel())) parameter: new Vector()
 * expected: ClassCastException
 */
public void testGetElements038() {
    try {
        ContentModel cm2 = new ContentModel();
        ContentModel cm3 = new ContentModel(0, cm2);
        cm = new ContentModel(0, cm3);
        Vector v = new Vector();
        cm.getElements(v);
        fail("Should raise ClassCastException");
    } catch (ClassCastException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:19,代码来源:ContentModelCompatilityTest.java

示例13: testGetElements015

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel(0, ContentModel()) parameter: new Vector() expected:
 * ClassCastException
 */
public void testGetElements015() {
    try {
        ContentModel cm2 = new ContentModel();
        cm = new ContentModel(0, cm2);
        Vector v = new Vector();
        cm.getElements(v);
        fail("Should raise ClassCastException");
    } catch (ClassCastException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:18,代码来源:ContentModelCompatilityTest.java

示例14: testGetElements027

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel(44,null) parameter: new Vector() expected: ""
 */
public void testGetElements027() {
    cm = new ContentModel(44, null);
    Vector v = new Vector();
    cm.getElements(v);
    assertEquals("[]", v.toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:12,代码来源:ContentModelCompatilityTest.java

示例15: testGetElements017

import javax.swing.text.html.parser.ContentModel; //导入方法依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel(Integer.MAX_VALUE, ContentModel()) parameter: new Vector()
 * expected: ClassCastException
 */
public void testGetElements017() {
    try {
        ContentModel cm2 = new ContentModel();
        cm = new ContentModel(Integer.MAX_VALUE, cm2);
        Vector v = new Vector();
        cm.getElements(v);
        fail("Should raise ClassCastException");
    } catch (ClassCastException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:18,代码来源:ContentModelCompatilityTest.java


注:本文中的javax.swing.text.html.parser.ContentModel.getElements方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。