function _withBalancedBindAggregation(that, assert, fnCodeUnderTest) {
		var oBindAggregationExpectation,
			oUnbindAggregationExpectation;

		oBindAggregationExpectation = that.mock(ManagedObject.prototype).expects("bindAggregation")
			.atLeast(0).withExactArgs("list", sinon.match({mode : BindingMode.OneTime}))
			.callThrough();
		oUnbindAggregationExpectation = that.mock(ManagedObject.prototype)
			.expects("unbindAggregation").atLeast(0).withExactArgs("list", true)
			.callThrough();

		return SyncPromise.resolve(fnCodeUnderTest()).then(function (oResult) {
			assert.strictEqual(oUnbindAggregationExpectation.callCount,
				oBindAggregationExpectation.callCount, "balance of bind and unbind");
			return oResult;
		});
	}
/*
	 * Call the given code under test, making sure that aggregations are bound and unbound in
	 * balance.
	 *
	 * @param {object} that the test context
	 * @param {object} assert the assertions
	 * @param {function} fnCodeUnderTest
	 *   code under test, may return a promise
	 * @returns {sap.ui.base.SyncPromise}
	 *   A sync promise for timing which resolves with the result of the code under test
	 */
Call the given code under test, making sure that aggregations are bound and unbound in
balance.

@param {object} that the test context
@param {object} assert the assertions
@param {function} fnCodeUnderTest
code under test, may return a promise
@returns {sap.ui.base.SyncPromise}
A sync promise for timing which resolves with the result of the code under test
Call the given code under test making sure that aggregations are bound and unbound in balance . @param { object } that the test context @param { object } assert the assertions @param { function } fnCodeUnderTest code under test may return a promise @returns { sap . ui . base . SyncPromise } A sync promise for timing which resolves with the result of the code under test
function _withBalancedBindAggregation(that, assert, fnCodeUnderTest) {
		var oBindAggregationExpectation,
			oUnbindAggregationExpectation;
		oBindAggregationExpectation = that.mock(ManagedObject.prototype).expects("bindAggregation")
			.atLeast(0).withExactArgs("list", sinon.match({mode : BindingMode.OneTime}))
			.callThrough();
		oUnbindAggregationExpectation = that.mock(ManagedObject.prototype)
			.expects("unbindAggregation").atLeast(0).withExactArgs("list", true)
			.callThrough();
		return SyncPromise.resolve(fnCodeUnderTest()).then(function (oResult) {
			assert.strictEqual(oUnbindAggregationExpectation.callCount,
				oBindAggregationExpectation.callCount, "balance of bind and unbind");
			return oResult;
		});
	}
function _withBalancedBindAggregation ( that , assert , fnCodeUnderTest ) { var oBindAggregationExpectation , oUnbindAggregationExpectation ; oBindAggregationExpectation = that . mock ( ManagedObject . prototype ) . expects ( "bindAggregation" ) . atLeast ( 0 ) . withExactArgs ( "list" , sinon . match ( { mode : BindingMode . OneTime } ) ) . callThrough ( ) ; oUnbindAggregationExpectation = that . mock ( ManagedObject . prototype ) . expects ( "unbindAggregation" ) . atLeast ( 0 ) . withExactArgs ( "list" , true ) . callThrough ( ) ; return SyncPromise . resolve ( fnCodeUnderTest ( ) ) . then ( function ( oResult ) { assert . strictEqual ( oUnbindAggregationExpectation . callCount , oBindAggregationExpectation . callCount , "balance of bind and unbind" ) ; return oResult ; } ) ; }
Call the given code under test, making sure that aggregations are bound and unbound in
 balance.
Call the given code under test making sure that aggregations are bound and unbound in balance .