protected static void CreateClassDefs <T1, T2>()
        {
            CustomTypeSource typeSource = new CustomTypeSource();

            typeSource.Add <T1>();
            typeSource.Add <T2>();
            AllClassesAutoMapper.ClassDefCol = ClassDef.ClassDefs;
            new AllClassesAutoMapper(typeSource).Map();
        }
 public void Test_Add_ShouldReturnAllTypesAdded()
 {
     //---------------Set up test pack-------------------
     CustomTypeSource typeSource = new CustomTypeSource();
     Type type1 = typeof (FakeExtBoShouldBeLoaded);
     Type type2 = typeof (FakeExtAbstractBoInterfaceShouldNotBeLoaded);
     //---------------Assert Precondition----------------
     //---------------Execute Test ----------------------
     typeSource.Add(type1);
     typeSource.Add(type2);
     //---------------Test Result -----------------------
     var bos = typeSource.GetTypes();
     Assert.AreEqual(2, bos.Count());
     bos.ShouldContain(wrapper => wrapper.Name == type1.Name);
     bos.ShouldContain(wrapper => wrapper.Name == type2.Name);
 }
Exemple #3
0
        public void Test_Add_ShouldReturnAllTypesAdded()
        {
            //---------------Set up test pack-------------------
            CustomTypeSource typeSource = new CustomTypeSource();
            Type             type1      = typeof(FakeExtBoShouldBeLoaded);
            Type             type2      = typeof(FakeExtAbstractBoInterfaceShouldNotBeLoaded);

            //---------------Assert Precondition----------------
            //---------------Execute Test ----------------------
            typeSource.Add(type1);
            typeSource.Add(type2);
            //---------------Test Result -----------------------
            var bos = typeSource.GetTypes();

            Assert.AreEqual(2, bos.Count());
            bos.ShouldContain(wrapper => wrapper.Name == type1.Name);
            bos.ShouldContain(wrapper => wrapper.Name == type2.Name);
        }
 public void Test_AddGeneric_ShouldReturnAllTypesAdded()
 {
     //---------------Set up test pack-------------------
     CustomTypeSource typeSource = new CustomTypeSource();
    
     //---------------Assert Precondition----------------
     //---------------Execute Test ----------------------
     typeSource.Add <FakeExtBoShouldBeLoaded>();
     //---------------Test Result -----------------------
     var bos = typeSource.GetTypes();
     Assert.AreEqual(1, bos.Count());
     bos.ShouldContain(wrapper => wrapper.Name == "FakeExtBoShouldBeLoaded");
 }
Exemple #5
0
        public void Test_AddGeneric_ShouldReturnAllTypesAdded()
        {
            //---------------Set up test pack-------------------
            CustomTypeSource typeSource = new CustomTypeSource();

            //---------------Assert Precondition----------------
            //---------------Execute Test ----------------------
            typeSource.Add <FakeExtBoShouldBeLoaded>();
            //---------------Test Result -----------------------
            var bos = typeSource.GetTypes();

            Assert.AreEqual(1, bos.Count());
            bos.ShouldContain(wrapper => wrapper.Name == "FakeExtBoShouldBeLoaded");
        }