Example #1
0
        public void NullRoleInstance()
        {
            var item               = new RequestTelemetry();
            var extractor          = new CloudRoleInstanceDimensionExtractor();
            var extractedDimension = extractor.ExtractDimension(item);

            Assert.IsNull(extractedDimension);
        }
Example #2
0
        public void RoleInstance()
        {
            var item = new RequestTelemetry();

            item.Context.Cloud.RoleInstance = "ExpectedRoleInstance";
            var extractor          = new CloudRoleInstanceDimensionExtractor();
            var extractedDimension = extractor.ExtractDimension(item);

            Assert.AreEqual("ExpectedRoleInstance", extractedDimension);
        }
Example #3
0
        public void EmptyRoleInstance()
        {
            var item = new RequestTelemetry();

            item.Context.Cloud.RoleInstance = string.Empty;
            var extractor          = new CloudRoleInstanceDimensionExtractor();
            var extractedDimension = extractor.ExtractDimension(item);

            Assert.IsNull(extractedDimension);
        }