Merge "Added generation of case's child nodes description to documentation generator."
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / impl / UsesAugmentTest.java
index 3395dedfe67a850316e224973f463d336c1a875e..1d760b870cce686cb0f87e272a796cd74ff10834 100644 (file)
@@ -11,7 +11,9 @@ import static org.junit.Assert.*;
 
 import java.io.FileNotFoundException;
 import java.net.URI;
+import java.text.DateFormat;
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.LinkedList;
 import java.util.List;
@@ -50,8 +52,9 @@ public class UsesAugmentTest {
 
     @Before
     public void init() throws FileNotFoundException, ParseException {
-        UG_REV = TestUtils.simpleDateFormat.parse("2013-07-30");
-        GD_REV = TestUtils.simpleDateFormat.parse("2013-09-04");
+        DateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        UG_REV = simpleDateFormat.parse("2013-07-30");
+        GD_REV = simpleDateFormat.parse("2013-09-04");
     }
 
     /**
@@ -235,7 +238,7 @@ public class UsesAugmentTest {
         path.offer(expectedQName);
         expectedPath = new SchemaPath(path, true);
         assertEquals(expectedPath, order.getPath());
-        assertFalse(order.isAddedByUses());
+        assertTrue(order.isAddedByUses());
         assertTrue(order.isAugmenting());
         assertEquals(2, order.getChildNodes().size());
         // * |-- |-- |-- |-- |-- leaf delete
@@ -326,7 +329,7 @@ public class UsesAugmentTest {
         assertTrue(version.getType() instanceof ExtendedType);
         assertEquals(Uint8.getInstance(), version.getType().getBaseType());
         assertTrue(version.isAddedByUses());
-        assertFalse(version.isAugmenting());
+        assertTrue(version.isAugmenting());
         // * |-- |-- |-- |-- |-- leaf type
         type = (LeafSchemaNode) pathKeys.getDataChildByName("type");
         assertNotNull(type);
@@ -338,7 +341,7 @@ public class UsesAugmentTest {
         assertEquals(expectedPath, type.getPath());
         assertTrue(type.getType() instanceof ExtendedType);
         assertTrue(type.isAddedByUses());
-        assertFalse(type.isAugmenting());
+        assertTrue(type.isAugmenting());
         // * |-- |-- container segment-computation
         ContainerSchemaNode sc = (ContainerSchemaNode) requests.getDataChildByName("segment-computation");
         assertNotNull(sc);