コード例 #1
0
        public void IsEqualTo_should_be_null_guarded_when_comparer_is_null()
        {
            // Arrange
            var constraintManager    = new DefaultArgumentConstraintManager <string>(x => { });
            Expression <Action> call = () => constraintManager.IsEqualTo(null !, StringComparer.OrdinalIgnoreCase);

            // Act
            // Assert
            call.Should().BeNullGuarded();
        }
コード例 #2
0
 public void SetUp()
 {
     this.createdConstraint = null;
     this.constraintManager = new DefaultArgumentConstraintManager<string>(x => this.createdConstraint = x);
 }
コード例 #3
0
 public DefaultArgumentConstraintManagerTests()
 {
     this.createdConstraint = null;
     this.constraintManager = new DefaultArgumentConstraintManager <string>(x => this.createdConstraint = x);
 }
コード例 #4
0
 public DefaultArgumentConstraintManagerTests()
 {
     this.createdConstraint = null !; // it will be assigned a non-null value by the time it's accessed
     this.constraintManager = new DefaultArgumentConstraintManager <string>(x => this.createdConstraint = x);
 }