Exemplo n.º 1
0
        public void built_objects_should_be_overridable()
        {
            var result = Foundry.Cast <TestClass>(x =>
            {
                x.TestValue = "changed";
                x.Id        = 100;
            });

            Assert.AreEqual("changed", result.TestValue);
            Assert.AreEqual(100, result.Id);
        }
Exemplo n.º 2
0
 public void it_should_fail_if_it_does_not_find_a_casting_from_executing_test_assembly()
 {
     var result = Foundry.Cast <NonExistent>();
 }
Exemplo n.º 3
0
 public void it_should_fail_if_it_finds_more_than_one_castring_from_executing_test_assembly()
 {
     var result = Foundry.Cast <Multiple>();
 }
Exemplo n.º 4
0
        public void it_should_build_an_object_from_executing_test_assembly()
        {
            var result = Foundry.Cast <TestClass>();

            Assert.AreEqual("test", result.TestValue);
        }