Пример #1
0
        public void RegisterUser_Invalid_Isnull()
        {
            //Arrange
            UserService userService = new UserService(mockRepository.Object);
            User Result;

            //Act
            Result = userService.RegisterUser("", "123");

            //Assert
        }
Пример #2
0
        public void RegisterUser_Valid_IsNotNull()
        {
            //Arrange
            UserService userService = new UserService(mockRepository.Object);
            User Result;

            //Act
            Result = userService.RegisterUser("SampleName", "123");

            //Assert
            Assert.IsNotNull(Result);
        }
Пример #3
0
        public void RegisterUser_Valid_RegistrationShould()
        {
            //Arrange

            UserService userService = new UserService(mockRepository.Object);

            //Act
            var Result = userService.RegisterUser("SampleUser", "123");

            //Assert
            mockRepository.Verify(x => x.Login(It.IsAny<string>(), It.IsAny<string>()));
        }