Search in sources :

Example 1 with CollectTestSurveyContext

use of org.openforis.collect.model.CollectTestSurveyContext in project collect by openforis.

the class DistanceCheckTest method setup.

@Before
public void setup() {
    CollectTestSurveyContext surveyContext = (CollectTestSurveyContext) record.getSurveyContext();
    surveyContext.lookupProvider.coordinate = TEST_COORDINATE;
    surveyContext.lookupProvider.samplingPointData = TEST_SAMPLING_POINT_DATA;
}
Also used : CollectTestSurveyContext(org.openforis.collect.model.CollectTestSurveyContext) Before(org.junit.Before)

Example 2 with CollectTestSurveyContext

use of org.openforis.collect.model.CollectTestSurveyContext in project collect by openforis.

the class AbstractTest method setUp.

@BeforeClass
public static void setUp() throws IOException, XmlParseException, IdmlParseException {
    URL idm = AbstractTest.class.getResource("/test.idm.xml");
    InputStream is = idm.openStream();
    SurveyIdmlBinder binder = new SurveyIdmlBinder(new CollectTestSurveyContext());
    survey = (CollectSurvey) binder.unmarshal(is);
}
Also used : CollectTestSurveyContext(org.openforis.collect.model.CollectTestSurveyContext) InputStream(java.io.InputStream) SurveyIdmlBinder(org.openforis.idm.metamodel.xml.SurveyIdmlBinder) URL(java.net.URL) BeforeClass(org.junit.BeforeClass)

Example 3 with CollectTestSurveyContext

use of org.openforis.collect.model.CollectTestSurveyContext in project collect by openforis.

the class CollectLookupFunctionTest method setup.

@Before
public void setup() {
    CollectTestSurveyContext surveyContext = (CollectTestSurveyContext) record.getSurveyContext();
    surveyContext.lookupProvider.coordinate = TEST_COORDINATE;
    expressionEvaluator = surveyContext.getExpressionEvaluator();
}
Also used : CollectTestSurveyContext(org.openforis.collect.model.CollectTestSurveyContext) Before(org.junit.Before)

Aggregations

CollectTestSurveyContext (org.openforis.collect.model.CollectTestSurveyContext)3 Before (org.junit.Before)2 InputStream (java.io.InputStream)1 URL (java.net.URL)1 BeforeClass (org.junit.BeforeClass)1 SurveyIdmlBinder (org.openforis.idm.metamodel.xml.SurveyIdmlBinder)1