public void CreateFraud_Fraud_GetFraudId() { //arrange String claimId = "200002020654"; FraudRequest fraudRequest = new FraudRequest(); fraudRequest.deviceType = "1"; fraudRequest.acctStatus = "ACCT_IS_OPEN"; fraudRequest.reportDate = "2017-02-11"; fraudRequest.fraudType = "00"; fraudRequest.subType = "K"; fraudRequest.cvcInvalidIndicator = "Y"; fraudRequest.chgbkIndicator = "1"; apiController.Setup(f => f.Create <FraudResponse>(It.IsAny <long>(), It.IsAny <String>(), fraudRequest)) .Returns(new FraudResponse() { fraudId = "300002292548" }); //act Fraud fraudData = new Fraud(apiController.Object); String result = fraudData.CreateForMasterCard(0, claimId, fraudRequest); //assert Assert.That(result, Is.EqualTo("300002292548")); }
public void CreateFraud_Fraud_GetFraudId() { // RequestMap map = new RequestMap(); //map.set("claim-id", "200002020654"); //Fraud response = Fraud.createForMasterCard(map); //out(response, "fraudId"); //-->300002292548 //arrange String claimId = "200002020654"; FraudRequest fraudRequest = new FraudRequest(); fraudRequest.deviceType = "1"; fraudRequest.acctStatus = "ACCT_IS_OPEN"; fraudRequest.reportDate = "2017-02-11"; fraudRequest.fraudType = "00"; fraudRequest.subType = "K"; fraudRequest.cvcInvalidIndicator = "Y"; fraudRequest.chgbkIndicator = "1"; //act Fraud fraudData = new Fraud(apiController); String result = fraudData.CreateForMasterCard(claimId, fraudRequest); //assert Assert.That(result, Is.EqualTo("300002292548")); }