Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/main/java/com/microsoft/demo/Demo.test.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}