public void CloneByFirstConstructorTest1()
        {
            ReflectionUtils  target = new ReflectionUtils();
            ComplexStructure c      = new ComplexStructure();

            c.Field1 = "SomeValue";
            Type             t = c.GetType();
            ComplexStructure actual;

            try
            {
                actual = (ComplexStructure)target.CloneByFirstConstructor(t);
                Assert.AreEqual(null, actual.Field1);
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }
Пример #2
0
        public void GetDBDataTypeFromDotNetTypeTest3()
        {
            DBTypeUtils      target      = new DBTypeUtils();
            ComplexStructure targetValue = new ComplexStructure();
            //object expectedValue = null; // don't expect anything just check for exception

            DBDataType actual;

            try
            {
                actual = target.GetDBDataTypeFromDotNetType(targetValue.GetType());
            }
            catch (NotImplementedException)
            {
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }