public async Task CreateClasses_SendsInstructorsForSavingAsync() { //Given SaverStub saverStub = new SaverStub(); DataCreationUseCase useCase = GetUseCase(saverStub); //When await useCase.CreateClassesAsync(); //Then Assert.Equal(4, saverStub.Instructors.Count); }
public async Task CreateClasses_PersistsCreatedAssistantsAsync() { //Given SaverStub saverStub = new SaverStub(); DataCreationUseCase useCase = GetUseCase(saverStub); //When await useCase.CreateClassesAsync(); //Then Assert.Equal(8, saverStub.Assistants.Count); }
public async Task CreateClasses_CreatesDataStoreAsync() { //Given SaverStub saverStub = new SaverStub(); DataCreationUseCase useCase = GetUseCase(saverStub); //When await useCase.CreateClassesAsync(); //Then Assert.True(saverStub.DataSourceWasCreated); }
public async Task CreateClasses_PersistsCreatedEllCoachesAsync() { //Given SaverStub saverStub = new SaverStub(); DataCreationUseCase useCase = GetUseCase(saverStub); //When await useCase.CreateClassesAsync(); //Then Assert.Single(saverStub.EllCoaches); }
DataCreationUseCase GetUseCase(SaverStub saverStub) => new DataCreationUseCase(new SchoolClassBuilder(new ClassAssigner(new InstructorManager(), new CourseManager()), new PersonCreator(new BogusFabricator(), new InMemoryUserDataProvider()), new WidaTestBuilder(new TestAssigner(), new BogusFabricator()), new CourseManager(), new TestAssigner()), new FacultyExtractor(), saverStub);