public void get_parameters_from_property() { var arg = new RouteArgument("Key", 0); arg.MapToProperty <InputModel>(x => x.Color); arg.ReadRouteDataFromInput(new InputModel { Color = Color.Blue }) .ShouldBe("Blue"); }
public void write_value_to_property() { var arg = new RouteArgument("Color", 2); arg.MapToProperty <InputModel>(x => x.Color); var model = new InputModel(); var dict = new Dictionary <string, object>(); dict.Add("Color", Color.Yellow); arg.ApplyRouteDataToInput(model, dict); model.Color.ShouldBe(Color.Yellow); }