Exemplo n.º 1
0
        public void Select_0selected_SetSelected(int expected)
        {
            // Arrange
            var fixture =
                new SelectorFixture()
                .WithOutputPins(3);


            var dut = fixture.CreateDut();

            // Act
            dut.Select(expected);

            // Assert
            Assert.Equal(expected, dut.Selected);
        }
Exemplo n.º 2
0
        public void Select_0selected_SetPinOutput(int selected, bool expectedPin1, bool expectedPin2, bool expectedPin3)
        {
            // Arrange
            var fixture =
                new SelectorFixture()
                .WithOutputPins(3);

            var expected =
                new ListFakePinBuilder()
                .WithPin(expectedPin1)
                .WithPin(expectedPin2)
                .WithPin(expectedPin3)
                .Build();

            // Act
            fixture.CreateDut().Select(selected);

            // Assert
            fixture.OutputPins.Should()
            .BeEquivalentTo(expected, options => options.WithStrictOrdering());
        }