示例#1
0
        public void Task3()
        {
            FirstTask.Library.Menu menu = new FirstTask.Library.Menu();
            bool isCorrect = true;

            foreach (var v in menu.ThirdTask(path))
            {
                //isCorrect = v.GetSides()[0].Color == v.GetSides()[1].Color && v.GetSides()[0].Color == v.GetSides()[2].Color;
                isCorrect = v.GetSides()[0].Color == v.GetSides()[1].Color;
                isCorrect = v.GetSides()[0].Color == v.GetSides()[2].Color;
            }
            Assert.IsTrue(isCorrect);
        }
示例#2
0
        public void Task1()
        {
            FirstTask.Library.Menu     menu            = new FirstTask.Library.Menu();
            SortedList <int, Triangle> SortedTriangles = menu.FirstTask(path);
            IList <Triangle>           lst             = SortedTriangles.Values;

            Triangle[] triangles = new Triangle[SortedTriangles.Count];
            lst.CopyTo(triangles, 0);
            bool isCorrect = true;

            for (int i = 1; i < SortedTriangles.Count; i++)
            {
                isCorrect = triangles[i - 1].GetPerim() < triangles[i].GetPerim();
            }
            Assert.IsTrue(isCorrect);
        }