1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class ScientificCalculationsTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class ScientificCalculationsTest
- {
- @Test
- public void testSine()
- {
- ScientificCalculations scientif1 = new ScientificCalculations(3);
- assertEquals(0.1411200080598672, scientif1.sine(), 0.1);
- }
-
- @Test
- public void testCosine()
- {
- ScientificCalculations scientif1 = new ScientificCalculations(6);
- assertEquals(0.9601702866503661, scientif1.cosine(), 0.1);
- }
-
- @Test
- public void testTangent()
- {
- ScientificCalculations scientif1 = new ScientificCalculations(7);
- assertEquals(0.8714479827243187, scientif1.tangent(), 0.1);
- }
-
-
- @Test
- public void testInverseSine()
- {
- ScientificCalculations scientif1 = new ScientificCalculations(-1);
- assertEquals(-1.5707963267948966, scientif1.inverseSine(), 0.1);
- }
-
- @Test
- public void testInverseCosine()
- {
- ScientificCalculations scientif1 = new ScientificCalculations(-1);
- assertEquals(3.141592653589793, scientif1.inverseCosine(), 0.1);
- }
-
- @Test
- public void testInverseTangent()
- {
- ScientificCalculations scientif1 = new ScientificCalculations(-1);
- assertEquals(-0.7853981633974483, scientif1.inverseTangent(), 0.1);
- }
-
- @Test
- public void testFactorial()
- {
- ScientificCalculations scientif1 = new ScientificCalculations(5);
- assertEquals(120, scientif1.factorial(), 0.1);
- }
- }
-
-
-
-
-
-
-
-
|