public void RemoveTest() { SessionLocationService.Remove(Session.Id, Location.Id); var removed = SessionLocationService.GetFromIdPair(Session.Id, Location.Id); Assert.AreEqual(removed.Id, -1); }
public SessionLocationServiceTest() { TecAppContext = new TecAppContext(); SessionService = new SessionService.SessionService(TecAppContext); LocationService = new LocationService.LocationService(TecAppContext); SessionLocationService = new SessionLocationService(TecAppContext); }
public void AddTest() { var random = new Random(); Session = SessionService.GetAllSessions()[random.Next(100)]; Location = LocationService.GetAllLocations()[random.Next(100)]; SessionLocation = SessionLocationService.Add(new Session_Location() { Session = Session, SessionId = Session.Id, Location = Location, LocationId = Location.Id }); }
public void GetTest() { var added = SessionLocationService.GetFromIdPair(Session.Id, Location.Id); Assert.AreEqual(added.Id, SessionLocation.Id); }