Exemple #1
0
        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");
        }
Exemple #2
0
        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!");
        }