Exemple #1
0
        public void RemoveTest()
        {
            SessionLocationService.Remove(Session.Id, Location.Id);
            var removed = SessionLocationService.GetFromIdPair(Session.Id, Location.Id);

            Assert.AreEqual(removed.Id, -1);
        }
Exemple #2
0
 public SessionLocationServiceTest()
 {
     TecAppContext          = new TecAppContext();
     SessionService         = new SessionService.SessionService(TecAppContext);
     LocationService        = new LocationService.LocationService(TecAppContext);
     SessionLocationService = new SessionLocationService(TecAppContext);
 }
Exemple #3
0
        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
            });
        }
Exemple #4
0
        public void GetTest()
        {
            var added = SessionLocationService.GetFromIdPair(Session.Id, Location.Id);

            Assert.AreEqual(added.Id, SessionLocation.Id);
        }