public void SaveValueAndIsListEditModeActiveTrueAndInterimTrue()
        {
            _bocList.DataSource = _dataSource;
            _bocList.Property   = _propertyReferenceList;
            _bocList.Value      = new[] { TypeWithReference.Create() };
            _bocList.SwitchListIntoEditMode();
            Assert.That(_bocList.IsListEditModeActive, Is.True);

            var result = _bocList.SaveValue(true);

            Assert.That(result, Is.True);
            Assert.That(_bocList.IsListEditModeActive, Is.True);
        }
Exemple #2
0
        public override void SetUp()
        {
            base.SetUp();

            _values    = new IBusinessObject[5];
            _values[0] = (IBusinessObject)TypeWithString.Create("0", "A");
            _values[1] = (IBusinessObject)TypeWithString.Create("1", "A");
            _values[2] = (IBusinessObject)TypeWithString.Create("2", "B");
            _values[3] = (IBusinessObject)TypeWithString.Create("3", "B");
            _values[4] = (IBusinessObject)TypeWithString.Create("4", "C");

            _newValues    = new IBusinessObject[2];
            _newValues[0] = (IBusinessObject)TypeWithString.Create("5", "C");
            _newValues[1] = (IBusinessObject)TypeWithString.Create("6", "D");

            _typeWithStringClass = BindableObjectProviderTestHelper.GetBindableObjectClass(typeof(TypeWithString));

            _typeWithStringFirstValuePath  = BusinessObjectPropertyPath.CreateStatic(_typeWithStringClass, "FirstValue");
            _typeWithStringSecondValuePath = BusinessObjectPropertyPath.CreateStatic(_typeWithStringClass, "SecondValue");

            _typeWithStringFirstValueSimpleColumn = new BocSimpleColumnDefinition();
            _typeWithStringFirstValueSimpleColumn.SetPropertyPath(_typeWithStringFirstValuePath);

            _typeWithStringSecondValueSimpleColumn = new BocSimpleColumnDefinition();
            _typeWithStringSecondValueSimpleColumn.SetPropertyPath(_typeWithStringSecondValuePath);

            _bocList    = new BocListMock();
            _bocList.ID = "BocList";
            NamingContainer.Controls.Add(_bocList);

            _bocList.LoadUnboundValue(_values, false);
            _bocList.SwitchListIntoEditMode();

            Assert.That(_bocList.IsListEditModeActive, Is.True);
        }