Example #1
0
 public void GetAsync_ReturnsNull_WhenPrimaryKeyDoesNotMatchRow()
 {
     using (var dbContext = new EntityDbContext())
     {
         var entity = dbContext.GetAsync <User>(int.MaxValue).Result;
         entity.ShouldBeNull();
     }
 }
Example #2
0
 public void GetAsync_ThrowsArgumentNullException_WhenFirstKeyValueArgumentIsNull()
 {
     using (var dbContext = new EntityDbContext())
     {
         var exception = Assert.Throws <ArgumentNullException>(() => dbContext.GetAsync <User>(null).Result);
         exception.ShouldNotBeNull();
         exception.ParamName.ShouldEqual("firstKeyValue");
     }
 }