From 280e74c021a6708907902165f36e521b96bae00d Mon Sep 17 00:00:00 2001 From: Namig Gadirov Date: Mon, 28 Jul 2025 17:27:05 +0400 Subject: [PATCH 1/2] calculator tests --- .../java/com/coderabbit/app/calculator/CalculatorTest.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/test/java/com/coderabbit/app/calculator/CalculatorTest.kt b/app/src/test/java/com/coderabbit/app/calculator/CalculatorTest.kt index 0416e1d..ba20e53 100644 --- a/app/src/test/java/com/coderabbit/app/calculator/CalculatorTest.kt +++ b/app/src/test/java/com/coderabbit/app/calculator/CalculatorTest.kt @@ -1,5 +1,6 @@ package com.coderabbit.app.calculator +import org.junit.Assert.assertEquals import org.junit.Assert.assertTrue import org.junit.Test @@ -10,4 +11,10 @@ class CalculatorTest { val calculator = Calculator() assertTrue(calculator.add(1,2) == 3) } + + @Test + fun `test add function equals`() { + val calculator = Calculator() + assertEquals(calculator.add(1,2) ,3) + } } \ No newline at end of file From 35215c45c9b3cea39d77a17f6d7eb25cf959b6db Mon Sep 17 00:00:00 2001 From: Namig Gadirov Date: Mon, 28 Jul 2025 17:31:48 +0400 Subject: [PATCH 2/2] calculator tests --- .github/instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/instructions.md b/.github/instructions.md index 992c99c..7bd59c6 100644 --- a/.github/instructions.md +++ b/.github/instructions.md @@ -1 +1 @@ -- test names should follow naming rules like given (optional) ... when (required) ... then(required) \ No newline at end of file +- test function names should follow naming rules like given (optional) ... when (required) ... then(required) \ No newline at end of file