Ejemplo n.º 1
0
        public void ShouldGetSession()
        {
            //arrange
            var user    = GenerateUser();
            var session = GenerateSession(user.Id);

            //act
            var dataLayer = new DataLayer.Sql.DataLayer(ConnectionSql);

            dataLayer.AddUser(user);
            session.UserId = user.Id;

            session = dataLayer.AddSession(session);

            var resSession = dataLayer.GetSession(session.Id);

            //assert
            Assert.AreEqual(resSession.Id, session.Id);
        }