Last change
on this file was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
773 bytes
|
Rev | Line | |
---|
[96] | 1 | package com.framsticks.core; |
---|
| 2 | |
---|
| 3 | import java.io.InputStream; |
---|
| 4 | |
---|
| 5 | import org.testng.annotations.Test; |
---|
| 6 | |
---|
| 7 | import com.framsticks.core.Framsticks; |
---|
| 8 | import com.framsticks.test.MonitorBasedTest; |
---|
| 9 | import com.framsticks.util.dispatching.Joinable; |
---|
| 10 | |
---|
| 11 | // import static org.fest.assertions.Assertions.*; |
---|
| 12 | |
---|
| 13 | @Test |
---|
| 14 | public abstract class XmlBasedTest extends MonitorBasedTest { |
---|
| 15 | |
---|
| 16 | protected Framsticks framsticks; |
---|
| 17 | |
---|
| 18 | @Override |
---|
| 19 | protected Joinable createSubject() { |
---|
| 20 | framsticks = Framsticks.loadConfiguration(getConfigurationStream()); |
---|
| 21 | return framsticks; |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | protected InputStream getConfigurationStream() { |
---|
| 25 | return XmlBasedTest.class.getResourceAsStream("/configs/" + getConfigurationName()); |
---|
| 26 | } |
---|
| 27 | |
---|
[101] | 28 | protected String getConfigurationName() { |
---|
| 29 | return this.getClass().getSimpleName() + ".xml"; |
---|
| 30 | } |
---|
[96] | 31 | |
---|
| 32 | |
---|
| 33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.