Exemple #1
0
        public void TestFor_Valid_SearchUser()
        {
            //Arrange
            List <User> userlist = new List <User>();

            userlist.Add(user);

            // Action
            var gotUserlist = Advertiser_Service.SearchUser(user);

            //Assert
            Assert.Equal(userlist, gotUserlist);
        }
Exemple #2
0
        public void ExceptionTestFor_SearchingAnUser()
        {
            User user = new User
            {
                Id           = 100,
                UserName     = "******",
                Age          = 25,
                Location     = "Delhi",
                FamilyStatus = "",
                Gender       = "Female",
                Password     = "******",
                Interest     = "",
            };
            //Assert
            var ex = Assert.Throws <UserNotFoundException>(() => Advertiser_Service.SearchUser(user));

            Assert.Equal("User Not Found", ex.Messages);
        }