Skip to content

Commit 3b190c8

Browse files
committed
Update README
1 parent b063a78 commit 3b190c8

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,31 @@
1616

1717
# CSV Comparator
1818

19-
## Gradle Project
20-
Add the `csv-comparator` dependency to your build.gradle.
19+
## How To Use
20+
### Gradle Project
21+
Add the `csv-comparator` dependency to your build.gradle
2122
```gradle
22-
repositories {
23-
mavenCentral()
24-
}
25-
2623
dependencies {
27-
implementation('com.github.ngoanh2n:csv-comparator:1.2.0')
24+
testImplementation("com.github.ngoanh2n:csv-comparator:1.2.0")
2825
}
2926
```
3027

31-
## Maven Project
32-
Add the `csv-comparator` dependency to your pom.
28+
### Maven Project
29+
Add the `csv-comparator` dependency to your pom
3330
```xml
3431
<dependencies>
3532
[...]
3633
<dependency>
3734
<groupId>com.github.ngoanh2n</groupId>
3835
<artifactId>csv-comparator</artifactId>
3936
<version>1.2.0</version>
37+
<scope>test</scope>
4038
</dependency>
4139
[...]
4240
</dependencies>
4341
```
4442

45-
## How To Use
43+
## How To Apply
4644
Compare 2 CSV files formatted columns:
4745
```
4846
id,email,firstname,lastname,age,note
@@ -58,7 +56,7 @@ CsvComparisonSource<File> source = CsvComparisonSource.create(expectedCsv, actua
5856
CsvComparisonOptions options = CsvComparisonOptions
5957
.builder()
6058
.setColumns(1, 2, 3)
61-
.setIdentityColumn(0) // position starts with 0 in array [1, 2, 3]
59+
.setIdentityColumn(0) // position starts with 0 in array [1, 2, 3]
6260
.build();
6361
```
6462

@@ -77,13 +75,15 @@ CsvComparisonResult result = new CsvComparator(source, options).compare();
7775
```
7876

7977
### Asssert `CsvComparisonResult`
80-
- `#hasDiff()`
81-
- `#hasDeleted()`
82-
- `#hasInserted()`
83-
- `#hasModified()`
84-
- `#rowsKept()`
85-
- `#rowsDeleted()`
86-
- `#rowsInserted()`
87-
- `#rowsModified()`
78+
```java
79+
CsvComparisonResult.hasDiff()
80+
CsvComparisonResult.hasDeleted()
81+
CsvComparisonResult.hasInserted()
82+
CsvComparisonResult.hasModified()
83+
CsvComparisonResult.rowsKept()
84+
CsvComparisonResult.rowsDeleted()
85+
CsvComparisonResult.rowsInserted()
86+
CsvComparisonResult.rowsModified()
87+
```
8888

8989
_By default, result files which is created after comparing is located at `build/comparator/csv/{yyyyMMdd.HHmmss.SSS}/`_

0 commit comments

Comments
 (0)