public void Authentication_HrApi_Pass_Return200() { //Arrage string empid = "TEST"; string password = "******"; HttpCallResult httpCallResult = new HttpCallResult { StatusCode = "200", FaultInfo = null, ReturnContent = "[{\"NAME_AC\": \"ESURENA RACHEL DOMINGUEZ\",\"Z_SITE_ID\": \"WIH\",\"status\": true}]" }; _restfulApiClient.Post(Arg.Any <string>(), Arg.Any <Dictionary <string, string> >(), Arg.Any <string>()).Returns(httpCallResult); HrIdentityResponse expectedResponse = new HrIdentityResponse { Name_Ac = "ESURENA RACHEL DOMINGUEZ", Z_Site_ID = "WIH", Status = true }; //Act HrIdentityResponse actualResponse = _targetObj.Authentication(empid, password); //Assert Assert.AreEqual(expectedResponse.Name_Ac, actualResponse.Name_Ac); Assert.AreEqual(expectedResponse.Z_Site_ID, actualResponse.Z_Site_ID); Assert.AreEqual(expectedResponse.Status, actualResponse.Status); }
public HrIdentityResponse IdentityByHr(string userId, string password) { return(_hrProxy.Authentication(userId, password)); }