public void GetSpeciesObservationChangeEntomologicalCollections() { Boolean areMoreSpeciesObservationsAvailable; ConnectorServer connectorServer = new ConnectorServer(); DateTime changedFrom = new DateTime(2000, 1, 1); DateTime changedTo = changedFrom; GbifConnector connector = new EntomologicalCollectionsConnector(); List <HarvestMapping> mappings; List <WebSpeciesObservationFieldDescriptionExtended> fieldDescriptions; WebSpeciesObservationDataProvider dataProvider; dataProvider = connector.GetSpeciesObservationDataProvider(GetContext()); fieldDescriptions = WebServiceData.MetadataManager.GetSpeciesObservationFieldDescriptionsExtended(GetContext()); mappings = HarvestManager.CreateMappingList(fieldDescriptions, dataProvider.Id); try { GetContext().GetSpeciesObservationDatabase().SetMaxChangeId(dataProvider.Id, dataProvider.MaxChangeId - 1); GetContext().GetSpeciesObservationDatabase().EmptyTempTables(); areMoreSpeciesObservationsAvailable = connector.GetSpeciesObservationChange(changedFrom, changedTo, mappings, GetContext(), connectorServer); Assert.IsFalse(areMoreSpeciesObservationsAvailable); } catch (Exception) { GetContext().GetSpeciesObservationDatabase().SetMaxChangeId(dataProvider.Id, dataProvider.MaxChangeId); throw; } }
public void GetSpeciesObservationDataProviderEntomologicalCollections() { GbifConnector connector = new EntomologicalCollectionsConnector(); WebSpeciesObservationDataProvider dataProvider; dataProvider = connector.GetSpeciesObservationDataProvider(GetContext()); Assert.IsNotNull(dataProvider); Assert.AreEqual(dataProvider.Id, (Int32)(SpeciesObservationDataProviderId.EntomologicalCollections)); }