public static IProjectService Create(IProjectServices services = null) { var mock = new Mock <IProjectService>(); services = services ?? IProjectServicesFactory.Create(projectService: mock.Object); mock.Setup(p => p.Services) .Returns(services); return(mock.Object); }
public static IProjectCommonServices ImplementThreadingPolicy(IProjectThreadingService threadingPolicy) { var services = IProjectServicesFactory.Create(threadingPolicy); var projectService = IProjectServiceFactory.Create(services); var mock = new Mock <IProjectCommonServices>(); mock.SetupGet(s => s.ProjectService) .Returns(projectService); return(mock.Object); }