Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1.  
  2.  
  3. import junit.framework.TestCase;
  4.  
  5. /**
  6.  * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
  7.  */
  8. public class ApplicationTest extends TestCase {
  9.     protected double fValue1 = 2.0;
  10.     protected double fValue2 = 3.0;
  11.  
  12.     public ApplicationTest()
  13.     {
  14.         TestCase test = new ApplicationTest("mathExampleTest");
  15.         test.run();
  16.     }
  17.  
  18.  
  19.  
  20.     //simply tests if 2+3 = 5
  21.     public void mathExampleTest()
  22.     {
  23.         double result = fValue1 + fValue2;
  24.         assertTrue(result == 5.0);
  25.     }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement