public void pUserID_Test_GetUsrID() { // Step 1 - Arrange SimpleAddSubtractToolTest SimpASClass = new SimpleAddSubtractToolTest(); // Step 2 - Act // 1=Get UsrID,2=SysAdmin string pUsrIdRetVal = SimpASClass.pUserID(1, 2); // Step 3 - Assert string expected = "egEmpty"; Assert.AreEqual(expected, pUsrIdRetVal, "User Returned NOT egEmpty" + "[" + pUsrIdRetVal + "]."); }
public void pUserID_Test_SetUsrID() { // Step 1 - Arrange SimpleAddSubtractToolTest SimpASClass = new SimpleAddSubtractToolTest(); // Step 2 - Act // 2=Set UsrID,2=SysAdmin,"Bobby.Smith"=UserID to set string pUsrIdRetVal = SimpASClass.pUserID(2, 2, "Bobby.Smith"); // Step 3 - Assert string expected = "UsrID Set"; Assert.AreEqual(expected, pUsrIdRetVal, "E9001:User NOT set" + "[" + pUsrIdRetVal + "]."); }
public void pUserID_Test_InvalidParms() { // Step 1 - Arrange SimpleAddSubtractToolTest SimpASClass = new SimpleAddSubtractToolTest(); // Step 2 - Act // Junk Parms (9,9) // string pUsrIdRetVal = SimpASClass.pUserID (9,9); // Get User ID (1), no Access Auth=0 // string pUsrIdRetVal = SimpASClass.pUserID (1,0); // Get User ID(1), Access Auth=5 (Registred User) string pUsrIdRetVal = SimpASClass.pUserID(1, (int)usrAuth.usrAuthRegUsr); string pUsrIdRetValEcode = pUsrIdRetVal.Substring(0, 5); // Step 3 - Assert string expected = "M9008"; Assert.AreEqual(expected, pUsrIdRetValEcode, "Value returned " + "[" + pUsrIdRetVal + "]."); }