Example #1
0
        public void TestMain()
        {
            Lab1.Sphere sphereInstance = new Lab1.Sphere(Lab1.Shapes.Sphere);
            sphereInstance.setRadius(1);

            Lab1.ThreeDShape[] shapes = { cylindre, cone, sphereInstance };

            Assert.AreEqual(cylindre.volume(), 1);
            Assert.AreEqual(4.19, Math.Round(sphereInstance.volume(), 2));
        }
Example #2
0
 public void TestSphere()
 {
     Lab1.Sphere sphereInstance = new Lab1.Sphere(Lab1.Shapes.Sphere);
     sphereInstance.setRadius(1);
     Assert.AreEqual(4.19, Math.Round(sphereInstance.volume(), 2));
 }