public void GetSpeciesObservationChangeBirdRingingCentre() { Boolean areMoreSpeciesObservationsAvailable; ConnectorServer connectorServer = new ConnectorServer(); DateTime changedFrom = new DateTime(2000, 1, 1); DateTime changedTo = changedFrom; GbifConnector connector = new BirdRingingCentreConnector(); 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 GetSpeciesObservationCountBirdRingingCentre() { GbifConnector connector = new BirdRingingCentreConnector(); Int64 speciesObservationCount; speciesObservationCount = connector.GetSpeciesObservationCount(); Assert.AreNotEqual(speciesObservationCount, -1); Debug.WriteLine("Bird Ringing Centre (GBIF), total number of species observations are " + speciesObservationCount); }
public void GetSpeciesObservationDataProviderBirdRingingCentre() { GbifConnector connector = new BirdRingingCentreConnector(); WebSpeciesObservationDataProvider dataProvider; dataProvider = connector.GetSpeciesObservationDataProvider(GetContext()); Assert.IsNotNull(dataProvider); Assert.AreEqual(dataProvider.Id, (Int32)(SpeciesObservationDataProviderId.BirdRingingCentre)); }
public void GetPageCountBirdRingingCentre() { GbifConnector connector = new BirdRingingCentreConnector(); Int64 pageCount, speciesObservationCount; speciesObservationCount = connector.GetSpeciesObservationCount(); Assert.IsTrue(0 < speciesObservationCount); Debug.WriteLine("Bird Ringing Centre (GBIF), total number of species observations is " + speciesObservationCount); pageCount = connector.GetPageCount(speciesObservationCount); Assert.IsTrue(0 < pageCount); Debug.WriteLine("Bird Ringing Centre (GBIF), total number of pages is " + pageCount); }