Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
fcrepo-kernel/src/test/java/org/fcrepo/utils/EventTypeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.fcrepo.utils; | ||
|
||
import org.junit.Test; | ||
|
||
import javax.jcr.observation.Event; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class EventTypeTest { | ||
@Test | ||
public void testGetEventType() throws Exception { | ||
// assertEquals(javax.jcr.observation.Event.NODE_ADDED, EventType.getEventType(0x1)); | ||
} | ||
|
||
@Test | ||
public void testGetEventName() throws Exception { | ||
assertEquals("node added", EventType.getEventName(Event.NODE_ADDED)); | ||
assertEquals("node removed", EventType.getEventName(Event.NODE_REMOVED)); | ||
assertEquals("property added", EventType.getEventName(Event.PROPERTY_ADDED)); | ||
assertEquals("property removed", EventType.getEventName(Event.PROPERTY_REMOVED)); | ||
assertEquals("node moved", EventType.getEventName(Event.NODE_MOVED)); | ||
assertEquals("persist", EventType.getEventName(Event.PERSIST)); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
fcrepo-kernel/src/test/java/org/fcrepo/utils/FixityResultTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.fcrepo.utils; | ||
|
||
import org.junit.Test; | ||
|
||
import java.net.URI; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertNotEquals; | ||
|
||
public class FixityResultTest { | ||
@Test | ||
public void testEquals() throws Exception { | ||
|
||
assertEquals(new FixityResult(100L, new URI("urn:123")), new FixityResult(100L, new URI("urn:123"))); | ||
|
||
assertNotEquals(new FixityResult(99L, new URI("urn:123")), new FixityResult(100L, new URI("urn:123"))); | ||
|
||
assertNotEquals(new FixityResult(100L, new URI("urn:321")), new FixityResult(100L, new URI("urn:123"))); | ||
|
||
assertNotEquals(new FixityResult(99L, new URI("urn:321")), new FixityResult(100L, new URI("urn:123"))); | ||
} | ||
} |