From c6c085c760cf197851edb9994fa61f940bc76ae5 Mon Sep 17 00:00:00 2001 From: Namig Gadirov Date: Tue, 29 Jul 2025 12:02:19 +0400 Subject: [PATCH 1/2] tests added --- .../java/com/coderabbit/app/calculator/CalculatorTest.kt | 9 +++++++++ 1 file changed, 9 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 1dfa6ee..3bc81ff 100644 --- a/app/src/test/java/com/coderabbit/app/calculator/CalculatorTest.kt +++ b/app/src/test/java/com/coderabbit/app/calculator/CalculatorTest.kt @@ -47,6 +47,15 @@ class CalculatorTest { } } + @Test + fun `test divide function throws exception when dividing forty by zero`() { + val calculator = Calculator() + assertThrows(ArithmeticException::class.java){ + calculator.divide(40,0) + } + } + + @Test fun `test divide function che divide fourteen`() { val calculator = Calculator() From 38d9ac0f1f73cebb099d3917355032b919f8a9f1 Mon Sep 17 00:00:00 2001 From: Namig Gadirov Date: Tue, 29 Jul 2025 12:26:02 +0400 Subject: [PATCH 2/2] tests added --- coderabbit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coderabbit.yaml b/coderabbit.yaml index cb335de..99958bc 100644 --- a/coderabbit.yaml +++ b/coderabbit.yaml @@ -27,7 +27,7 @@ reviews: path_instructions: - path: "**/test/**" instructions: | - - test function names should follow naming rules like given (optional) ... when (required) ... then(required) + - function names should follow naming rules like given (optional) ... when (required) ... then(required) labeling_instructions: