I wrote a program called Geometry that finds the volume and surface area of a sphere, cone and cylinder. I have to use JUnit 4 Testing to test the separate classes. I have written the following code but when I run the test it says it fails even though my program runs correctly. What is wrong?
package edu.waketech.lbgladson;
import static org.junit.Assert.*;
import org.junit.Assert;
import org.junit.Test;
public class SphereVolumeTest
{
@Test public void getVolume()
{
Sphere sphere = new Sphere(5);
Assert.assertEquals("523.5987755982989", sphere.getVolume(5));
}
}