Exemplo n.º 1
0
        private void ValidateIncidentRootCause(IncidentRootCause rootCause)
        {
            Assert.That(rootCause, Is.Not.Null);
            Assert.That(rootCause.Description, Is.Not.Null.And.Not.Empty);
            Assert.That(rootCause.ContributionScore, Is.GreaterThan(0.0).And.LessThanOrEqualTo(1.0));

            foreach (string path in rootCause.Paths)
            {
                Assert.That(path, Is.Not.Null.And.Not.Empty);
            }

            ValidateSeriesKey(rootCause.SeriesKey);
        }
Exemplo n.º 2
0
        private void ValidateIncidentRootCause(IncidentRootCause rootCause)
        {
            Assert.That(rootCause, Is.Not.Null);
            Assert.That(rootCause.Description, Is.Not.Null.And.Not.Empty);
            Assert.That(rootCause.Score, Is.GreaterThan(0.0).And.LessThanOrEqualTo(1.0));

            foreach (string path in rootCause.Paths)
            {
                Assert.That(path, Is.Not.Null.And.Not.Empty);
            }

            Assert.That(rootCause.DimensionKey, Is.Not.Null);

            Dictionary <string, string> dimensionColumns = rootCause.DimensionKey.AsDictionary();

            Assert.That(dimensionColumns.Count, Is.EqualTo(2));
            Assert.That(dimensionColumns.ContainsKey("city"));
            Assert.That(dimensionColumns.ContainsKey("category"));

            Assert.That(dimensionColumns["city"], Is.Not.Null.And.Not.Empty);
            Assert.That(dimensionColumns["category"], Is.Not.Null.And.Not.Empty);
        }