Esempio n. 1
0
 //	testCountEmpty
 //		| root |
 //		root := RootNode edition: nil branch: 1.
 //		self should: [root count = 0]!
 //
 public void testNew() {
   BeEdition edition = new BeEdition();
   RootNode root = new RootNode(edition, new SequenceNumber(10));
   assertEquals(new SequenceNumber(10), root.getBranch());
   assertEquals(0, root.getDsp());
   assertNull(root.getChild());
   assertEquals(edition, root.getEdition());
 }
Esempio n. 2
0
 public void testCreateWithDsp() {
   CollectionLeaf leaf =
       new CollectionLeaf(new SequenceNumber(1), 1, AboraConverter.toAboraContent("hello"));
   BeEdition edition = new BeEdition();
   RootNode root = new RootNode(edition, new SequenceNumber(10), leaf, 9);
   assertEquals(new SequenceNumber(10), root.getBranch());
   assertEquals(9, root.getDsp());
   assertEquals(leaf, root.getChild());
   assertEquals(edition, root.getEdition());
   assertEquals(1, leaf.getParents().size());
   assertTrue(leaf.getParents().contains(root));
 }