public When_OpportunityProximity_Controller_Index_Is_Loaded() { var proximityOpportunityService = Substitute.For <IOpportunityProximityService>(); var locationService = Substitute.For <ILocationService>(); var routeService = Substitute.For <IRoutePathService>(); _opportunityService = Substitute.For <IOpportunityService>(); var opportunityProximityController = new OpportunityProximityController(routeService, proximityOpportunityService, _opportunityService, locationService); _result = opportunityProximityController.Index().GetAwaiter().GetResult(); }
public When_OpportunityProximity_Controller_Index_Is_Loaded_With_Opportunity() { var locationService = Substitute.For <ILocationService>(); var opportunityProximityService = Substitute.For <IOpportunityProximityService>(); var routeService = Substitute.For <IRoutePathService>(); _opportunityService = Substitute.For <IOpportunityService>(); _opportunityService .GetCompanyNameWithAkaAsync(1) .Returns("CompanyName (AlsoKnownAs)"); var opportunityProximityController = new OpportunityProximityController(routeService, opportunityProximityService, _opportunityService, locationService); _result = opportunityProximityController.Index(1).GetAwaiter().GetResult(); }