Ejemplo n.º 1
0
 public void CreateLocationShouldCreateLocation()
 {
     using (var context = new Entity.StoreDBContext(options))
     {
         IStoreRepository _repo = new StoreRepoDB(context, new StoreMapper());
         _repo.CreateLocation
         (
             new Model.Location
         {
             LocationName    = "Mandrakes R US",
             LocationAddress = "69 Floral Dr."
         }
         );
     }
     using (var assertContext = new Entity.StoreDBContext(options))
     {
         var result = assertContext.Locations.FirstOrDefault(location => location.LocationName == "Mandrakes R US");
         Assert.NotNull(result);
         Assert.Equal("Mandrakes R US", result.LocationName);
     }
 }