public void setter_with_primitive_happy_path() { var instance = new ConfiguredInstance(typeof(ColorRule)) .Ctor <string>("color").Is("Red").Setter <int>("Age").Is(34); IConfiguredInstance configuredInstance = instance; configuredInstance.Dependencies.Get("color").ShouldBe("Red"); configuredInstance.Dependencies.Get("Age").ShouldBe(34); instance.Ctor <string>("color").Is("Blue"); configuredInstance.Dependencies.Get("color").ShouldBe("Blue"); }
public void setter_with_primitive_happy_path() { ConfiguredInstance instance = new ConfiguredInstance(typeof(ColorRule)) .Ctor <string>("color").Is("Red").Setter <int>("Age").Is(34); IConfiguredInstance configuredInstance = instance; Assert.AreEqual("Red", configuredInstance.GetProperty("color")); Assert.AreEqual("34", configuredInstance.GetProperty("Age")); instance.Ctor <string>("color").Is("Blue"); Assert.AreEqual("Blue", configuredInstance.GetProperty("color")); }