You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
1.1 KiB

package com.sothr.imagetools.engine
/**
* Basic Test of the engines
*
* Created by drew on 1/26/14.
*/
class EngineTest extends BaseTest{
test("SequentialEngine Test getImagesForDirectory for sample directory") {
val engine:Engine = new SequentialEngine()
assertResult(3) { engine.getImagesForDirectory("sample").length }
}
test("SequentialEngine Test getSimilarImagesForDirectory for sample directory") {
val engine = new SequentialEngine()
val similarImages = engine.getSimilarImagesForDirectory("sample")
assertResult(1) { similarImages.length }
assertResult(2) { similarImages(0).similarImages.length }
}
test("ConcurrentEngine Test getImagesForDirectory for sample directory") {
val engine:Engine = new ConcurrentEngine()
assertResult(3) { engine.getImagesForDirectory("sample").length }
}
test("ConcurrentEngine Test getSimilarImagesForDirectory for sample directory") {
val engine = new ConcurrentEngine()
val similarImages = engine.getSimilarImagesForDirectory("sample")
assertResult(1) { similarImages.length }
assertResult(2) { similarImages(0).similarImages.length }
}
}