public static void TestSet14_Method1() { //TestSet14 var container = new Container(); container.RegisterType <SqlDataRepository>(); container.RegisterType <ServiceDataRepository>(); var sql = new SqlDataRepository(); var srv1 = (ServiceDataRepository)container.CreateInstance("Build.Tests.TestSet14.ServiceDataRepository(Build.Tests.TestSet14.SqlDataRepository)", sql); Assert.NotNull(srv1); }
public static void TestSet14_Method6() { //TestSet14 var container = new Container(); container.RegisterType <SqlDataRepository>(); container.RegisterType <ServiceDataRepository>(); var sql = new SqlDataRepository(); var srv1 = (ServiceDataRepository)container.CreateInstance("Build.Tests.TestSet14.ServiceDataRepository(Build.Tests.TestSet14.SqlDataRepository)", sql); var srv2 = (ServiceDataRepository)container.CreateInstance("Build.Tests.TestSet14.ServiceDataRepository(Build.Tests.TestSet14.SqlDataRepository)", new object[] { null }); Assert.NotEqual(srv1.Repository, srv2.Repository); }