示例#1
0
        public void GrowShouldInflateLeftEventWhenRightId0()
        {
            // Arrange
            Stamp s = new Stamp(new Id.Node(1, 0), new Event.Node(1, 1, 0));

            // Act
            var   result = s.Grow();
            Event e      = result.Item1;
            int   cost   = result.Item2;

            // Assert
            e.Should().Be(new Event.Node(1, 2, 0));
            cost.Should().Be(1);
        }
示例#2
0
        public void GrowShouldInflateRightEventLeafWhenEventLeafAndLeftId0()
        {
            // Arrange
            Stamp s = new Stamp(new Id.Node(0, 1), 1);

            // Act
            var   result = s.Grow();
            Event e      = result.Item1;
            int   cost   = result.Item2;

            // Assert
            e.Should().Be(new Event.Node(1, 0, 1));
            cost.Should().Be(1001);
        }
示例#3
0
        public void GrowShouldInflateRightEventWhenLeftId0()
        {
            // Arrange
            Stamp s = new Stamp(new Id.Node(0, 1), new Event.Node(1, 1, 0));

            // Act
            var   result = s.Grow();
            Event e      = result.Item1;
            int   cost   = result.Item2;

            // Assert
            e.Should().Be(new Event.Node(1, 1, 1)); // TODO: shouldn't grow normalize to (2,0,0)?
            cost.Should().Be(1);
        }
示例#4
0
        public void GrowShouldInflateEventLeafWhenId1AndLeafEvent()
        {
            // Arrange
            Stamp s = new Stamp(1, 2);

            // Act
            var   result = s.Grow();
            Event e      = result.Item1;
            int   cost   = result.Item2;

            // Assert
            e.Should().Be(new Event.Leaf(3));
            cost.Should().Be(0);
        }