You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
# Literate Testing
2
+
2
3
These are examples of how to use naming conventions and grouping to write unit tests in a highly readable manner,
3
4
resembling a specification so that the reader may gain a deeper understanding of the code being tested.
4
5
@@ -24,7 +25,35 @@ See below for [test output](#test-output)
24
25
25
26
[JUnit docs](https://junit.org/junit5/docs/current/user-guide/#writing-tests-display-name-generator) showing these naming conventions
26
27
27
-
## Test Output
28
+
29
+
## SimpleStackTest Results
30
+
31
+
### Given an empty stack
32
+
- ✅ [it has depth zero](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L18-L22)
33
+
- ✅ [it has no elements](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L24-L29)
34
+
- ✅ [pushing makes it non empty](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L31-L36)
35
+
- ✅ [popping is not allowed](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L38-L42)
36
+
- ✅ [retrieving the top element is not allowed](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L44-L48)
- ✅ [pushing places new item on top and preserves existing items](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L61-L66)
41
+
42
+
### Given a non empty stack
43
+
- ✅ [popping returns the top element](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L72-L76)
44
+
- ✅ [popping decreases depth by one](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L78-L83)
45
+
- ✅ [the popped item is removed](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L85-L91)
46
+
- ✅ [popping removes only the top item](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L93-L99)
47
+
- ✅ [items are popped in reverse order](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L101-L107)
48
+
- ✅ [its top item is the last pushed](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L109-L114)
49
+
- ✅ [its list view is unmodifiable](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L116-L120)
50
+
- ✅ [its list view contains items in insertion order](https://github.com/arunbear/literate-testing-java/blob/main/src/test/java/org/example/SimpleStackTest.java#L122-L126)
0 commit comments