Beispiel #1
0
        public void Match_PassesOnCorrectValues()
        {
            var target = new NameValuePairConstraints();

            var pair = new NameValuePair {
                Name = RandomGenerator.RandomString(), Value = RandomGenerator.RandomString()
            };

            Assert.AreEqual(pair, target.Match(pair));
        }
Beispiel #2
0
        public void Match_ThrowsOnIncorrectValue()
        {
            var target = new NameValuePairConstraints();

            var pair = new NameValuePair
            {
                Name  = RandomGenerator.RandomString(),
                Value = RandomGenerator.RandomStringExtended()
            };

            Assert.ThrowsException <ValueException>(() => target.Match(pair));
        }