public void TestTwoInstantiations() { IRootInterface firstRoot = TangFactory.GetTang().NewInjector(GetConfiguration()).GetInstance <IRootInterface>(); IRootInterface secondRoot = TangFactory.GetTang().NewInjector(GetConfiguration()).GetInstance <IRootInterface>(); Assert.AreNotSame(firstRoot, secondRoot, "Two instantiations of the object tree should not be the same"); Assert.AreEqual(firstRoot, secondRoot, "Two instantiations of the object tree should be equal"); }
public virtual void TestRoundTrip() { IConfiguration conf = ObjectTreeTest.GetConfiguration(); IRootInterface before = TangFactory.GetTang().NewInjector(conf).GetInstance <IRootInterface>(); IRootInterface after = TangFactory.GetTang().NewInjector(RoundTrip(conf)).GetInstance <IRootInterface>(); Assert.True(before.Equals(after), "Configuration conversion to and from Avro datatypes failed."); }
public void TestInstantiation() { IRootInterface root = TangFactory.GetTang().NewInjector(GetConfiguration()).GetInstance <IRootInterface>(); Assert.IsTrue(root.IsValid(), "Object instantiation left us in an inconsistent state."); }