public async Task AddBuildToProject_ReturnsCreatedBuild() { var projectId = _fixture.Create <int>(); var build = _fixture.Create <Models.BuildConfig>(); var commandController = new CommandProcessor(); commandController.CiDashboardService = this.ciDashboardService; var result = await commandController.AddBuildConfigToProject(projectId, build); A.CallTo(() => this.ciDashboardService .AddBuildConfigToProject(projectId, A <BuildConfig> .That.Matches(p => p.Name == build.Name))) .MustHaveHappened(); result.Should() .NotBeNull() .And.BeOfType <Models.BuildConfig>(); }