public void DictionaryInterface() { // Arrange DictionaryHelper<Type, IModelBinder> helper = new DictionaryHelper<Type, IModelBinder>() { Creator = () => new ModelBinderDictionary(), SampleKeys = new Type[] { typeof(object), typeof(string), typeof(int), typeof(long), typeof(long) }, SampleValues = new IModelBinder[] { new DefaultModelBinder(), new DefaultModelBinder(), new DefaultModelBinder(), new DefaultModelBinder(), new DefaultModelBinder() }, ThrowOnKeyNotFound = false }; // Act & assert helper.Execute(); }
public void DictionaryInterface() { // Arrange DictionaryHelper<string, object> helper = new DictionaryHelper<string, object>() { Creator = () => new ViewDataDictionary(), Comparer = StringComparer.OrdinalIgnoreCase, SampleKeys = new string[] { "foo", "bar", "baz", "quux", "QUUX" }, SampleValues = new object[] { 42, "string value", new DateTime(2001, 1, 1), new object(), 32m }, ThrowOnKeyNotFound = false }; // Act & assert helper.Execute(); }
public void DictionaryInterface() { // Arrange DictionaryHelper <string, object> helper = new DictionaryHelper <string, object>() { Creator = () => new ViewDataDictionary(), Comparer = StringComparer.OrdinalIgnoreCase, SampleKeys = new string[] { "foo", "bar", "baz", "quux", "QUUX" }, SampleValues = new object[] { 42, "string value", new DateTime(2001, 1, 1), new object(), 32m }, ThrowOnKeyNotFound = false }; // Act & assert helper.Execute(); }
public void DictionaryInterface() { // Arrange DictionaryHelper <string, ModelState> helper = new DictionaryHelper <string, ModelState>() { Creator = () => new ModelStateDictionary(), Comparer = StringComparer.OrdinalIgnoreCase, SampleKeys = new string[] { "foo", "bar", "baz", "quux", "QUUX" }, SampleValues = new ModelState[] { new ModelState(), new ModelState(), new ModelState(), new ModelState(), new ModelState() }, ThrowOnKeyNotFound = false }; // Act & assert helper.Execute(); }
public void DictionaryInterface() { // Arrange DictionaryHelper<string, ValueProviderResult> helper = new DictionaryHelper<string, ValueProviderResult>() { Creator = () => new ValueProviderDictionary(null), Comparer = StringComparer.OrdinalIgnoreCase, SampleKeys = new string[] { "foo", "bar", "baz", "quux", "QUUX" }, SampleValues = new ValueProviderResult[] { new ValueProviderResult(null, null, null), new ValueProviderResult(null, null, null), new ValueProviderResult(null, null, null), new ValueProviderResult(null, null, null), new ValueProviderResult(null, null, null) }, ThrowOnKeyNotFound = false }; // Act & assert helper.Execute(); }
public void DictionaryInterface() { // Arrange DictionaryHelper <string, ValueProviderResult> helper = new DictionaryHelper <string, ValueProviderResult>() { Creator = () => new ValueProviderDictionary(null), Comparer = StringComparer.OrdinalIgnoreCase, SampleKeys = new string[] { "foo", "bar", "baz", "quux", "QUUX" }, SampleValues = new ValueProviderResult[] { new ValueProviderResult(null, null, null), new ValueProviderResult(null, null, null), new ValueProviderResult(null, null, null), new ValueProviderResult(null, null, null), new ValueProviderResult(null, null, null) }, ThrowOnKeyNotFound = false }; // Act & assert helper.Execute(); }
public void DictionaryInterface() { // Arrange DictionaryHelper<string, ModelState> helper = new DictionaryHelper<string, ModelState>() { Creator = () => new ModelStateDictionary(), Comparer = StringComparer.OrdinalIgnoreCase, SampleKeys = new string[] { "foo", "bar", "baz", "quux", "QUUX" }, SampleValues = new ModelState[] { new ModelState(), new ModelState(), new ModelState(), new ModelState(), new ModelState() }, ThrowOnKeyNotFound = false }; // Act & assert helper.Execute(); }