Пример #1
0
        public void ThrowsWhenNoDiagnosticScope()
        {
            InvalidDiagnosticScopeTestClient client = InstrumentClient(new InvalidDiagnosticScopeTestClient());
            InvalidOperationException        ex     = Assert.ThrowsAsync <InvalidOperationException>(async() => await client.NoScopeAsync());

            StringAssert.Contains("Expected some diagnostic event to fire", ex.Message);
        }
        public void ThrowsWhenNoDiagnosticScope()
        {
            InvalidDiagnosticScopeTestClient client = InstrumentClient(new InvalidDiagnosticScopeTestClient());
            InvalidOperationException        ex     = Assert.ThrowsAsync <InvalidOperationException>(async() => await client.NoScopeAsync());

            StringAssert.Contains("Expected some diagnostic scopes to be created other than the Azure.Core scopes", ex.Message);
        }