コード例 #1
0
        public void ContainsValidatesArguments()
        {
            var dimensions   = new Dictionary <string, string>();
            var dimensionKey = new DimensionKey(dimensions);

            Assert.That(() => dimensionKey.Contains(null), Throws.ArgumentNullException);
            Assert.That(() => dimensionKey.Contains(""), Throws.ArgumentException);
        }
コード例 #2
0
        public void ContainsChecksDimensions()
        {
            var dimensions = new Dictionary <string, string>()
            {
                { "name", "value" }
            };
            var dimensionKey = new DimensionKey(dimensions);

            Assert.That(dimensionKey.Contains("name"));
            Assert.That(dimensionKey.Contains("otherName"), Is.False);
        }