public void WithTieBreaker_ReturnsABuilder_WithTheGivenTieBreakerAndPreviousSize()
        {
            // Arrange
            var size       = sizedBigEitherInletPipeBuilder.Size;
            var tieBreaker = new UniformRandomisingTieBreaker();

            // Act
            var builder = sizedBigEitherInletPipeBuilder.WithTieBreaker(tieBreaker);

            // Assert
            builder.Size.Should().Be(size);
            builder.TieBreaker.Should().Be(tieBreaker);
        }
        public void New_GivenSizeAndATieBreaker_SetsTheBuildersCorrespondingProperties()
        {
            // Arrange
            var       tieBreaker = new UniformRandomisingTieBreaker();
            const int size       = 5;

            // Act
            var builder = new TieBreakingSizedBigEitherOutletPipeBuilder <int, IUniformRandomisingTieBreaker>(size, tieBreaker);

            // Assert
            builder.Size.Should().Be(size);
            builder.TieBreaker.Should().Be(tieBreaker);
        }
Example #3
0
        public void WithTieBreaker_ReturnsABuilder_WithTheGivenTieBreakerAndPreviousNumberOfInletsAndOutlets()
        {
            // Arrange
            var numberOfInlets  = sizedBigEitherOutletPipeBuilder.NumberOfInlets;
            var numberOfOutlets = sizedBigEitherOutletPipeBuilder.NumberOfOutlets;
            var tieBreaker      = new UniformRandomisingTieBreaker();

            // Act
            var builder = sizedBigEitherOutletPipeBuilder.WithTieBreaker(tieBreaker);

            // Assert
            builder.NumberOfInlets.Should().Be(numberOfInlets);
            builder.NumberOfOutlets.Should().Be(numberOfOutlets);
            builder.TieBreaker.Should().Be(tieBreaker);
        }
        public void New_GivenSizeAndATieBreaker_SetsTheBuildersCorrespondingProperties()
        {
            // Arrange
            var       tieBreaker      = new UniformRandomisingTieBreaker();
            const int numberOfInlets  = 5;
            const int numberOfOutlets = 6;

            // Act
            var builder = new TieBreakingSizedBigValvedPipeBuilder <int, string, IUniformRandomisingTieBreaker>(numberOfInlets, numberOfOutlets, tieBreaker);

            // Assert
            builder.NumberOfInlets.Should().Be(numberOfInlets);
            builder.NumberOfOutlets.Should().Be(numberOfOutlets);
            builder.TieBreaker.Should().Be(tieBreaker);
        }