示例#1
0
        public void ValidateForwardClientCallFalse()
        {
            ManagementTestClient client       = InstrumentClient(new ManagementTestClient());
            TestResource         testResource = client.GetTestResource();

            Assert.AreEqual("TestResourceProxy", testResource.GetType().Name);
            var ex = Assert.ThrowsAsync <InvalidOperationException>(async() => testResource = await testResource.GetForwardsCallFalseAsync());

            Assert.AreEqual(ex.Message, "Expected some diagnostic scopes to be created, found none");
        }
示例#2
0
        public void ValidateForwardClientCallFalse()
        {
            ManagementTestClient client       = InstrumentClient(new ManagementTestClient());
            TestResource         testResource = client.GetTestResource();

            Assert.AreEqual("TestResourceProxy", testResource.GetType().Name);
            var ex = Assert.ThrowsAsync <InvalidOperationException>(async() => testResource = await testResource.GetForwardsCallFalseAsync());

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