Пример #1
0
 public void TestStampAll()
 {
     TimeStamp stamp = new TimeStamp();
     var fork1 = stamp.Fork();
     //System.out.println("fork1[0] = " + fork1[0]);
     //System.out.println("fork1[1] = " + fork1[1]);
     TimeStamp event1 = fork1.First.FireEvent();
     //System.out.println("event1 = " + event1);
     TimeStamp event2 = fork1.Second.FireEvent().FireEvent();
     //System.out.println("event2 = " + event2);
     var fork2 = event1.Fork();
     //System.out.println("fork2[0] = " + fork2[0]);
     //System.out.println("fork2[1] = " + fork2[1]);
     TimeStamp event11 = fork2.First.FireEvent();
     //System.out.println("event11 = " + event11);
     TimeStamp join1 = TimeStamp.Join(fork2.Second, event2);
     //System.out.println("join1 = " + join1);
     var fork22 = join1.Fork();
     //System.out.println("fork22[0] = " + fork22[0]);
     //System.out.println("fork22[1] = " + fork22[1]);
     TimeStamp join2 = TimeStamp.Join(fork22.First, event11);
     //System.out.println("join2 = " + join2);
     TimeStamp event3 = join2.FireEvent();
     //System.out.println("event3 = " + event3);
     Assert.Equal(new TimeStamp(Identity.Create(Identity.ONE, Identity.ZERO), new Event(2)), event3);
 }