public When_Employer_Details_Submitted_Invalid_Phone_Min_Digits() { var employerService = Substitute.For <IEmployerService>(); var opportunityService = Substitute.For <IOpportunityService>(); var referralService = Substitute.For <IReferralService>(); var viewModel = new EmployerDetailsViewModel { Phone = "1" }; var config = new MapperConfiguration(c => c.AddMaps(typeof(EmployerMapper).Assembly)); var mapper = new Mapper(config); _employerController = new EmployerController(employerService, opportunityService, referralService, mapper); _result = _employerController.SaveOpportunityEmployerDetailsAsync(viewModel).GetAwaiter().GetResult(); }