Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/src/main/java/com/coderabbit/app/calculator/Calculator.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.coderabbit.app.calculator

class Calculator {

fun add(a: Int, b: Int): Int {
return a + b
}
}
13 changes: 13 additions & 0 deletions app/src/test/java/com/coderabbit/app/calculator/CalculatorTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.coderabbit.app.calculator

import org.junit.Assert.assertTrue
import org.junit.Test

class CalculatorTest {

@Test
fun `test add function`() {
val calculator = Calculator()
assertTrue(calculator.add(1,2) == 3)
Comment thread
NamigGadir marked this conversation as resolved.
}
Comment thread
NamigGadir marked this conversation as resolved.
}