public void ApplyIf( ConditionMonitor sut ) { var count = 0; Assert.False( sut.ApplyIf( false, () => count++ ) ); Assert.Equal( 0, count ); Assert.True( sut.ApplyIf( true, () => count++ ) ); Assert.Equal( 1, count ); Assert.False( sut.ApplyIf( true, () => count++ ) ); }
public void ApplyIfNull( ConditionMonitor sut ) { var count = 0; Assert.True( sut.ApplyIf( null, () => count++ ) ); Assert.Equal( 1, count ); }