66<!-- toc -->
77## Contents
88
9- * [ What can it be used for?] ( #what-can-it-be-used-for )
10- * [ Documentation] ( #documentation )
11- * [ Missing Documentation?] ( #missing-documentation )
12- * [ Getting started] ( #getting-started )
13- * [ New Projects] ( #new-projects )
14- * [ Docs] ( #docs )
15- * [ Learning] ( #learning )
16- * [ How to get it] ( #how-to-get-it )
17- * [ Maven] ( #maven )
18- * [ Gradle] ( #gradle )
19- * [ Podcasts] ( #podcasts )
20- * [ Examples] ( #examples )
219 * [ Approved File Artifacts] ( #approved-file-artifacts )
2210 * [ More Info] ( #more-info )
2311 * [ No Checked Exceptions Philosophy] ( #no-checked-exceptions-philosophy )
@@ -31,112 +19,11 @@ Capturing Human Intelligence - ApprovalTests is an open source assertion/verific
3119It is compatible with JUnit 3, 4 & 5 and TestNG.
3220
3321<!-- snippet: approvaltests-tests/src/test/java/org/approvaltests/ci/JavaVersionTest.testSupportedJavaVersions.approved.txt -->
34-
35- ## What can it be used for?
36-
37- Approval Tests can be used for verifying objects that require more than a simple assert. They also come prepackaged with utilities for some common java scenarios including
38-
39-
40- - HashMaps & Collections
41- - Long Strings
42- - Log Files
43- - JPanels
44- - Xml
45- - Html
46- - Json
47- - Getting * Legacy Code* under tests
48-
49- Want to see more? Check out [ Better Testing with Approvals] ( https://www.youtube.com/watch?v=QEdpE0chA-s )
50-
51- ## Documentation
52- - [ ApprovalTests] ( /approvaltests/docs/README.md )
53- - [ ApprovalTests-util] ( /approvaltests-util/docs/README.md )
54-
55- ### Missing Documentation?
56- If there is documentation you wish existed, please add a ` page request ` to [ this issue] ( https://github.com/approvals/ApprovalTests.Java/issues/342 ) .
57-
58- ## Getting started
59- ### New Projects
60- The best way to get started is download and open one of the starter projects:
61- * Java
62- * [ Maven] ( https://github.com/approvals/approvaltests.java.starterproject )
63- * [ Gradle] ( https://github.com/approvals/approvaltests.java.starterproject.gradle )
64- * [ Kotlin] ( https://github.com/approvals/Approvaltests.Kotlin.StarterProject )
65- * [ Groovy] ( https://github.com/approvals/Approvaltests.Groovy.StarterProject )
66- * [ Scala] ( https://github.com/approvals/Approvaltests.Scala.StarterProject )
67-
68- These are standard projects and can be imported into any editor or IDE.
69- They also all have CI with Github actions.
70-
71- ### Docs
72- You might also want to check out the [ Getting Started Overview] ( approvaltests/docs/tutorials/GettingStarted.md )
73-
74- ### Learning
75- A great way to learn Approval Tests if you are new to it is to try out the [ Koans] ( https://github.com/approvals/ApprovalTests.java.Koans ) .
76-
77- ## How to get it
78- It's on Maven Central, search for 'approvaltests'.
79-
80- ### Maven
81- If you're using Maven, add this to your pom file:
82-
83- ``` xml
84- <dependency >
85- <groupId >com.approvaltests</groupId >
86- <artifactId >approvaltests</artifactId >
87- <version >24.22.0</version >
88- <scope >test</scope >
89- </dependency >
90- ```
91-
92- ### Gradle
93-
94- ``` gradle
95- dependencies {
96- testImplementation("com.approvaltests:approvaltests:24.22.0")
97- }
98- ```
99-
100- or [ download the jars from maven central repository] ( https://repo1.maven.org/maven2/com/approvaltests/approvaltests/ )
101-
102- [ Video Tutorials] ( https://www.youtube.com/playlist?list=PLFBA98F47156EFAA9&feature=view_all )
103- ---
104-
105- You can watch a bunch of short videos on getting started and [ using ApprovalTests in Java] ( https://www.youtube.com/playlist?list=PLFBA98F47156EFAA9&feature=view_all ) at youtube.
106-
107- * Note* : There are a lot of videos about ApprovalTests in .Net They are equally useful for understanding the concepts despite being in a different programming language.
108-
109- ## Podcasts
110-
111- If you prefer auditory learning, you might enjoy the following podcast (Note: Some of these talk about the .net side)
112-
113- - [ Cucumber Podcast] ( https://cucumber.io/blog/2017/01/26/approval-testing )
114- - [ Hanselminutes] ( https://www.hanselminutes.com/360/approval-tests-with-llewellyn-falco )
115- - [ Herding Code] ( https://www.developerfusion.com/media/122649/herding-code-117-llewellyn-falcon-on-approval-tests/ )
116-
117-
118-
119- ## Examples
120-
121- ApprovalTests eats it own dogfood, so the best examples are in the source code itself.
122-
123- None the less, Here's a quick look
124-
125- <!-- snippet: demo -->
126- <a id =' snippet-demo ' ></a >
127- ``` java
128- public class SampleArrayTest
129- {
130- @Test
131- public void testList ()
132- {
133- String [] names = {" Llewellyn" , " James" , " Dan" , " Jason" , " Katrina" };
134- Arrays . sort(names);
135- Approvals . verifyAll(" " , names);
136- }
137- }
22+ <a id =' snippet-approvaltests-tests/src/test/java/org/approvaltests/ci/JavaVersionTest.testSupportedJavaVersions.approved.txt ' ></a >
23+ ``` txt
24+ Supported Java versions: 8, 17, 21, 24
13825```
139- <sup ><a href =' /approvaltests-tests/src/test/java/org/approvaltests/demos/SampleArrayTest.java#L8-L19 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-demo ' title =' Start of snippet ' >anchor</a ></sup >
26+ <sup ><a href =' /approvaltests-tests/src/test/java/org/approvaltests/ci/JavaVersionTest.testSupportedJavaVersions.approved.txt#L1-L1 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-approvaltests-tests/src/test/java/org/approvaltests/ci/JavaVersionTest.testSupportedJavaVersions.approved.txt ' title =' Start of snippet ' >anchor</a ></sup >
14027<!-- endSnippet -->
14128
14229Will Produce a File ` SampleArrayTest.testList.received.txt `
0 commit comments