Ejemplo n.º 1
0
        public void Post2ComparesAndSaves_ReturnTrue()
        {
            algorithmsMock.Setup(v => v.SimpleSort("4 3 2 1")).Returns("1 2 3 4");
            algorithmsMock.Setup(v => v.InsertionSort("4 3 2 1")).Returns("1 2 3 4");
            algorithmsMock.Setup(v => v.BubbleSort("4 3 2 1")).Returns("1 2 3 4");
            streamMock.Setup(v => v.CorrectInput("4 3 2 1")).Returns("");
            streamMock.Setup(v => v.SaveResult("4 3 2 1"));

            string result = controller.Post2("4 3 2 1");

            Assert.That(result.Contains("Insertion sort") && result.Contains("Simple sort") && result.Contains("Bubble sort"));
        }