Exemplo n.º 1
0
        public async Task DeleteCredentialThrowsIfIdMissing()
        {
            object errorResponse = null;
            var    contextMock   = RequestContextMocks.Create <bool>(null).AddErrorHandling((msg, code) => errorResponse = msg);

            // Verify throws with no ID
            await service.HandleDeleteCredentialRequest(new Credential(), contextMock.Object);

            TestUtils.VerifyErrorSent(contextMock);
            Assert.True(((string)errorResponse).Contains("ArgumentException"));
        }