1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
-
-
- import org.junit.Assert;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class bonusFunctionsTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class bonusFunctionsTest
- {
- private bonusFunctions bonusFunctions;
- @Before
- public void setUp(){
- bonusFunctions = new bonusFunctions();
- }
-
- @Test
- public void naturalLogLnTest(){
- // :Given
- Double expected = 0.0;
-
- // :When
- Double actual = bonusFunctions.naturalLogLn(1.0);
-
- // :Then
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void LogBaseTenOfAnumberTest(){
- // :Given
- Double expected = 1.0;
-
- // :When
- Double actual = bonusFunctions.LogBaseTenOfAnumber(10.0);
-
- // :Then
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void exponentialTest(){
- // :Given
- Double expected = 2.7182818285;
-
- // :When
- Double actual = bonusFunctions.exponential(1.0);
-
- // :Then
- Assert.assertEquals(expected, actual, 0.10);
- }
-
- }
|