public void UpdateLocationFailed() { int id = 100; Location location = new Location { Longitude = 32.43543m, Latitude = 14.32456m, Active = true }; Location updatedLocation = LocationDB.UpdateLocation(location, id); Assert.IsNull(updatedLocation); }
public void UpdateLocationSuccess() { int id = LocationDB.GetLocations(active)[0].Id; Location location = new Location { Longitude = 32.43543m, Latitude = 14.32456m, Active = true }; Location localLocation = LocationDB.GetLocation(id); location.Longitude = localLocation.Longitude; location.Latitude = localLocation.Latitude; LocationDB.UpdateLocation(location, id); Location updatedLocation = LocationDB.GetLocation(id); Assert.AreEqual(updatedLocation.Longitude, location.Longitude); }
public Location UpdateLocation(Location location, int id) { return(LocationDB.UpdateLocation(location, id)); }