Ejemplo n.º 1
0
        public void AddUserBioField()
        {
            // Arrange
            var repo = new FakeTripRepository();

            //Act
            repo.AddUser(new User()
            {
                UserName  = "******",
                Password  = "******",
                FirstName = "Bernie",
                LastName  = "Doodle",
                Email     = "*****@*****.**",
                Bio       = "Ball is life"
            });
            //Assert
            Assert.Equal("Ball is life", repo.Users[0].Bio);
        }
Ejemplo n.º 2
0
        public void AddUserTestEmailField()
        {
            // Arrange
            var repo = new FakeTripRepository();

            //Act
            repo.AddUser(new User()
            {
                UserName  = "******",
                Password  = "******",
                FirstName = "Bernie",
                LastName  = "Doodle",
                Email     = "*****@*****.**",
                Bio       = "I am puppers it is time for suppers"
            });
            //Assert
            Assert.Equal("*****@*****.**", repo.Users[0].Email);
        }
Ejemplo n.º 3
0
        public void GetUserByUserName()
        {
            //Arrange
            FakeTripRepository repo = new FakeTripRepository();

            //Act
            repo.AddUser(new User()
            {
                UserName  = "******",
                Password  = "******",
                FirstName = "Bernie",
                LastName  = "Doodle",
                Email     = "*****@*****.**",
                Bio       = "Ball is life"
            });

            User user = repo.GetUserByUserName("BernieD");

            //Assert
            Assert.Equal("Bernie", user.FirstName);
        }