From dc0e1ba40405f6e1d3c4233ecbed64b3cd9c1e39 Mon Sep 17 00:00:00 2001 From: Alena Bandarovich Date: Fri, 9 Feb 2024 22:43:42 +0100 Subject: [PATCH] Test: create test for positive numbers --- src/test/java/CalculationsTest.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/test/java/CalculationsTest.java b/src/test/java/CalculationsTest.java index bc1e503..9b6a1df 100644 --- a/src/test/java/CalculationsTest.java +++ b/src/test/java/CalculationsTest.java @@ -1,5 +1,14 @@ -import junit.framework.TestCase; +import org.junit.Test; +import static org.junit.Assert.assertEquals; -public class CalculationsTest extends TestCase { - -} \ No newline at end of file +public class CalculationsTest { + + @Test + public void testCalculateSquare() { + Calculations calc = new Calculations(); + + // Test with a positive number + assertEquals(25, calc.calculateSquare(5)); + + } +}