1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class ConsoleTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class ConsoleTest
- {
- Console test = new Console();
-
-
- @Test
- public void mPlusTest(){
- //Given
-
- double test1 = 1.0;
-
- //When
- double actual = 1.0;
- double expected = test.mPlus(test1);
- //Then
- assertEquals(expected,actual,0);
- }
-
- @Test
- public void mClearTest(){
- //Given
-
- test.memory = 5.0;
- //When
- double actual =0.0;
- double expected = test.mClear();
- //Then
- assertEquals(expected,actual,0);
- }
-
- @Test
- public void mRcTest(){
- //Given
-
- double test1 = 0.0;
-
- //When
- double actual = 0.0;
- double expected = test.mRc();
- //Then
- assertEquals(expected,actual,0);
- }
- }
-
-
|