public async Task ShouldGetClientApplicationTypes(bool hasClientApplicationTypes)
        {
            var applicationTypes = hasClientApplicationTypes
                ? new HashSet <string> {
                "browser-based", "native-desktop"
            }
                : null;

            mockMediator
            .Setup(m => m.Send(
                       It.Is <GetClientApplicationBySolutionIdQuery>(q => q.Id == SolutionId),
                       It.IsAny <CancellationToken>()))
            .ReturnsAsync(Mock.Of <IClientApplication>(c => c.ClientApplicationTypes == applicationTypes));

            var result = await clientApplicationTypeController.GetClientApplicationTypesAsync(SolutionId) as ObjectResult;

            Assert.NotNull(result);
            result.StatusCode.Should().Be(StatusCodes.Status200OK);

            result.Value.Should().BeOfType <GetClientApplicationTypesResult>();
            result.Value.As <GetClientApplicationTypesResult>().ClientApplicationTypes.Should().BeEquivalentTo(
                hasClientApplicationTypes ? new HashSet <string> {
                "browser-based", "native-desktop"
            } : new HashSet <string>());

            mockMediator.Verify(m => m.Send(
                                    It.Is <GetClientApplicationBySolutionIdQuery>(q => q.Id == SolutionId),
                                    It.IsAny <CancellationToken>()));
        }
        public async Task ShouldGetClientApplicationTypes(bool hasClientApplicationTypes)
        {
            var applicationTypes = hasClientApplicationTypes
                ? new HashSet <string> {
                "browser-based", "native-desktop"
            }
                : null;

            _mockMediator.Setup(m => m.Send(It.Is <GetClientApplicationBySolutionIdQuery>(q => q.Id == SolutionId), It.IsAny <CancellationToken>()))
            .ReturnsAsync(Mock.Of <IClientApplication>(c =>
                                                       c.ClientApplicationTypes == applicationTypes));

            var result = (await _clientApplicationTypeController.GetClientApplicationTypesAsync(SolutionId).ConfigureAwait(false)) as ObjectResult;

            result.StatusCode.Should().Be((int)HttpStatusCode.OK);
            (result.Value as GetClientApplicationTypesResult).ClientApplicationTypes.Should().BeEquivalentTo(hasClientApplicationTypes ? (new HashSet <string> {
                "browser-based", "native-desktop"
            }) : new HashSet <string>());

            _mockMediator.Verify(m => m.Send(It.Is <GetClientApplicationBySolutionIdQuery>(q => q.Id == SolutionId), It.IsAny <CancellationToken>()), Times.Once);
        }