Beispiel #1
0
        public void ProjectHasToBeAddedSuccessfully()
        {
            var createRequest = _fixture.Create <CreateProjectRequest>();

            _projectProvider.CreateProject(createRequest);

            _projectRepository.Verify(
                repo => repo.SaveProject(It.Is <Project>(
                                             project => project.Name == createRequest.Name ||
                                             project.Info == createRequest.Info ||
                                             project.AccessLevel == createRequest.AccessLevel ||
                                             project.LandingImage.BigPhotoUri == createRequest.LandingImage.BigPhotoUri)),
                Times.Once);

            _eventBus.Verify(mock => mock.PublishEvent(
                                 "Notification", "new_project_created",
                                 It.IsAny <NewProjectCreated>()), Times.Once);
        }