コード例 #1
0
 public void InvalidInputCircleTest()
 {
     try
     {
         Circle circ = new Circle(-3.5);
     }
     catch (ArgumentException e)
     {
         Assert.AreEqual("Size must be a positive number.", e.Message);
     }
 }
コード例 #2
0
        public void ValidInputCircleTest()
        {
            Circle circ = new Circle(3.5);

            Assert.AreEqual("38.4845", string.Format("{0:f4}", circ.CalculateSurface()));
        }