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