Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanKilleen committed Oct 16, 2023
1 parent f07479e commit 49d4059
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ AndConstraint(Constraint left, Constraint right)

## Examples of Use

```csharp
Assert.That(2.3, Is.GreaterThan(2.0).And.LessThan(3.0));
```
[!code-csharp[AndExample](~/snippets/Snippets.NUnit/Constraints/ConstraintExamples.cs#AndExample)]

## Evaluation Order and Precedence

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Is.AssignableFrom<T>()

## Examples of Use

[!code-csharp[IsBasedFormat](~/snippets/Snippets.NUnit/Constraints/ConstraintExamples.cs#AssignableFromExample)]
[!code-csharp[AssignableFromExample](~/snippets/Snippets.NUnit/Constraints/ConstraintExamples.cs#AssignableFromExample)]
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ public void AssignableFromExample()
Assert.That(theInt, Is.Not.AssignableFrom<string>());
}
#endregion
#region AndExample
[Test]
public void UsingAndToCombineConstraints()
{
var testValue = 2.3;
Assert.That(testValue, Is.GreaterThan(2.0).And.LessThan(3.0));
}
#endregion
}

}

0 comments on commit 49d4059

Please sign in to comment.