示例#1
0
        public void GetExpiryDate_null()
        {
            PimsLease lease = new PimsLease()
            {
                OrigExpiryDate = null, PimsLeaseTerms = null
            };

            Assert.Null(lease.GetExpiryDate());
        }
示例#2
0
        public void GetExpiryDate_OrigExpiry()
        {
            DateTime  now   = DateTime.Now;
            PimsLease lease = new PimsLease()
            {
                OrigExpiryDate = now, PimsLeaseTerms = null
            };

            Assert.Equal(now, lease.GetExpiryDate());
        }
示例#3
0
        public void GetExpiryDate_TermExpiry()
        {
            DateTime  now   = DateTime.Now;
            PimsLease lease = new PimsLease()
            {
                OrigExpiryDate = null, PimsLeaseTerms = new List <PimsLeaseTerm>()
                {
                    new PimsLeaseTerm()
                    {
                        TermExpiryDate = now
                    }
                }
            };

            Assert.Equal(now, lease.GetExpiryDate());
        }
示例#4
0
        public void GetExpiryDate_OrigExpiryLater()
        {
            DateTime  now   = DateTime.Now;
            DateTime  later = now.AddDays(1);
            PimsLease lease = new PimsLease()
            {
                OrigExpiryDate = later, PimsLeaseTerms = new List <PimsLeaseTerm>()
                {
                    new PimsLeaseTerm()
                    {
                        TermExpiryDate = now
                    }
                }
            };

            Assert.Equal(later, lease.GetExpiryDate());
        }