public void ProfileTest_Return_Applicant_Role_using_GeneralMethod() { //Arrange string action = "UserRole"; string userid = "antonim03"; Profile parameter = new Profile() { Operate = action, SchoolYear = "20192020", ProfileType = action, CheckValue = userid }; // Act string expect = "Roster"; string result = GeneralExe <string> .myValueOfT("Profile", parameter); /* * parameter.ProfileType = "CPNum"; * int cpnum = GeneralExe<int>.myValueOfT("Profile", parameter); * parameter.ProfileType = "StartDate"; * DateTime startDate = GeneralExe<DateTime>.myValueOfT("Profile", parameter); */ //Assert Assert.AreEqual(expect, result, $" User Role is { result} from User ID: { userid } "); }
public void TeacherNameTest_using_GeneralMethod_Return_Name_byGiveingCPNum() { //Arrange string action = "TeacherName"; string intitalValue = "00045299"; // "CPNum"; var myAnonymousParametere = new { CPNum = intitalValue, Operate = "Name" }; var testTextControl = new System.Web.UI.WebControls.TextBox(); // Act string expect = "Cassandra Kurnik"; testTextControl.Text = GeneralExe <string> .myValueOfT(action, myAnonymousParametere); string result = testTextControl.Text; // Assert Assert.AreEqual(expect, result, $"Teacher Name is { result} from CPNum {intitalValue} "); }