Esempio n. 1
0
        public void GivenPriorityRight_CreatesATieBreakerWithRightPriority()
        {
            // Act
            var tieBreaker = new PrioritisingTwoWayTieBreaker(Priority.Right);

            // Assert
            tieBreaker.Priority.Should().Be(Priority.Right);
        }
Esempio n. 2
0
        public void ResolveTie_AlwaysResolvesToThePrioritisedSide()
        {
            // Arrange
            var tieBreaker = new PrioritisingTwoWayTieBreaker(Priority.Right);

            // Act
            var firstResult  = tieBreaker.ResolveTie();
            var secondResult = tieBreaker.ResolveTie();
            var thirdResult  = tieBreaker.ResolveTie();

            // Assert
            firstResult.Should().Be(TieResult.Right);
            secondResult.Should().Be(TieResult.Right);
            thirdResult.Should().Be(TieResult.Right);
        }