18
18
*/
19
19
package org .neo4j .driver .internal ;
20
20
21
- import org .junit .Test ;
21
+ import org .junit .jupiter . api . Test ;
22
22
23
23
import java .util .Collections ;
24
24
import java .util .HashMap ;
29
29
30
30
import static java .util .Arrays .asList ;
31
31
import static java .util .Collections .emptyMap ;
32
- import static org .junit .Assert .assertEquals ;
33
- import static org .junit .Assert .assertFalse ;
34
- import static org .junit .Assert .assertNull ;
35
- import static org .junit .Assert .assertTrue ;
32
+ import static org .junit .jupiter . api . Assertions .assertEquals ;
33
+ import static org .junit .jupiter . api . Assertions .assertFalse ;
34
+ import static org .junit .jupiter . api . Assertions .assertNull ;
35
+ import static org .junit .jupiter . api . Assertions .assertTrue ;
36
36
import static org .neo4j .driver .v1 .Values .value ;
37
37
38
- public class BookmarkTest
38
+ class BookmarkTest
39
39
{
40
40
@ Test
41
- public void isEmptyForEmptyBookmark ()
41
+ void isEmptyForEmptyBookmark ()
42
42
{
43
43
Bookmark bookmark = Bookmark .empty ();
44
44
assertTrue ( bookmark .isEmpty () );
45
45
}
46
46
47
47
@ Test
48
- public void maxBookmarkAsStringForEmptyBookmark ()
48
+ void maxBookmarkAsStringForEmptyBookmark ()
49
49
{
50
50
Bookmark bookmark = Bookmark .empty ();
51
51
assertNull ( bookmark .maxBookmarkAsString () );
52
52
}
53
53
54
54
@ Test
55
- public void asBeginTransactionParametersForEmptyBookmark ()
55
+ void asBeginTransactionParametersForEmptyBookmark ()
56
56
{
57
57
Bookmark bookmark = Bookmark .empty ();
58
58
assertEquals ( emptyMap (), bookmark .asBeginTransactionParameters () );
59
59
}
60
60
61
61
@ Test
62
- public void isEmptyForNonEmptyBookmark ()
62
+ void isEmptyForNonEmptyBookmark ()
63
63
{
64
64
Bookmark bookmark = Bookmark .from ( "SomeBookmark" );
65
65
assertFalse ( bookmark .isEmpty () );
66
66
}
67
67
68
68
@ Test
69
- public void maxBookmarkAsStringForNonEmptyBookmark ()
69
+ void maxBookmarkAsStringForNonEmptyBookmark ()
70
70
{
71
71
Bookmark bookmark = Bookmark .from ( "SomeBookmark" );
72
72
assertEquals ( "SomeBookmark" , bookmark .maxBookmarkAsString () );
73
73
}
74
74
75
75
@ Test
76
- public void asBeginTransactionParametersForNonEmptyBookmark ()
76
+ void asBeginTransactionParametersForNonEmptyBookmark ()
77
77
{
78
78
Bookmark bookmark = Bookmark .from ( "SomeBookmark" );
79
79
verifyParameters ( bookmark , "SomeBookmark" , "SomeBookmark" );
80
80
}
81
81
82
82
@ Test
83
- public void bookmarkFromString ()
83
+ void bookmarkFromString ()
84
84
{
85
85
Bookmark bookmark = Bookmark .from ( "Cat" );
86
86
assertEquals ( "Cat" , bookmark .maxBookmarkAsString () );
87
87
verifyParameters ( bookmark , "Cat" , "Cat" );
88
88
}
89
89
90
90
@ Test
91
- public void bookmarkFromNullString ()
91
+ void bookmarkFromNullString ()
92
92
{
93
93
Bookmark bookmark = Bookmark .from ( (String ) null );
94
94
assertTrue ( bookmark .isEmpty () );
95
95
}
96
96
97
97
@ Test
98
- public void bookmarkFromIterable ()
98
+ void bookmarkFromIterable ()
99
99
{
100
100
Bookmark bookmark = Bookmark .from ( asList (
101
101
"neo4j:bookmark:v1:tx42" , "neo4j:bookmark:v1:tx10" , "neo4j:bookmark:v1:tx12" ) );
@@ -106,21 +106,21 @@ public void bookmarkFromIterable()
106
106
}
107
107
108
108
@ Test
109
- public void bookmarkFromNullIterable ()
109
+ void bookmarkFromNullIterable ()
110
110
{
111
111
Bookmark bookmark = Bookmark .from ( (Iterable <String >) null );
112
112
assertTrue ( bookmark .isEmpty () );
113
113
}
114
114
115
115
@ Test
116
- public void bookmarkFromEmptyIterable ()
116
+ void bookmarkFromEmptyIterable ()
117
117
{
118
118
Bookmark bookmark = Bookmark .from ( Collections .<String >emptyList () );
119
119
assertTrue ( bookmark .isEmpty () );
120
120
}
121
121
122
122
@ Test
123
- public void asBeginTransactionParametersForBookmarkWithInvalidValue ()
123
+ void asBeginTransactionParametersForBookmarkWithInvalidValue ()
124
124
{
125
125
Bookmark bookmark = Bookmark .from ( asList (
126
126
"neo4j:bookmark:v1:tx1" , "neo4j:bookmark:v1:txcat" , "neo4j:bookmark:v1:tx3" ) );
@@ -131,7 +131,7 @@ public void asBeginTransactionParametersForBookmarkWithInvalidValue()
131
131
}
132
132
133
133
@ Test
134
- public void asBeginTransactionParametersForBookmarkWithEmptyStringValue ()
134
+ void asBeginTransactionParametersForBookmarkWithEmptyStringValue ()
135
135
{
136
136
Bookmark bookmark = Bookmark .from ( asList ( "neo4j:bookmark:v1:tx9" , "" , "neo4j:bookmark:v1:tx3" ) );
137
137
assertEquals ( "neo4j:bookmark:v1:tx9" , bookmark .maxBookmarkAsString () );
@@ -141,7 +141,7 @@ public void asBeginTransactionParametersForBookmarkWithEmptyStringValue()
141
141
}
142
142
143
143
@ Test
144
- public void asBeginTransactionParametersForBookmarkWithNullValue ()
144
+ void asBeginTransactionParametersForBookmarkWithNullValue ()
145
145
{
146
146
Bookmark bookmark = Bookmark .from ( asList ( "neo4j:bookmark:v1:tx41" , null , "neo4j:bookmark:v1:tx42" ) );
147
147
assertEquals ( "neo4j:bookmark:v1:tx42" , bookmark .maxBookmarkAsString () );
0 commit comments