Skip to content

Commit

Permalink
Merge pull request #7 from finreinhard/patch-1
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
goatfryed authored Oct 11, 2024
2 parents 8e75eab + d2018db commit 666988b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AssertBaseline
[![Build Status](https://github.com/goatfryed/assert-baseline/actions/workflows/verify.yml/badge.svg)](https://github.com/goatfryed/assert-baseline/actions/workflows/verify.yml)

Compare and approve system outputs with well-defined serialization rules based on there serialized representation.
Compare and approve system outputs with well-defined serialization rules based on their serialized representation.

## What is AssertBaseline?
AssertBaseline extends [AssertJ](https://github.com/assertj/assertj) to integrate format specific assertions with
Expand Down Expand Up @@ -37,7 +37,7 @@ For more details and other formats, see below.
All formats are optional dependencies.

#### Include in your project
For gradle capabilities can be used
For Gradle, capabilities can be used
```groovy
implementation("com.github.goatfryed:assert-baseline:{version}") {
capabilities {
Expand Down Expand Up @@ -70,7 +70,7 @@ assertThatJson(jsonString)
.isEqualToBaseline("specs/my.baseline.json");
```
`formatAssertion.isEqualToBaseline(pathToBaseline)` executes the baseline assertion.
The parameter pathToBaseline is relative to the resource context. See more on convention below
The parameter pathToBaseline is relative to the resource context. See more on conventions below

`formatAssertion.using{Format}Comparator(...)` provides ways to control the comparison
in a format specific way exposing options of the reused libraries.
Expand Down
6 changes: 3 additions & 3 deletions docs/assert-json-baseline.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# JSON Assertions
Json support is added through [json-unit](https://github.com/lukas-krecan/JsonUnit).
JSON support is added through [json-unit](https://github.com/lukas-krecan/JsonUnit).

```java
import static com.github.goatfryed.assert_baseline.Assertions.assertThatJson;
Expand Down Expand Up @@ -34,7 +34,7 @@ For maven
</dependencies>
````

## Tips & Recipies
## Tips & Recipes
### Ignore auto-generated, volatile fields
```java
assertThatJson(jsonString)
Expand All @@ -44,4 +44,4 @@ assertThatJson(jsonString)
"$.event.timestamp"
)
).isEqualToBaseline(pathToBaseline);
```
```
8 changes: 4 additions & 4 deletions docs/assert-text-baseline.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Text Assertions
String assertions require no additional dependency and use simply assertJ.
String assertions require no additional dependency and use simply AssertJ.

```java
import static com.github.goatfryed.assert_baseline.Assertions.assertThatJson;
import static com.github.goatfryed.assert_baseline.Assertions.assertThatText;

assertThatText(yourString)
.isEqualToBaseline("src/test/resources/specs/my.baseline.txt");
Expand All @@ -25,5 +25,5 @@ For maven
</dependencies>
````

## Tips & Recipies
`usingTextComparator` is simply an alias for `usingComparator` of assertJ on String subjects
## Tips & Recipes
`usingTextComparator` is simply an alias for `usingComparator` of AssertJ on String subjects
4 changes: 2 additions & 2 deletions docs/assert-xml-baseline.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For maven
</dependencies>
````

## Tips & Recipies
## Tips & Recipes
Ignore auto-generated, volatile fields
```java
import static com.github.goatfryed.assert_baseline.xml.XmlDiffConfiguration.ignoringXPath;
Expand All @@ -47,4 +47,4 @@ assertThatXml(xmlContent)
::test
)
).isEqualToBaseline(pathToBaseline);
```
```
6 changes: 3 additions & 3 deletions docs/convention-and-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ Usually, you want to do so by extending
public class MyBaselineConvention extends AbstractConvention {

@Override
public void String resolveActualPath(String requestedBaselinePath) {
public String resolveActualPath(String requestedBaselinePath) {
return "src/test/resources/actual/" + requestedBaselinePath;
}

@Override
public void String resolveActualPath(String requestedBaselinePath) {
public String resolveActualPath(String requestedBaselinePath) {
return "src/test/resources/expected/" + requestedBaselinePath;
}
}
```
This would allow you to call `assertThatJson(event).isEqualToBaseline(event.json)`
and have the actual file stored as `src/test/resources/actual/event.json` and compared with
`src/test/resources/expected/event.json`
`src/test/resources/expected/event.json`
2 changes: 1 addition & 1 deletion docs/project-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ what this projects aims to be.
Note that project does not necessarily mean one single library artifact.

## Goals
- Provide an assertj integration for baseline testing and follow it's general feel
- Provide an assertj integration for baseline testing and follow its general feel
- Provide easy integration with common format assertion libraries
- Provide sensible defaults that work for most projects and extensibility to overwrite all
- Handle basic storage aspects (e.g. file system handling, path management)
Expand Down

0 comments on commit 666988b

Please sign in to comment.