import static org.junit.Assume.assumeTrue;
import java.io.File;
-import java.nio.channels.FileChannel;
+import java.io.FilenameFilter;
import java.util.Map;
import java.util.Set;
fixture.setPacketContext(new StructDeclaration(1L));
fixture.setEventHeader(new StructDeclaration(1L));
fixture.setId(1L);
- fixture.addInput(new StreamInput(new Stream(testTrace.getTrace()),
- (FileChannel) null, new File("")));
+ fixture.addInput(new StreamInput(new Stream(testTrace.getTrace()), createFile()));
+ }
+
+ private static File createFile() {
+ File path = new File(testTrace.getPath());
+ return path.listFiles(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ if (name.contains("hann")) {
+ return true;
+ }
+ return false;
+ }
+ })[0];
}
/**
}
/**
- * Run the void addEvent(EventDeclaration) method test with the basic
- * event.
+ * Run the void addEvent(EventDeclaration) method test with the basic event.
+ *
* @throws ParseException
*/
@Test
public void testEventContextIsSet() {
assertTrue(fixture.isEventContextSet());
}
+
/**
* Run the boolean eventContextIsSet() method test.
*/
assertTrue(result);
}
-
/**
* Run the void setEventContext(StructDeclaration) method test.
*/