public void Constructor() { TaxonRevisionEventList revisionEvent; revisionEvent = new TaxonRevisionEventList(); Assert.IsNotNull(revisionEvent); }
private TaxonRevisionEventList GetRevisionEvent(Boolean refresh = false) { if (_revisionEvent.IsNull() || refresh) { _revisionEvent = new TaxonRevisionEventList(); _revisionEvent.Add(RevisionEventTest.GetRevisionEvent(GetUserContext())); } return(_revisionEvent); }
public void SquareBracketOperator() { TaxonRevisionEventList newRevisionEventList, oldRevisionEventList; Int32 taxonIndex; oldRevisionEventList = GetRevisionEvent(true); newRevisionEventList = new TaxonRevisionEventList(); for (taxonIndex = 0; taxonIndex < oldRevisionEventList.Count; taxonIndex++) { newRevisionEventList.Add(oldRevisionEventList[oldRevisionEventList.Count - taxonIndex - 1]); } for (taxonIndex = 0; taxonIndex < oldRevisionEventList.Count; taxonIndex++) { Assert.AreEqual(newRevisionEventList[taxonIndex], oldRevisionEventList[oldRevisionEventList.Count - taxonIndex - 1]); } }
public TaxonRevisionEventList GetTaxonRevisionEvents(IUserContext userContext, int taxonRevisionId) { TaxonRevisionEventList list = new TaxonRevisionEventList(); list.Add(new TaxonRevisionEvent() { Id = 22, CreatedBy = userContext.User.Id, RevisionId = GetReferenceRevision(userContext, DyntaxaTestSettings.Default.TestTaxonId, TaxonRevisionStateId.Ongoing.ToString()).Id, CreatedDate = new DateTime(2011), AffectedTaxa = "Delfiner", NewValue = "nya delfiner", OldValue = "gamla", Type = new TaxonRevisionEventType() { Description = "event", Id = 1, Identifier = "Identifier" } } ); return(list); }
public RevisionEventListTest() { _revisionEvent = null; }