/**
  * Test method for {@link SchemagenOptions#getAllValues(jena.schemagen.SchemagenOptions.OPT)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testGetAllValuesOPT0() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   List<String> l = so0.getAllValues(OPT.INCLUDE);
   assertNotNull(l);
   assertTrue(l.isEmpty());
 }
 @Test
 public void testGetResourceValueOPT1() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   Resource r = ResourceFactory.createResource("http://example.org/foo");
   so0.setOption(OPT.ROOT, r);
   assertEquals(r, so0.getResource(OPT.ROOT));
 }
 /**
  * Test method for {@link SchemagenOptions#setParent(SchemagenOptions)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testSetParent() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   SchemagenOptions so1 = new SchemagenOptions();
   so0.setParent(so1);
   assertSame(so1, so0.getParent());
 }
 @Test
 public void testGetOption1() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   SchemagenOptions so1 = new SchemagenOptions();
   so0.setParent(so1);
   assertNull(so0.getOption(OPT.CLASS_SECTION));
 }
 /**
  * Test method for {@link SchemagenOptions#hasParent()}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testHasParent() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   SchemagenOptions so1 = new SchemagenOptions();
   so0.setParent(so1);
   assertTrue(so0.hasParent());
   assertFalse(so1.hasParent());
 }
 @Test
 public void testGetValueOPT2() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   SchemagenOptions so1 = new SchemagenOptions();
   so0.setParent(so1);
   so1.setOption(OPT.CLASS_SECTION, "foo");
   assertEquals("foo", so0.getValue(OPT.CLASS_SECTION).asLiteral().getString());
 }
 @Test
 public void testHasValueOPT2() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   SchemagenOptions so1 = new SchemagenOptions();
   so0.setParent(so1);
   so1.setOption(OPT.CLASS_SECTION, "foo");
   assertTrue(so0.hasValue(OPT.CLASS_SECTION));
 }
 @Test
 public void testGetAllValuesOPT1() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   so0.setOption(OPT.INCLUDE, "foo");
   List<String> l = so0.getAllValues(OPT.INCLUDE);
   assertNotNull(l);
   assertEquals(1, l.size());
   assertTrue(l.contains("foo"));
 }
 @Test
 public void testHasResourceValueOPT2() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   SchemagenOptions so1 = new SchemagenOptions();
   so0.setParent(so1);
   Resource r = ResourceFactory.createResource("http://example.org/foo");
   so1.setOption(OPT.ROOT, r);
   assertTrue(so0.hasResourceValue(OPT.ROOT));
 }
Example #10
0
 @Test
 public void testGetResourceValueOPT3() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   SchemagenOptions so1 = new SchemagenOptions();
   so0.setParent(so1);
   Resource r0 = ResourceFactory.createResource("http://example.org/foo");
   Resource r1 = ResourceFactory.createResource("http://example.org/bar");
   so0.setOption(OPT.ROOT, r0);
   so1.setOption(OPT.ROOT, r1);
   assertEquals(r0, so0.getResource(OPT.ROOT));
 }
Example #11
0
 /**
  * Test method for {@link SchemagenOptions#hasResourceValue(jena.schemagen.SchemagenOptions.OPT)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testHasResourceValueOPT0() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   assertFalse(so0.hasResourceValue(OPT.ROOT));
 }
Example #12
0
 /**
  * Test method for {@link SchemagenOptions#asOption(java.lang.String)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testAsOption() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   assertSame(OPT.DOS, so0.asOption("DOS"));
 }
Example #13
0
 /**
  * Test method for {@link SchemagenOptions#getParent()}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testGetParent() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so = new SchemagenOptions();
   assertNull(so.getParent());
 }
Example #14
0
 /**
  * Test method for {@link SchemagenOptions#isTrue(jena.schemagen.SchemagenOptions.OPT)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testIsTrueOPT0() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   assertFalse(so0.isTrue(OPT.DOS));
 }
Example #15
0
 @Test
 public void testIsTrueOPT1() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   so0.setOption(OPT.DOS, true);
   assertTrue(so0.isTrue(OPT.DOS));
 }
Example #16
0
 /**
  * Test method for {@link SchemagenOptions#getResource(jena.schemagen.SchemagenOptions.OPT)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testGetResourceOPT0() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   assertNull(so0.getResource(OPT.ROOT));
 }
Example #17
0
 /**
  * Test method for {@link SchemagenOptions#setOption(java.lang.String, java.lang.String)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testSetOptionStringString() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   so0.setOption("CLASS_SECTION", "test123");
   assertEquals("test123", so0.getOption(OPT.CLASS_SECTION).asLiteral().getString());
 }
Example #18
0
 /**
  * Test method for {@link SchemagenOptions#getValue(jena.schemagen.SchemagenOptions.OPT)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testGetValueOPT0() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   assertNull(so0.getValue(OPT.CLASS_SECTION));
 }
Example #19
0
 /**
  * Test method for {@link SchemagenOptions#hasValue(jena.schemagen.SchemagenOptions.OPT)}.
  *
  * @throws SchemagenOptionsConfigurationException
  */
 @Test
 public void testHasValueOPT0() throws SchemagenOptionsConfigurationException {
   SchemagenOptions so0 = new SchemagenOptions();
   assertFalse(so0.hasValue(OPT.CLASS_SECTION));
 }