Skip to content

Commit 5589d57

Browse files
committed
Add test for BytesLocation#setName()
1 parent 412cf74 commit 5589d57

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/java/org/scijava/io/location/BytesLocationTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,16 @@ public void testBytesOffsetLength() {
7272
assertArrayEquals(expectedDigits, testDigits);
7373
}
7474

75+
@Test
76+
public void getNameTest() {
77+
78+
final BytesLocation loc1 = new BytesLocation(0);
79+
assertEquals(loc1.defaultName(), loc1.getName());
80+
81+
final BytesLocation loc2 = new BytesLocation(0);
82+
final String expectedName = "test.name";
83+
loc2.setName(expectedName);
84+
assertEquals(expectedName, loc2.getName());
85+
}
86+
7587
}

0 commit comments

Comments
 (0)