Skip to content
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions src/javasource/unittesting/UnittestingUnitTest1.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public class UnittestingUnitTest1
@Before
public void setup() throws InterruptedException {
this.state = false;
Thread.sleep(1000);
Thread.sleep(10);
}

@Test
public void testOfOneSecondSetupAndOneSecundRun() throws InterruptedException {
public void testOfOneMsSecondSetupAndOneMsSecundRun() throws InterruptedException {
this.state = true;
TestManager.instance().reportStep("Sleeping a while");
Thread.sleep(1000);
Thread.sleep(10);
TestManager.instance().reportStep("Sleeping done!");
assertTrue(state);
}
Expand Down
6 changes: 3 additions & 3 deletions src/javasource/unittesting/UnittestingUnitTest2.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ public class UnittestingUnitTest2 extends AbstractUnitTest

@Before
public void setup() throws InterruptedException {
Thread.sleep(500);
Thread.sleep(5);
}

@After
public void tearDown() throws InterruptedException {
Thread.sleep(500);
Thread.sleep(5);
}

@Test
public void evenMoreUnitTests() throws InterruptedException {
this.startTimeMeasure();

this.reportStep("By inheriting from AbstractUnitTest some utility methods are provided and time can be tracted in a more reliable way (without counting setup and teardown)");
Thread.sleep(1000);
Thread.sleep(10);

assertTrue(true);

Expand Down