public void ShouldSaluteOnStart() { OcheTestHelper.SetUpInputBuffer(); OcheTestHelper.SetUpOutputBuffer(); var oche = new Oche(OcheTestHelper.GetStartInputReader(), OcheTestHelper.GetCumulativeOutputWriter()); oche.NextInput(); Assert.Equal(true, oche.IsStartInput()); OcheTestHelper.OutputBuffer[0].Should().Be("Hola Gabriel"); }
public void ShouldReverseSingleInput() { OcheTestHelper.SetUpInputBuffer(); OcheTestHelper.SetUpOutputBuffer(); var oche = new Oche(OcheTestHelper.GetDogInputReader(), OcheTestHelper.GetCumulativeOutputWriter()); oche.NextInput(); oche.Reverse(); OcheTestHelper.OutputBuffer.Should().HaveCount(1); OcheTestHelper.OutputBuffer[0].Should().Be("orrep"); }
public void ShouldBeGladWithPalindrome() { OcheTestHelper.SetUpInputBuffer(); OcheTestHelper.SetUpOutputBuffer(); var oche = new Oche(OcheTestHelper.GetPalindromeInputReader(), OcheTestHelper.GetCumulativeOutputWriter()); oche.NextInput(); oche.Reverse(); OcheTestHelper.OutputBuffer.Should().HaveCount(2); OcheTestHelper.OutputBuffer[0].Should().Be("oso"); OcheTestHelper.OutputBuffer[1].Should().Be("Bonita palabra!"); }
public void ShouldGoodByeOnStop() { OcheTestHelper.SetUpInputBuffer(); OcheTestHelper.SetUpOutputBuffer(); var oche = new Oche(OcheTestHelper.GetStartAndStopInputReader(), OcheTestHelper.GetCumulativeOutputWriter()); oche.NextInput(); oche.IsStartInput().Should().BeTrue(); oche.NextInput(); oche.IsStopInput().Should().BeTrue(); OcheTestHelper.OutputBuffer[1].Should().Be("Adios Gabriel"); }