Skip to content

Commit cf630b0

Browse files
committed
Update README
1 parent 0a4586b commit cf630b0

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

README.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,38 @@ import net.avh4.test.junit.Nested;
2727

2828
@RunWith(Nested.class)
2929
public class QueueTest {
30-
private Queue<String> subject;
31-
32-
@Before
33-
public void setUp() {
34-
subject = new Queue<String>();
35-
}
36-
37-
@Test
38-
public void push_shouldIncreaseCount() {
39-
subject.push("Item");
40-
assertThat(subject.count(), is(1));
41-
}
42-
43-
public class WhenEmpty {
44-
@Test(expected = NoSuchElementException.class)
45-
public void pop_shouldThrow() {
46-
subject.pop();
47-
}
48-
}
30+
private Queue<String> subject;
4931

50-
public class WithOneItem {
5132
@Before
5233
public void setUp() {
53-
subject.push("First");
34+
subject = new Queue<String>();
5435
}
5536

5637
@Test
57-
public void pop_shouldReturnTheItem() {
58-
assertThat(subject.pop(), is("First"));
38+
public void push_shouldIncreaseCount() {
39+
subject.push("Item");
40+
assertThat(subject.count(), is(1));
41+
}
42+
43+
public class WhenEmpty {
44+
@Test(expected = NoSuchElementException.class)
45+
public void pop_shouldThrow() {
46+
subject.pop();
47+
}
48+
}
49+
50+
public class WithOneItem {
51+
@Before
52+
public void setUp() {
53+
subject.push("First");
54+
}
55+
56+
@Test
57+
public void pop_shouldReturnTheItem() {
58+
assertThat(subject.pop(), is("First"));
59+
}
5960
}
60-
}
61+
}
6162
```
6263

6364
## What works
@@ -76,6 +77,12 @@ public class QueueTest {
7677
* `@Rule` methods (however, @Rule fields do work) for outer classes
7778
* `@RunWith` on inner classes
7879

80+
## License
81+
82+
junit-nested is licensed under the [Common Public License version
83+
1.0](http://www.opensource.org/licenses/cpl1.0.txt). If you have need of a
84+
different license, please contact me.
85+
7986
## References
8087

8188
Below are some resources I investigated before writing junit-nested, which

0 commit comments

Comments
 (0)