コード例 #1
0
        public void FillShouldReturnLeafEventForAnyIdWhenLeafEvent()
        {
            // Arrange
            Stamp s = new Stamp(new Id.Node(new Id.Node(1, 0), 0), new Event.Leaf(3));

            // Act
            Event e = s.Fill();

            // Assert
            e.Should().Be(new Event.Leaf(3));
        }
コード例 #2
0
        public void FillShouldReturnUnchangedEventWhenAnonymousId()
        {
            // Arrange
            Stamp s = new Stamp(0, new Event.Node(1, 2, 3));

            // Act
            Event e = s.Fill();

            // Assert
            e.Should().Be(new Event.Node(1, 2, 3));
        }
コード例 #3
0
        public void FillShouldReturnMaxEventWhenId1WithNode()
        {
            // Arrange
            Stamp s = new Stamp(1, new Event.Node(3, 1, 0));

            // Act
            Event e = s.Fill();

            // Assert
            e.Should().Be(new Event.Leaf(4));
        }
コード例 #4
0
        public void FillShouldReturnDefinedStructureWhenIdNodeRight1()
        {
            // Arrange
            Stamp s = new Stamp(new Id.Node(0, 1), new Event.Node(1, 1, new Event.Node(0, 1, 0)));

            // Act
            Event e = s.Fill();

            // Assert
            e.Should().Be(new Event.Leaf(2));
        }