Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
e3eeb003
Commit
e3eeb003
authored
Dec 20, 2017
by
Geoffrey Métais
Browse files
Unit test for Util.insertOrUdpate()
parent
a6b454e6
Changes
1
Show whitespace changes
Inline
Side-by-side
vlc-android/test/org/videolan/vlc/util/UtilTest.java
0 → 100644
View file @
e3eeb003
package
org.videolan.vlc.util
;
import
org.junit.Test
;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
public
class
UtilTest
{
@Test
public
void
testInsertOrUdpate
()
{
String
a
=
"a"
;
String
b
=
"b"
;
String
c
=
"c"
;
String
b2
=
new
String
(
b
);
List
<
String
>
list
=
new
ArrayList
<>();
list
.
add
(
a
);
list
.
add
(
b
);
String
[]
items
=
{
c
,
b2
};
Util
.
insertOrUdpate
(
list
,
items
);
assertEquals
(
list
.
get
(
1
),
b2
);
assertEquals
(
b
,
b2
);
assertEquals
(
true
,
list
.
get
(
1
)
==
b2
);
assertEquals
(
list
.
get
(
2
),
c
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment