use of eu.europa.ec.fisheries.wsdl.asset.types.AssetIdType in project UVMS-Docker by UnionVMS.
the class AssetHistoryRestIT method getAssetFromAssetIdAndDate.
@Test
public void getAssetFromAssetIdAndDate() throws Exception {
try {
Date eventDate = null;
AssetHistoryId history = null;
// Create asset
Asset asset = AssetTestHelper.createCfrTestAsset();
history = asset.getEventHistory();
eventDate = history.getEventDate();
Thread.sleep(1000);
AssetIdType assetIdType = AssetIdType.CFR;
String value = asset.getCfr();
String type = assetIdType.value();
Asset fetchedAsset = AssetTestHelper.getAssetFromAssetIdAndDate(type, value, eventDate);
Assert.assertEquals(asset.getCfr(), fetchedAsset.getCfr());
} catch (RuntimeException e) {
System.out.println(e.toString());
}
}
Aggregations