public void Register_and_unregister_ok() { var customConverters = new CustomConverters(); customConverters.Register <string, Foo>(x => new Foo(Int32.Parse(x))); customConverters.Unregister <string, Foo>(); var comversion = customConverters.Find(new ConversionKey(typeof(string), typeof(Foo))); Assert.IsNull(comversion); }
public void Unregister_with_null_target_type_should_throw_exception() { var customConverters = new CustomConverters(); customConverters.Unregister(typeof(string), null); }
public void Unregister_with_null_source_type_should_throw_exception() { var customConverters = new CustomConverters(); customConverters.Unregister(null, typeof(Foo)); }
public void Register_and_unregister_ok() { var customConverters = new CustomConverters(); customConverters.Register<string, Foo>(x => new Foo(Int32.Parse(x))); customConverters.Unregister<string, Foo>(); var comversion = customConverters.Find(new ConversionKey(typeof(string), typeof(Foo))); Assert.IsNull(comversion); }