public void GetSpeciesObservationChangeUme() { Boolean areMoreSpeciesObservationsAvailable; ConnectorServer connectorServer = new ConnectorServer(); DateTime changedFrom = new DateTime(2000, 1, 1); DateTime changedTo = changedFrom; GbifConnector connector = new HerbariumOfUmeaUniversityConnector(); 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 GetSpeciesObservationDataProviderUme() { GbifConnector connector = new HerbariumOfUmeaUniversityConnector(); WebSpeciesObservationDataProvider dataProvider; dataProvider = connector.GetSpeciesObservationDataProvider(GetContext()); Assert.IsNotNull(dataProvider); Assert.AreEqual(dataProvider.Id, (Int32)(SpeciesObservationDataProviderId.HerbariumOfUmeaUniversity)); }