public void should_return_casted_parameter(int intValue, double doubleValue, string stringValue) { var collection = new UrlParametersCollection { { "int", intValue }, { "double", doubleValue }, { "string", stringValue } }; collection.Get <int>("int").ShouldBe(intValue); collection.Get <double>("double").ShouldBe(doubleValue); collection.Get <string>("string").ShouldBe(stringValue); }
public void should_return_parameter(string key, object value) { var collection = new UrlParametersCollection { { key, value } }; var item1 = collection[key]; var item2 = collection.Get(key); item1.ShouldNotBeNull(); item2.ShouldNotBeNull(); item1.ShouldBe(item2); item1.ShouldBe(value); item2.ShouldBe(value); }