示例#1
0
        public void MergeWithFirstNullAndSecondValue()
        {
            NameValueCollection actual = NameValueCollectionUtility.Merge(null, _collection);

            Assert.That(actual, Is.Not.Null);
            Assert.That(ReferenceEquals(_collection, actual), Is.False);
            Assert.That(actual.Count, Is.EqualTo(3));

            Assert.That(actual.GetKey(0), Is.EqualTo("FirstKey"));
            Assert.That(actual.GetKey(1), Is.EqualTo("SecondKey"));
            Assert.That(actual.GetKey(2), Is.EqualTo("ThirdKey"));

            Assert.That(actual["FirstKey"], Is.EqualTo("FirstValue"));
            Assert.That(actual["SecondKey"], Is.EqualTo("SecondValue"));
            Assert.That(actual["ThirdKey"], Is.EqualTo("ThirdValue,Other ThirdValue"));
        }
示例#2
0
 public void MergeWithFirstNullAndSecondNull()
 {
     Assert.That(NameValueCollectionUtility.Merge(null, null), Is.Null);
 }