|
|
|
@ -38,16 +38,15 @@ import static org.junit.Assert.assertNotNull; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* A unit test class to test the MediaScannerService. |
|
|
|
|
* |
|
|
|
|
* <p> |
|
|
|
|
* This class uses the Spring application context configuration present in the |
|
|
|
|
* /org/libresonic/player/service/mediaScannerServiceTestCase/ directory. |
|
|
|
|
* |
|
|
|
|
* <p> |
|
|
|
|
* The media library is found in the /MEDIAS directory. |
|
|
|
|
* It is composed of 2 musicFolders (Music and Music2) and several little weight audio files. |
|
|
|
|
* |
|
|
|
|
* <p> |
|
|
|
|
* At runtime, the subsonic_home dir is set to target/test-classes/org/libresonic/player/service/mediaScannerServiceTestCase. |
|
|
|
|
* An empty database is created on the fly. |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
@ContextConfiguration(locations = { |
|
|
|
|
"/applicationContext-service.xml", |
|
|
|
@ -60,6 +59,7 @@ public class MediaScannerServiceTestCase { |
|
|
|
|
@ClassRule |
|
|
|
|
public static final SpringClassRule classRule = new SpringClassRule() { |
|
|
|
|
LibresonicHomeRule libresonicRule = new LibresonicHomeRule(); |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Statement apply(Statement base, Description description) { |
|
|
|
|
Statement spring = super.apply(base, description); |
|
|
|
|