コード例 #1
0
 public void Test_on_expected()
 {
     string   x         = "4 4 6 6";
     string   y         = "0 2 2 0";
     Rectangl rectangle = new Rectangl(x, y);
     double   rect      = Math.Round(rectangle.Diagonal());
 }
コード例 #2
0
        public void TestRectangle(int x1, int y1, int x2, int y2, int[] ExPoints)
        {
            Rectangl Actual      = new Rectangl();
            bool     ActualPoint = Actual.CheckForMatches(x1, y1, x2, y2, 0, ExPoints);
            bool     Expected    = true;

            Assert.AreEqual(Expected, ActualPoint);
        }
コード例 #3
0
ファイル: TestClass.cs プロジェクト: KukhtaSvetlana/Projects
        public void Test_on_expected()
        {
            string   x         = "4 4 6 6";
            string   y         = "0 2 2 0";
            Rectangl rectangle = new Rectangl(x, y);

            Assert.Throws <ArgumentException>(() => Math.Round(rectangle.Diagonal()));
        }
コード例 #4
0
        public void Test_in_equality()
        {
            string   x         = "-4 -4 6 6";
            string   y         = "-2 3 3 -2";
            Rectangl rectangle = new Rectangl(x, y);
            double   rect      = Math.Round(rectangle.Diagonal());
            double   rez       = 11;

            Assert.AreEqual(rez, rect);
        }