Exemple #1
0
        public void TestSample1()
        {
            var input = new DataSource();

            input.AppendLine("5");
            input.AppendLine("5 4 3 2 1");
            var output = new DataSource();

            output.AppendLine("3");
            output.AppendLine("1 4");
            output.AppendLine("0 1");
            output.AppendLine("1 3");
            var assingment = new BuildHeap();

            Assert.Equal(output.ToString("\n"), assingment.Execute(input));
        }
Exemple #2
0
        public void TestDataSet(DataSource input, string output)
        {
            var assignment = new BuildHeap();

            Assert.Equal(output, assignment.Execute(input));
        }