public void AnalyUsNameTest2_correct2() { try { AnalyzeUsername an = new AnalyzeUsername("nagiva13"); } catch (ErrorLogUsernameFormat e) { Assert.Fail("Unexpected format-error appeared"); } catch (Exception e) { Assert.Fail("Unspecified error type appeard"); } }
public void AnalyUsNameTest5_withSpace1() { try { AnalyzeUsername an = new AnalyzeUsername("gal pe02"); Assert.Fail("No error appeard, finds correct the bad one"); } catch (ErrorLogUsernameFormat e) { if (e.getMessage() != "A felhasználónév szóközt tartalmaz") { Assert.Fail("Unexpected format-error appeared"); } } catch (Exception e) { Assert.Fail("Unspecified error type appeard"); } }
public void AnalyUsNameTest4_nonumber2() { try { AnalyzeUsername an = new AnalyzeUsername("galpeter"); Assert.Fail("No error appeard, finds correct the bad one"); } catch (ErrorLogUsernameFormat e) { if (e.getMessage() != "A felhasználónév végén nincs meg a két számkarater") { Assert.Fail("Unexpected format-error appeared"); } } catch (Exception e) { Assert.Fail("Unspecified error type appeard"); } }
public void AnalyUsNameTest6_tooShort2() { try { AnalyzeUsername an = new AnalyzeUsername("ivanov"); Assert.Fail("No error appeard, finds correct the bad one"); } catch (ErrorLogUsernameFormat e) { if (e.getMessage() != "Ez túl rövid, hogy felhasználónév legyen") { Assert.Fail("Unexpected format-error appeared"); } } catch (Exception e) { Assert.Fail("Unspecified error type appeard"); } }
public void reviseTheAutenticityOfUserNPwd(string givenName, string givenPwd) { analyzeUsName = new AnalyzeUsername(givenName); analyzeUsPassw = new AnalyzePassword(givenPwd); }