public void RandomPwdGeneratorTest5() { try { RandomPwdGenerator ngpwd = new RandomPwdGenerator(); AnalyzePassword napw = new AnalyzePassword(ngpwd.getRandomPwd()); } catch (ErrorLogPassContent e) { Assert.Fail("Generated PWD in not acceptable"); } catch (Exception) { Assert.Fail("Unspecified error happened"); } }
public void AnalyPwdTest1_correct1() { try { AnalyzePassword ap = new AnalyzePassword("passWord1_"); } catch (ErrorLogPassContent e) { if (e.getMessage() != "") { Assert.Fail("Wrong error is given"); } } catch (Exception e) { Assert.Fail("Unexpected error is given"); } }
/// <summary> /// analyze the written password difficulty /// </summary> /// <returns>true = good / false = problematic</returns> public bool needRewisePasswordByUser() { try { controlAnalizePwdContent = new AnalyzePassword(txtbPwdNew.Text); return(false); } catch (ErrorLogPassContent) { return(true); } catch (Exception e) { handleError("Ismertlen hiba történt (ContrPersPwdAnaly) " + e.Message); return(true); } }
public void AnalyPwdTest5_noPassword() { try { AnalyzePassword ap = new AnalyzePassword(""); Assert.Fail("Failure is not recognised"); } catch (ErrorLogPassContent e) { if (e.getMessage() != "Nem adott meg jelszót, kérem írja be!") { Assert.Fail("Wrong error is given"); } } catch (Exception e) { Assert.Fail("Unexpected error is given"); } }
public void AnalyPwdTest4_shortButGood2() { try { AnalyzePassword ap = new AnalyzePassword("w0Rd&"); Assert.Fail("Failure is not recognised"); } catch (ErrorLogPassContent e) { if (e.getMessage() != "A jelszó túl rövid, hogy megfelelő legyen") { Assert.Fail("Wrong error is given"); } } catch (Exception e) { Assert.Fail("Unexpected error is given"); } }
public void AnalyPwdTest12_noSpec2() { try { AnalyzePassword ap = new AnalyzePassword("pAssword9"); Assert.Fail("Wrong error is given"); } catch (ErrorLogPassContent e) { if (e.getMessage() != "A jelszóban nincs speciális karakter") { Assert.Fail("Wrong error is given"); } } catch (Exception e) { Assert.Fail("Unexpected error is given"); } }
public void AnalyPwdTest11_noLowercase2() { try { AnalyzePassword ap = new AnalyzePassword("PAS5/WORD"); Assert.Fail("Wrong error is given"); } catch (ErrorLogPassContent e) { if (e.getMessage() != "A jelszóban nincs kisbetűs karatker") { Assert.Fail("Wrong error is given"); } } catch (Exception e) { Assert.Fail("Unexpected error is given"); } }
public void AnalyPwdTest9_noUppercase2() { try { AnalyzePassword ap = new AnalyzePassword("pas5_word"); Assert.Fail("Wrong error is given"); } catch (ErrorLogPassContent e) { if (e.getMessage() != "A jelszóban nincs nagybetűs karakter") { Assert.Fail("Wrong error is given"); } } catch (Exception e) { Assert.Fail("Unexpected error is given"); } }
public void AnalyPwdTest7_noDigit2() { try { AnalyzePassword ap = new AnalyzePassword("*passWord"); Assert.Fail("Wrong error is given"); } catch (ErrorLogPassContent e) { if (e.getMessage() != "A jelszóban nincs számkarakter") { Assert.Fail("Wrong error is given"); } } catch (Exception e) { Assert.Fail("Unexpected error is given"); } }
public void reviseTheAutenticityOfUserNPwd(string givenName, string givenPwd) { analyzeUsName = new AnalyzeUsername(givenName); analyzeUsPassw = new AnalyzePassword(givenPwd); }