public void should_ignore_keys_not_starting_with_fchoice() { var source = new NameValueCollection { { "fchoice.key1", "source" } }; var target = new NameValueCollection { { "dovetail.key2", "target" }, { "another.key2", "target" } }; var result = ClarifyApplicationFactory.MergeSDKSettings(source, target); result.Count.ShouldEqual(1); }
public void should_not_modify_inputted_settings() { var source = new NameValueCollection { { "fchoice.key1", "source" } }; var target = new NameValueCollection { { "fchoice.key2", "target" } }; ClarifyApplicationFactory.MergeSDKSettings(source, target); source.Count.ShouldEqual(1); target.Count.ShouldEqual(1); }
public void should_not_override_existing_settings() { var source = new NameValueCollection { { "fchoice.dbtype", "source-type" } }; var target = new NameValueCollection { { "fchoice.dbtype", "target-type" } }; var result = ClarifyApplicationFactory.MergeSDKSettings(source, target); result.Count.ShouldEqual(1); result["fchoice.dbtype"].ShouldEqual("source-type"); }
public void should_add_new_keys_to_result_settings() { var source = new NameValueCollection { { "fchoice.key1", "source" } }; var target = new NameValueCollection { { "fchoice.key2", "target" } }; var result = ClarifyApplicationFactory.MergeSDKSettings(source, target); result.Count.ShouldEqual(2); result["fchoice.key1"].ShouldEqual("source"); result["fchoice.key2"].ShouldEqual("target"); }