private void VerifyMocks(FakeStep<string, string> step, string readString, string processedString) { step.MockReader.Verify(reader => reader.Read(0, 1), Times.Once); step.MockProcessor.Verify(p => p.Process(readString)); step.MockWriter.Verify(writer => writer.Write( It.Is<IEnumerable<string>>(items => items.Count() == 1 && items.Contains(processedString)))); }
public void Next_ShouldMoveToNextStep() { var firstStep = new FakeStep(); var secondStep = new FakeStep(); this.authenticationStepFactory.SetupSequence(f => f.CreateSteps()).Returns( new List<IAuthenticationStep> { firstStep, secondStep }); this.Activate(); this.testee.Next(); this.testee.ActiveItem.Should().Be(secondStep); }
public void Next_ShouldMoveToNextStep() { var firstStep = new FakeStep(); var secondStep = new FakeStep(); this.authenticationStepFactory.SetupSequence(f => f.CreateSteps()).Returns( new List <IAuthenticationStep> { firstStep, secondStep }); this.Activate(); this.testee.Next(); this.testee.ActiveItem.Should().Be(secondStep); }
public void ShouldInitializeWizardSteps() { var firstStep = new FakeStep(); var secondStep = new FakeStep(); this.authenticationStepFactory.SetupSequence(f => f.CreateSteps()).Returns( new List<IAuthenticationStep> { firstStep, secondStep }); this.Activate(); this.testee.Items.Should().HaveCount(2) .And.HaveElementAt(0, firstStep) .And.HaveElementAt(1, secondStep); this.testee.ActiveItem.Should().Be(firstStep); }
public void ShouldInitializeWizardSteps() { var firstStep = new FakeStep(); var secondStep = new FakeStep(); this.authenticationStepFactory.SetupSequence(f => f.CreateSteps()).Returns( new List <IAuthenticationStep> { firstStep, secondStep }); this.Activate(); this.testee.Items.Should().HaveCount(2) .And.HaveElementAt(0, firstStep) .And.HaveElementAt(1, secondStep); this.testee.ActiveItem.Should().Be(firstStep); }