public CheckModel ProcceedBackgroundCheck(CheckRequest model) { var checkModel = new CheckModel(model); checkModel.SSN = SSN.FromString(model.SSN); checkModel.CrimeRecords = model.LastName.EndsWith("Clear") ? new List <string>(0) : new List <string>(new string[] { "crime reco 1", "crime reco 2", "crime reco 3", "crime reco 4" }); return(checkModel); }
public void Setup() { // init and set up mocks _checkServiceMock = new Mock <ICheckService>(); var checkRequest = GetCheckRequest(); var checkModel = new CheckModel(checkRequest); checkModel.SSN = SSN.FromString(checkRequest.SSN); _checkServiceMock .Setup(x => x.ProcceedBackgroundCheck(It.IsAny <CheckRequest>())) .Returns(checkModel); _controller = new CheckController(_checkServiceMock.Object); }
public void ProcceedBackgroundCheck_SSNAssign_Success(string ssnNumber) { var ssnExpected = SSN.FromString(ssnNumber); var model = new CheckRequest { FirstName = "Yevhen", LastName = "Skrypnyk", DateOfBirth = new DateTime(2002, 10, 10), SSN = ssnNumber }; var result = _service.ProcceedBackgroundCheck(model); Assert.NotNull(result); Assert.AreEqual(ssnExpected, result.SSN); }