public void Password_WrongStyle_Validation(string password) { // Arrange var authValidator = new AuthorizationDataValidator(); var exception = default(Exception); //Act try { authValidator.ValidatePassword(password); } catch (Exception e) { exception = e; } //Assert exception.Should().BeOfType <InvalidDataException>(); }
public void UserName_Pass_Validation(string userName) { // Arrange var authValidator = new AuthorizationDataValidator(); var exception = default(Exception); //Act try { authValidator.ValidateLogin(userName); } catch (Exception e) { exception = e; } //Assert exception.Should().BeNull(); }
public void UserName_Null_Check() { // Arrange var authValidator = new AuthorizationDataValidator(); var exception = default(Exception); //Act try { authValidator.ValidateLogin(null); } catch (Exception e) { exception = e; } //Assert exception.Should().BeOfType <ArgumentNullException>(); }
public void UserName_WrongStyle_Validation(string userName) { // Arrange var authValidator = new AuthorizationDataValidator(); var exception = default(Exception); //Act try { authValidator.ValidateLogin(userName); } catch (Exception e) { exception = e; } //Assert exception.Should().BeOfType <InvalidDataException>(); }