示例#1
0
 public void It_handles_out_of_range_dates()
 {
     var lowDate = new Purchase
         {
             PartitionKey = TestPartition,
             RowKey = "DateOutOfRange",
             Purchased = DateTime.Parse("Dec 31, 1600 23:59:00 GMT", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal)
         };
     Context.Set<Purchase>().Add(lowDate);
     Assert.Throws<DbUpdateException>(() => Context.SaveChanges());
 }
示例#2
0
 protected bool Equals(Purchase other)
 {
     // intentionally leaves out Timestamp (changed by server)
     return string.Equals(PartitionKey, other.PartitionKey) && string.Equals(RowKey, other.RowKey) && Cost.Equals(other.Cost) && string.Equals(Name, other.Name) && Purchased.Equals(other.Purchased) && Count == other.Count && GlobalGuid.Equals(other.GlobalGuid) && Awesomeness.Equals(other.Awesomeness);
 }
示例#3
0
 protected bool Equals(Purchase other)
 {
     // intentionally leaves out Timestamp (changed by server)
     return(string.Equals(PartitionKey, other.PartitionKey) && string.Equals(RowKey, other.RowKey) && Cost.Equals(other.Cost) && string.Equals(Name, other.Name) && Purchased.Equals(other.Purchased) && Count == other.Count && GlobalGuid.Equals(other.GlobalGuid) && Awesomeness.Equals(other.Awesomeness));
 }