Example #1
0
 private void Cleanup()
 {
     foreach (int item in recycleBin)
     {
         CustomerInfo.GetByID(item).Delete();
     }
 }
Example #2
0
        public void Entity_CrudEntity_GetByKey()
        {
            var dbCustomer = new CustomerInfo();
            var lastKey    = TypeExtension.DefaultGuid;

            Entity_CrudEntity_Create();
            lastKey = CustomerInfo.GetByID(recycleBin.Last()).Key;

            dbCustomer = CustomerInfo.GetByKey(lastKey);
            Assert.IsTrue(dbCustomer.ID != TypeExtension.DefaultInteger);
            Assert.IsTrue(dbCustomer.Key != TypeExtension.DefaultGuid);
            Assert.IsTrue(dbCustomer.CreatedDate.Date == DateTime.UtcNow.Date);
        }