Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.myapplication
- import junit.framework.TestCase
- import org.junit.Test
- val objMain = MainActivity()
- class MainActivityTest : TestCase() {
- @Test
- fun isPositiveNumbersTest() {
- assertTrue(objMain.isPositiveNumber(5))
- assertTrue(objMain.isPositiveNumber(3))
- assertFalse(objMain.isPositiveNumber(-3))
- }
- @Test
- fun sumNumbersTest() {
- assertEquals(5, objMain.sumNumbers(3, 2))
- assertEquals(13, objMain.sumNumbers(12, 1))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment