public void can_convert_namevaluecollection_to_lookup()
        {
            var collection = new NameValueCollection { { "question", "YES" } };

            var lookup = collection.ToLookup();

            Expect(lookup["question"], Is.EquivalentTo(new[] { "YES" }));
        }
        public void can_convert_namevaluecollection_with_multiple_values_to_lookup()
        {
            var collection = new NameValueCollection { { "question", "A" }, { "question", "B" }, { "question", "C" }, };

            var lookup = collection.ToLookup();

            Expect(lookup["question"], Is.EquivalentTo(new[] { "A", "B", "C", }));
        }
 public void ToLookup() {
     var a = new NameValueCollection {
         { "1", "one" },
         { "1", "uno" },
     };
     var l = a.ToLookup();
     Assert.AreEqual(1, l.Count);
     Assert.AreEqual(2, l["1"].Count());
     Assert.AreEqual(0, l["2"].Count());
 }