public void TestBuildUpSimilarParams() { var container = new CryoContainer(); var val = new ClassWithSimilarParams(); container.BuildUp(val, new Param { Name = "Two", Value = 2 }, "Hello, world!", new Param("One", 1)); Assert.AreEqual(1, val.One); Assert.AreEqual(2, val.Two); Assert.AreEqual("Hello, world!", val.Str); }
public void TestBuildUpSimilarParamsFailed2() { var container = new CryoContainer(); var val = new ClassWithSimilarParams(); try { container.BuildUp(val, 1, "Hello, world!", 2); Assert.Fail("Expected exception not happened"); } catch (ContainerException) { } }