Exemplo n.º 1
0
 public void Should_Create_A_Default_Valuated_Point()
 {
     var point = new Point();
     Assert.IsNotNull(point);
     Assert.AreEqual(point.X, 0);
     Assert.AreEqual(point.Y, 0);
     Assert.IsTrue(point.ToString().Contains("0"));
 }
Exemplo n.º 2
0
 public void Should_Create_A_Point(int xToTest, int yTotest)
 {
     var point = new Point(xToTest, yTotest);
     Assert.IsNotNull(point);
     Assert.AreEqual(point.X, xToTest);
     Assert.AreEqual(point.Y, yTotest);
     Assert.IsTrue(point.ToString().Contains(xToTest.ToString()));
     Assert.IsTrue(point.ToString().Contains(yTotest.ToString()));
 }
Exemplo n.º 3
0
 public void Should_Calculate_Right_Distance_When_A_Point_Is_Given(int xToTest, int yTotest, double result)
 {
     var point = new Point(xToTest, yTotest);
     Assert.IsNotNull(point);
     Assert.AreEqual(result, point.Dist);
 }