1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class ScientificTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class ScientificTest
- {
- private Scientific test;
- public ScientificTest(){
- }
-
- /**
- * Sets up the test fixture.
- *
- * Called before every test case method.
- */
- @Before
- public void setUp()
- {
- Scientific test = new Scientific();
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- @Test
- public void testSineDegrees()
- {
- //expected
- double expected = 1.0;
- //actual
-
- double actualSine = test.sine(90.0,0);
- //assertion
- assertEquals(expected, actualSine, 0.1);
- }
- @Test
- public void testSineRadians()
- {
- //expected
- double expected = 0.5;
- //actual
- double actualSine = test.sine(0.52359877559,1);
- //assertion
- assertEquals(expected, actualSine, 0.1);
- }
- }
-
|