Skip to content

Commit e3687d7

Browse files
committed
Change split between class and method to a dot
1 parent 71ef6ac commit e3687d7

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>io.github.json-snapshot</groupId>
77
<artifactId>json-snapshot</artifactId>
8-
<version>0.0.1</version>
8+
<version>0.0.2</version>
99
<packaging>jar</packaging>
1010

1111
<name>json-snapshot</name>

src/main/java/io/github/jsonSnapshot/Snapshot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ private String takeSnapshot() {
7474
}
7575

7676
public String getSnapshotName() {
77-
return clazz.getName() + "| with |" + method.getName() + "=";
77+
return clazz.getName() + "." + method.getName() + "=";
7878
}
7979
}

src/test/java/io/github/jsonSnapshot/SnapshotIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void shouldMatchSnapshotFour() {
4848
public void shouldMatchSnapshotFive() {
4949
expectedException.expect(SnapshotMatchException.class);
5050
expectedException.expectMessage(startsWith("Error on: \n" +
51-
"io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotFive=["));
51+
"io.github.jsonSnapshot.SnapshotIntegrationTest.shouldMatchSnapshotFive=["));
5252
expect(FakeObject.builder().id("anyId5").value(6).name("anyName5").build()).toMatchSnapshot();
5353
}
5454
}

src/test/java/io/github/jsonSnapshot/SnapshotIntegrationTest.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotThree=[
1+
io.github.jsonSnapshot.SnapshotIntegrationTest.shouldMatchSnapshotThree=[
22
{
33
"id": "anyId3",
44
"value": 3,
@@ -7,7 +7,7 @@ io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotThree=[
77
]
88

99

10-
io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotFive=[
10+
io.github.jsonSnapshot.SnapshotIntegrationTest.shouldMatchSnapshotFive=[
1111
{
1212
"id": "anyId5",
1313
"value": 5,
@@ -16,7 +16,7 @@ io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotFive=[
1616
]
1717

1818

19-
io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotFour=[
19+
io.github.jsonSnapshot.SnapshotIntegrationTest.shouldMatchSnapshotFour=[
2020
{
2121
"id": "anyId4",
2222
"value": 4,
@@ -25,7 +25,7 @@ io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotFour=[
2525
]
2626

2727

28-
io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotOne=[
28+
io.github.jsonSnapshot.SnapshotIntegrationTest.shouldMatchSnapshotOne=[
2929
{
3030
"id": "anyId1",
3131
"value": 1,
@@ -34,7 +34,7 @@ io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotOne=[
3434
]
3535

3636

37-
io.github.jsonSnapshot.SnapshotIntegrationTest| with |shouldMatchSnapshotTwo=[
37+
io.github.jsonSnapshot.SnapshotIntegrationTest.shouldMatchSnapshotTwo=[
3838
{
3939
"id": "anyId2",
4040
"value": 2,

src/test/java/io/github/jsonSnapshot/SnapshotMatcherTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void should1ShowSnapshotSuccessfully() throws IOException {
4141
SnapshotMatcher.expect("any type of object").toMatchSnapshot();
4242

4343
assertThat(StringUtils.join(Files.readAllLines(f.toPath()), "\n")).
44-
isEqualTo("io.github.jsonSnapshot.SnapshotMatcherTest| with |should1ShowSnapshotSuccessfully=[\n" +
44+
isEqualTo("io.github.jsonSnapshot.SnapshotMatcherTest.should1ShowSnapshotSuccessfully=[\n" +
4545
" \"any type of object\"\n" +
4646
"]");
4747

@@ -58,10 +58,10 @@ public void should2SecondSnapshotExecutionSuccessfully() throws IOException {
5858
SnapshotMatcher.expect("any second type of object", "any third type of object").toMatchSnapshot();
5959

6060
assertThat(StringUtils.join(Files.readAllLines(f.toPath()), "\n")).
61-
isEqualTo("io.github.jsonSnapshot.SnapshotMatcherTest| with |should1ShowSnapshotSuccessfully=[\n" +
61+
isEqualTo("io.github.jsonSnapshot.SnapshotMatcherTest.should1ShowSnapshotSuccessfully=[\n" +
6262
" \"any type of object\"\n" +
6363
"]\n\n\n" +
64-
"io.github.jsonSnapshot.SnapshotMatcherTest| with |should2SecondSnapshotExecutionSuccessfully=[\n" +
64+
"io.github.jsonSnapshot.SnapshotMatcherTest.should2SecondSnapshotExecutionSuccessfully=[\n" +
6565
" \"any second type of object\",\n" +
6666
" \"any third type of object\"\n" +
6767
"]");

src/test/java/io/github/jsonSnapshot/SnapshotTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
public class SnapshotTest {
1616

1717
private static final String FILE_PATH = "src/test/java/anyFilePath";
18-
private static final String SNAPSHOT_NAME = "java.lang.String| with |toString=";
19-
private static final String SNAPSHOT = "java.lang.String| with |toString=[\n \"anyObject\"\n]";
18+
private static final String SNAPSHOT_NAME = "java.lang.String.toString=";
19+
private static final String SNAPSHOT = "java.lang.String.toString=[\n \"anyObject\"\n]";
2020

2121
private SnapshotFile snapshotFile;
2222

0 commit comments

Comments
 (0)