public void LoadValues()
        {
            var mockControl1 = _mockRepository.StrictMock <IBusinessObjectBoundControl>();
            var mockControl2 = _mockRepository.StrictMock <IBusinessObjectBoundControl>();

            SetupResult.For(mockControl1.HasValidBinding).Return(true);
            SetupResult.For(mockControl2.HasValidBinding).Return(true);
            mockControl1.LoadValue(true);
            mockControl2.LoadValue(true);
            _mockRepository.ReplayAll();

            _dataSource.Register(mockControl1);
            _dataSource.Register(mockControl2);
            _dataSource.LoadValues(true);

            _mockRepository.VerifyAll();
        }
Beispiel #2
0
 /// <summary> Loads the values of the <see cref="BusinessObject"/> into all bound controls. </summary>
 /// <param name="interim"> Specifies whether this is the initial loading, or an interim loading. </param>
 /// <remarks>
 ///   Executes the <see cref="IBusinessObjectDataSource.LoadValues"/> method of the encapsulated <see cref="IBusinessObjectDataSource"/>.
 ///   <note>
 ///     Please refer to the <see cref="T:Remotion.ObjectBinding.Web.UI.Controls.IBusinessObjectDataSourceControl" />'s
 ///     remarks section for an example of the <b>LoadValues Pattern</b>.
 ///   </note>
 /// </remarks>
 public virtual void LoadValues(bool interim)
 {
     InnerDataSource.LoadValues(interim);
 }