示例#1
0
        public void Constructor()
        {
            TaxonRevisionEventList revisionEvent;

            revisionEvent = new TaxonRevisionEventList();
            Assert.IsNotNull(revisionEvent);
        }
示例#2
0
 private TaxonRevisionEventList GetRevisionEvent(Boolean refresh = false)
 {
     if (_revisionEvent.IsNull() || refresh)
     {
         _revisionEvent = new TaxonRevisionEventList();
         _revisionEvent.Add(RevisionEventTest.GetRevisionEvent(GetUserContext()));
     }
     return(_revisionEvent);
 }
示例#3
0
        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]);
            }
        }
示例#4
0
        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);
        }
示例#5
0
 public RevisionEventListTest()
 {
     _revisionEvent = null;
 }