Beispiel #1
0
        public async Task Has_No_Spaces_By_Default()
        {
            var listSpacesPresenter = new ListSpacesPresenter();
            var useCase             = new Application.UseCases.ListSpaces(listSpacesPresenter, _spaceService);

            var input = new ListSpacesInput();
            await useCase.Execute(input);

            var output = listSpacesPresenter.ListedSpaces.Single().ExistingSpaces;

            Assert.Empty(output.GetSpaceNames());
        }
Beispiel #2
0
        public async Task Lists_Single_Space()
        {
            await _spaceRepository.Add(new Space(new SpaceName("hello")));

            var listSpacesPresenter = new ListSpacesPresenter();
            var useCase             = new Application.UseCases.ListSpaces(listSpacesPresenter, _spaceService);

            var input = new ListSpacesInput();
            await useCase.Execute(input);

            var output = listSpacesPresenter.ListedSpaces.Single().ExistingSpaces;

            Assert.Equal(output.GetSpaceNames(), new List <SpaceName> {
                new SpaceName("hello")
            });
        }