public void Length_6_returned1() { //arrange string password = "******"; int expected = 1; //1-number //act int actual = PasswordStrengthCheker.GetPasswordStrength(password); //assert Assert.AreEqual(expected, actual); }
public void Length_5_returned3() { //arrange string password = "******"; int expected = 3; //1-uppercase, 2-number, 3-lowercase //act int actual = PasswordStrengthCheker.GetPasswordStrength(password); //assert Assert.AreEqual(expected, actual); }
public void Length_8_returned5() { //arrange string password = "******"; int expected = 5; //all options //act int actual = PasswordStrengthCheker.GetPasswordStrength(password); //assert Assert.AreEqual(expected, actual); }
public void GetPasswordStrength_AllCahrs_5Points() { // arrange string password = "******"; int expected = 5; // act int actual = PasswordStrengthCheker.GetPasswordStrength(password); // assert Assert.Equal(expected, actual); }
public void GetPasswordStrength_UpperCase_3Points() { // Arrange string password = "******"; int expected = 3; // верхний регистр 1, за длину строки 1, за нижний регистр 1 // Act int actual = PasswordStrengthCheker.GetPasswordStrength(password); // Assert Assert.Equal(expected, actual); }
public void GetPasswordStrength_Empty_0Points() { // arrange string password = ""; int expected = 0; // act int actual = PasswordStrengthCheker.GetPasswordStrength(password); // assert Assert.AreEqual(expected, actual); }
public void GetPasswordStrength_ContainsSpecialChar_Hash_5Points() { // Arrange string password = "******"; // верхний регистр 1, за длину строки 1, за нижний регистр 1 // число 1, специальный символ 1 int expected = 5; // Act int actual = PasswordStrengthCheker.GetPasswordStrength(password); // Assert Assert.Equal(expected, actual); }
public void GetPasswordStrength_ConteinsNumber_1_4Points() { // Arrange string password = "******"; // верхний регистр 1, за длину строки 1, за нижний регистр 1 // число 1 int expected = 4; // Act int actual = PasswordStrengthCheker.GetPasswordStrength(password); // Assert Assert.Equal(expected, actual); }