public void GetNearbySprydZone_Success()
        {
            dal.AddSprydZone(new SprydZone("", new Beacon()
            {
                TechnicalId = "1"
            }));
            dal.AddSprydZone(new SprydZone("", new Beacon()
            {
                TechnicalId = "2"
            }));
            dal.AddSprydZone(new SprydZone("", new Beacon()
            {
                TechnicalId = "3"
            }));

            var listNearbyZone = sprydZoneController.GetNearbySprydZones(new string[] { "1", "3" });

            Assert.AreEqual(2, listNearbyZone.Count);
        }
Ejemplo n.º 2
0
        public void CreateSession_Success()
        {
            dal.AddUser(new User());           // id = 1
            dal.AddSprydZone(new SprydZone()); // id = 1
            UserSession newSessionParameters = new UserSession()
            {
                UserId    = 1,
                SessionId = 1,
                Session   = new Session()
                {
                    SprydZoneId = 1
                }
            };

            Session newSession = sessionController.AddSession(newSessionParameters);

            Assert.AreEqual(dal.GetSessionById(1), newSession);
            Assert.AreEqual(dal.GetSessionAllUsers(newSession.Id).First().Id, 1);
        }