示例#1
0
        public void TestDateTimeRuntime()
        {
            var model = CreateModel();

            var obj = new TypeWithDateTime { When = DateTime.Today };
            TypeWithDateTime clone = (TypeWithDateTime) model.DeepClone(obj);
            Assert.AreEqual(obj.When, clone.When);
        }
示例#2
0
        public void TestDateTimeRuntime()
        {
            var model = CreateModel();

            var obj = new TypeWithDateTime {
                When = DateTime.Today
            };
            TypeWithDateTime clone = (TypeWithDateTime)model.DeepClone(obj);

            Assert.Equal(obj.When, clone.When);
        }
示例#3
0
        public void TestDateTimeInPlace()
        {
            var model = CreateModel();

            model.CompileInPlace();
            var obj = new TypeWithDateTime {
                When = DateTime.Today
            };

            TypeWithDateTime clone = (TypeWithDateTime)model.DeepClone(obj);

            Assert.AreEqual(obj.When, clone.When);
        }
示例#4
0
        public override void SetUp()
        {
            base.SetUp();
            _bocDateTimeValue    = new BocDateTimeValueMock();
            _bocDateTimeValue.ID = "BocDateTimeValue";
            NamingContainer.Controls.Add(_bocDateTimeValue);

            _businessObject = TypeWithDateTime.Create();

            _propertyDateTimeValue         = (IBusinessObjectDateTimeProperty)((IBusinessObject)_businessObject).BusinessObjectClass.GetPropertyDefinition("DateTimeValue");
            _propertyNullableDateTimeValue = (IBusinessObjectDateTimeProperty)((IBusinessObject)_businessObject).BusinessObjectClass.GetPropertyDefinition("NullableDateTimeValue");

            _dataSource = new StubDataSource(((IBusinessObject)_businessObject).BusinessObjectClass);
            _dataSource.BusinessObject = (IBusinessObject)_businessObject;
        }