Пример #1
0
        public async Task SetBingPhotoOfTheDayAsWalpaper_ShouldThrowNotSupportedException()
        {
            //Arrange
            _osManagerMock.Setup(s => s.DoesOsSupportWallpaperChange()).Returns(false);

            //Act
            //Assert
            await Assert.ThrowsExceptionAsync <NotSupportedException>(async() => await _serviceUnderTest.SetBingPhotoOfTheDayAsWallpaper());
        }
Пример #2
0
        public async Task GetUserGroupIds_GraphServiceClientIsNull_ThrowsArgumentNullException()
        {
            // Arrange
            var azureRepository = new AzureAdRepository();

            // Act
            await Assert.ThrowsExceptionAsync <ArgumentNullException>(
                // Act
                () => azureRepository.GetUserGroupsIds(null, "test"));
        }
Пример #3
0
        public async Task GetGroup_UserGroupIdsIsNull_ThrowsArgumentNullException()
        {
            // Arrange
            var azureRepository = new AzureAdRepository();

            // Act
            await Assert.ThrowsExceptionAsync <ArgumentNullException>(
                // Act
                () => azureRepository.GetGroup(null));
        }
Пример #4
0
        public async Task GetUserPhoto_UserGroupIdsIsNull_ThrowsArgumentNullException()
        {
            // Arrange
            var azureRepository = new AzureAdRepository();
            var client          = await MicrosoftGraphClient.GetGraphServiceClient();


            // Act
            await Assert.ThrowsExceptionAsync <ArgumentNullException>(
                // Act
                () => azureRepository.GetUserGroupsIds(client, null));
        }