コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public Location UpdateLocation(Location location, int id)
 {
     return(LocationDB.UpdateLocation(location, id));
 }