Exemple #1
0
        public void ShouldAddUser()
        {
            //arrange
            var user = new Users
            {
                Name = Guid.NewGuid().ToString().Substring(10)
            };
            var dataLayer = new DataLayer.SQL.DataLayer(ConnectionString);

            //act
            user = dataLayer.AddUser(user);
            //asserts
            var resultUser = dataLayer.GetUser(user.Id);

            Assert.AreEqual(user.Name, resultUser.Name);
        }
Exemple #2
0
        public void ShouldAddUser()
        {
            // arrange
            var user = new User
            {
                NickName = "Test"
            };
            var dataLayer = new DataLayer.SQL.DataLayer(_connectionString);

            // act
            user = dataLayer.AddUser(user);
            // asserts
            var resultUser = dataLayer.GetUser(user.Id);

            Assert.AreEqual(user.NickName, resultUser.NickName);
        }