Exemple #1
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);
        }
Exemple #2
0
 public override void SetUp()
 {
     base.SetUp();
     _bocList    = new BocListMock();
     _bocList.ID = "BocList";
     _bocList.ShowOptionsMenu        = false;
     _bocList.ShowListMenu           = false;
     _bocList.ShowAvailableViewsList = false;
     _bocList.PageSize       = null;
     _bocList.EnableSorting  = false;
     _bocList.RowMenuDisplay = RowMenuDisplay.Disabled;
     _bocList.Selection      = RowSelection.Disabled;
     Page.Controls.Add(_bocList);
 }
        public override void SetUp()
        {
            base.SetUp();

            Invoker.InitRecursive();

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

            _businessObject = TypeWithReference.Create();

            _propertyReferenceList =
                (IBusinessObjectReferenceProperty)((IBusinessObject)_businessObject).BusinessObjectClass.GetPropertyDefinition("ReferenceList");

            _dataSource = new StubDataSource(((IBusinessObject)_businessObject).BusinessObjectClass)
            {
                Mode = DataSourceMode.Edit
            };
            _dataSource.BusinessObject = (IBusinessObject)_businessObject;
        }