예제 #1
0
파일: Tests.cs 프로젝트: karpikpl/tri
        public void KattisSolver_Should_WorkOnMultipleLinesOfInput()
        {
            // Arrange
            string result;

            using (var helper = new StreamHelper("5 3 8", "10 5 2", "5 15 3"))
            {
                // Act
                var kattisSolver = new KattisSolver(helper.InStream, helper.OutStream);
                kattisSolver.SolveOnStreams();
                result = helper.ReadOut();
            }

            // Assert
            Assert.That(result, Is.EqualTo("5+3=8\r\n10/5=2\r\n5=15/3\r\n"));
        }
예제 #2
0
        public void KattisSolver_Should_WorkOnMultipleLinesOfInput()
        {
            // Arrange
            string result;

            using (var helper = new StreamHelper("5 3 8", "10 5 2", "5 15 3"))
            {
                // Act
                var kattisSolver = new KattisSolver(helper.InStream, helper.OutStream);
                kattisSolver.SolveOnStreams();
                result = helper.ReadOut();
            }

            // Assert
            Assert.That(result, Is.EqualTo("5+3=8\r\n10/5=2\r\n5=15/3\r\n"));
        }
예제 #3
0
파일: Tests.cs 프로젝트: karpikpl/tri
        public void KattisSolver_Should_WorkOnStreams()
        {
            // Arrange
            const string data = "5 3 8";
            string result;

            using (var helper = new StreamHelper(data))
            {
                // Act
                var kattisSolver = new KattisSolver(helper.InStream, helper.OutStream);
                kattisSolver.SolveOnStreams();
                result = helper.ReadOut();
            }

            // Assert
            Assert.That(result, Is.EqualTo("5+3=8\r\n"));
        }
예제 #4
0
        public void KattisSolver_Should_WorkOnStreams()
        {
            // Arrange
            const string data = "5 3 8";
            string       result;

            using (var helper = new StreamHelper(data))
            {
                // Act
                var kattisSolver = new KattisSolver(helper.InStream, helper.OutStream);
                kattisSolver.SolveOnStreams();
                result = helper.ReadOut();
            }

            // Assert
            Assert.That(result, Is.EqualTo("5+3=8\r\n"));
        }
예제 #5
0
파일: Program.cs 프로젝트: karpikpl/tri
 static void Main(string[] args)
 {
     KattisSolver kattisSolver = new KattisSolver(Console.OpenStandardInput(), Console.OpenStandardOutput());
     kattisSolver.SolveOnStreams();
 }
예제 #6
0
파일: Program.cs 프로젝트: karpikpl/tri
        static void Main(string[] args)
        {
            KattisSolver kattisSolver = new KattisSolver(Console.OpenStandardInput(), Console.OpenStandardOutput());

            kattisSolver.SolveOnStreams();
        }