Beispiel #1
0
        public async Task ProfileControllerAddProfileStatusCodeOnStorageErrors(HttpStatusCode statusCode)
        {
            profileStoreMock.Setup(store => store.AddProfile(_testUserProfile))
            .ThrowsAsync(new StorageErrorException("Test Exception", (int)statusCode));
            ChatServiceException e = await Assert.ThrowsAsync <ChatServiceException>(() => chatServiceClient.AddProfile(_testUserProfile));

            Assert.Equal(statusCode, e.StatusCode);
        }