public void GetLocationSuccess() { int id = LocationDB.GetLocations(active)[0].Id; Location location = LocationDB.GetLocation(id); Assert.IsNotNull(location); }
public void DeleteLocationFailed() { int numberOfOldLocations = LocationDB.GetLocations(active).Count; LocationDB.DeleteLocation(100); Assert.AreEqual(numberOfOldLocations, LocationDB.GetLocations(active).Count); }
public void DeleteLocationSuccess() { int id = LocationDB.GetLocations(active)[0].Id; LocationDB.DeleteLocation(id); Assert.AreEqual(LocationDB.GetLocation(id).Active, false); }
void AddAllLocations() { var setup = new GeofenceSetup(); foreach (Location location in LocationDB.GetLocations().Where(l => l.Active)) { setup.Monitor(location); } }
public void InsertLocationSuccess() { Location location = new Location { Longitude = 32.43543m, Latitude = 14.32456m, Active = true }; int oldNumberOfLocations = LocationDB.GetLocations(active).Count; LocationDB.InsertLocation(location); Assert.AreEqual(oldNumberOfLocations + 1, LocationDB.GetLocations(active).Count); }
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 void GetLocationsSuccess() { List <Location> locations = LocationDB.GetLocations(active); Assert.AreEqual(4, locations.Count); }
public IEnumerable <Location> GetAllLocations([FromUri] ActiveStatusEnum active = ActiveStatusEnum.Active) { return(LocationDB.GetLocations(active)); }