From 75dd47e1083ea8e84d567dcbb9ee5f6538017a21 Mon Sep 17 00:00:00 2001 From: Nirzara Ghure <113231114+nirzaraghure@users.noreply.github.com> Date: Tue, 5 May 2026 15:05:32 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20AppGenius:=20AI-generated=20code?= =?UTF-8?q?=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/microsoft/demo/Demo.test.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/main/java/com/microsoft/demo/Demo.test.java diff --git a/src/main/java/com/microsoft/demo/Demo.test.java b/src/main/java/com/microsoft/demo/Demo.test.java new file mode 100644 index 000000000..0b4904282 --- /dev/null +++ b/src/main/java/com/microsoft/demo/Demo.test.java @@ -0,0 +1,35 @@ +package com.microsoft.demo; + +import org.junit.*; + +public class DemoTest { + private Demo demo; + + @Before + public void setUp() throws Exception { + demo = new Demo(); + } + + @After + public void tearDown() throws Exception { + demo = null; + } + + @Test + public void testDoSomethingWithTrueFlag() { + try{ + demo.DoSomething(true); + } catch (Exception e) { + Assert.fail("Expected no exception to be thrown"); + } + } + + @Test + public void testDoSomethingWithFalseFlag() { + try{ + demo.DoSomething(false); + } catch (Exception e) { + Assert.fail("Expected no exception to be thrown"); + } + } +} \ No newline at end of file