Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            AreaOfCircle circ = new AreaOfCircle();

            circ.ComputeArea();
        }
 public void ShouldFailAlphaNumeric()
 {
     Assert.Throws <ArgumentException>(delegate { AreaOfCircle.CalculateAreaOfCircle("number"); });
 }
 public void ShouldPass1()
 {
     Assert.AreEqual(5881.25, AreaOfCircle.CalculateAreaOfCircle("43.2673"));
 }
 public void ShouldFailNegativeNumber()
 {
     Assert.Throws <ArgumentException>(delegate { AreaOfCircle.CalculateAreaOfCircle("-123"); });
     //Assert.Throws(typeof(ArgumentException), Kata.CalculateAreaOfCircle("-123"));
 }