Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite GetBinaryStore to reach into the Modeshape runningState to pu…
…ll out the BinaryStore instance
- Loading branch information
Showing
6 changed files
with
43 additions
and
44 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
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
33 changes: 0 additions & 33 deletions
33
fcrepo-kernel/src/test/java/org/fcrepo/services/functions/GetBinaryStoreTest.java
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
fcrepo-kernel/src/test/java/org/modeshape/jcr/GetBinaryStoreIT.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,35 @@ | ||
|
||
package org.modeshape.jcr; | ||
|
||
import static org.hamcrest.CoreMatchers.instanceOf; | ||
import static org.junit.Assert.assertThat; | ||
import javax.inject.Inject; | ||
import javax.jcr.RepositoryException; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.modeshape.jcr.GetBinaryStore; | ||
import org.modeshape.jcr.value.binary.BinaryStore; | ||
import org.modeshape.jcr.value.binary.TransientBinaryStore; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; | ||
|
||
|
||
@RunWith(SpringJUnit4ClassRunner.class) | ||
@ContextConfiguration({"/spring-test/repo.xml"}) | ||
public class GetBinaryStoreIT { | ||
|
||
@Inject | ||
javax.jcr.Repository repo; | ||
|
||
@Test | ||
public void testApply() throws RepositoryException { | ||
final GetBinaryStore testObj = new GetBinaryStore(); | ||
|
||
final BinaryStore binaryStore = testObj.apply(repo); | ||
|
||
assertThat(binaryStore, instanceOf(TransientBinaryStore.class)); | ||
|
||
} | ||
|
||
} |