gazievDima

Untitled

Apr 26th, 2021
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. package com.example.myapplication
  2.  
  3. import junit.framework.TestCase
  4. import org.junit.Test
  5.  
  6. val objMain = MainActivity()
  7.  
  8. class MainActivityTest : TestCase() {
  9.  
  10. @Test
  11. fun isPositiveNumbersTest() {
  12. assertTrue(objMain.isPositiveNumber(5))
  13. assertTrue(objMain.isPositiveNumber(3))
  14.  
  15. assertFalse(objMain.isPositiveNumber(-3))
  16. }
  17.  
  18. @Test
  19. fun sumNumbersTest() {
  20. assertEquals(5, objMain.sumNumbers(3, 2))
  21. assertEquals(13, objMain.sumNumbers(12, 1))
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment