Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions TUnit.Assertions/Conditions/CollectionAssertions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace TUnit.Assertions.Conditions;
/// <summary>
/// Asserts that a collection/enumerable is empty.
/// </summary>
[AssertionExtension("IsEmpty")]
public class CollectionIsEmptyAssertion<TCollection, TItem> : Sources.CollectionAssertionBase<TCollection, TItem>
where TCollection : IEnumerable<TItem>
{
Expand Down Expand Up @@ -82,7 +81,6 @@ protected override Task<AssertionResult> CheckAsync(EvaluationMetadata<TCollecti
/// <summary>
/// Asserts that a collection/enumerable is NOT empty.
/// </summary>
[AssertionExtension("IsNotEmpty")]
public class CollectionIsNotEmptyAssertion<TCollection, TItem> : Sources.CollectionAssertionBase<TCollection, TItem>
where TCollection : IEnumerable<TItem>
{
Expand Down Expand Up @@ -284,7 +282,6 @@ protected override Task<AssertionResult> CheckAsync(EvaluationMetadata<TCollecti
/// Asserts that a collection has a specific count/length.
/// Inherits from CollectionAssertionBase to enable chaining of collection methods.
/// </summary>
[AssertionExtension("HasCount")]
public class CollectionCountAssertion<TCollection, TItem> : Sources.CollectionAssertionBase<TCollection, TItem>
where TCollection : IEnumerable<TItem>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ namespace .Conditions
public .<TItem> GetAwaiter() { }
protected override string GetExpectation() { }
}
[.("HasCount")]
public class CollectionCountAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand Down Expand Up @@ -461,7 +460,6 @@ namespace .Conditions
protected override .<.> CheckAsync(.<TCollection> metadata) { }
protected override string GetExpectation() { }
}
[.("IsEmpty")]
public class CollectionIsEmptyAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand All @@ -485,7 +483,6 @@ namespace .Conditions
protected override .<.> CheckAsync(.<TCollection> metadata) { }
protected override string GetExpectation() { }
}
[.("IsNotEmpty")]
public class CollectionIsNotEmptyAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand Down Expand Up @@ -2118,11 +2115,6 @@ namespace .Extensions
public static .<TCollection, TItem> Contains<TCollection, TItem>(this .<TCollection> source, <TItem, bool> predicate, [.("predicate")] string? predicateExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionCountAssertionExtensions
{
public static .<TCollection, TItem> HasCount<TCollection, TItem>(this .<TCollection> source, int expectedCount, [.("expectedCount")] string? expectedCountExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionDoesNotContainAssertionExtensions
{
public static .<TCollection, TItem> DoesNotContain<TCollection, TItem>(this .<TCollection> source, TItem expected, .<TItem>? comparer = null, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null)
Expand All @@ -2133,11 +2125,6 @@ namespace .Extensions
public static .<TCollection, TItem> DoesNotContain<TCollection, TItem>(this .<TCollection> source, <TItem, bool> predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionIsEmptyAssertionExtensions
{
public static .<TCollection, TItem> IsEmpty<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CollectionIsInDescendingOrderAssertionExtensions
{
public static .<TCollection, TItem> IsInDescendingOrder<TCollection, TItem>(this .<TCollection> source)
Expand All @@ -2148,11 +2135,6 @@ namespace .Extensions
public static .<TCollection, TItem> IsInOrder<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CollectionIsNotEmptyAssertionExtensions
{
public static .<TCollection, TItem> IsNotEmpty<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CultureInfoAssertionExtensions
{
public static ._IsEnglish_Assertion IsEnglish(this .<.CultureInfo> source) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ namespace .Conditions
public .<TItem> GetAwaiter() { }
protected override string GetExpectation() { }
}
[.("HasCount")]
public class CollectionCountAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand Down Expand Up @@ -458,7 +457,6 @@ namespace .Conditions
protected override .<.> CheckAsync(.<TCollection> metadata) { }
protected override string GetExpectation() { }
}
[.("IsEmpty")]
public class CollectionIsEmptyAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand All @@ -482,7 +480,6 @@ namespace .Conditions
protected override .<.> CheckAsync(.<TCollection> metadata) { }
protected override string GetExpectation() { }
}
[.("IsNotEmpty")]
public class CollectionIsNotEmptyAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand Down Expand Up @@ -2115,11 +2112,6 @@ namespace .Extensions
public static .<TCollection, TItem> Contains<TCollection, TItem>(this .<TCollection> source, <TItem, bool> predicate, [.("predicate")] string? predicateExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionCountAssertionExtensions
{
public static .<TCollection, TItem> HasCount<TCollection, TItem>(this .<TCollection> source, int expectedCount, [.("expectedCount")] string? expectedCountExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionDoesNotContainAssertionExtensions
{
public static .<TCollection, TItem> DoesNotContain<TCollection, TItem>(this .<TCollection> source, TItem expected, .<TItem>? comparer = null, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null)
Expand All @@ -2130,11 +2122,6 @@ namespace .Extensions
public static .<TCollection, TItem> DoesNotContain<TCollection, TItem>(this .<TCollection> source, <TItem, bool> predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionIsEmptyAssertionExtensions
{
public static .<TCollection, TItem> IsEmpty<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CollectionIsInDescendingOrderAssertionExtensions
{
public static .<TCollection, TItem> IsInDescendingOrder<TCollection, TItem>(this .<TCollection> source)
Expand All @@ -2145,11 +2132,6 @@ namespace .Extensions
public static .<TCollection, TItem> IsInOrder<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CollectionIsNotEmptyAssertionExtensions
{
public static .<TCollection, TItem> IsNotEmpty<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CultureInfoAssertionExtensions
{
public static ._IsEnglish_Assertion IsEnglish(this .<.CultureInfo> source) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ namespace .Conditions
public .<TItem> GetAwaiter() { }
protected override string GetExpectation() { }
}
[.("HasCount")]
public class CollectionCountAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand Down Expand Up @@ -461,7 +460,6 @@ namespace .Conditions
protected override .<.> CheckAsync(.<TCollection> metadata) { }
protected override string GetExpectation() { }
}
[.("IsEmpty")]
public class CollectionIsEmptyAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand All @@ -485,7 +483,6 @@ namespace .Conditions
protected override .<.> CheckAsync(.<TCollection> metadata) { }
protected override string GetExpectation() { }
}
[.("IsNotEmpty")]
public class CollectionIsNotEmptyAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand Down Expand Up @@ -2118,11 +2115,6 @@ namespace .Extensions
public static .<TCollection, TItem> Contains<TCollection, TItem>(this .<TCollection> source, <TItem, bool> predicate, [.("predicate")] string? predicateExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionCountAssertionExtensions
{
public static .<TCollection, TItem> HasCount<TCollection, TItem>(this .<TCollection> source, int expectedCount, [.("expectedCount")] string? expectedCountExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionDoesNotContainAssertionExtensions
{
public static .<TCollection, TItem> DoesNotContain<TCollection, TItem>(this .<TCollection> source, TItem expected, .<TItem>? comparer = null, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null)
Expand All @@ -2133,11 +2125,6 @@ namespace .Extensions
public static .<TCollection, TItem> DoesNotContain<TCollection, TItem>(this .<TCollection> source, <TItem, bool> predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionIsEmptyAssertionExtensions
{
public static .<TCollection, TItem> IsEmpty<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CollectionIsInDescendingOrderAssertionExtensions
{
public static .<TCollection, TItem> IsInDescendingOrder<TCollection, TItem>(this .<TCollection> source)
Expand All @@ -2148,11 +2135,6 @@ namespace .Extensions
public static .<TCollection, TItem> IsInOrder<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CollectionIsNotEmptyAssertionExtensions
{
public static .<TCollection, TItem> IsNotEmpty<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CultureInfoAssertionExtensions
{
public static ._IsEnglish_Assertion IsEnglish(this .<.CultureInfo> source) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ namespace .Conditions
public .<TItem> GetAwaiter() { }
protected override string GetExpectation() { }
}
[.("HasCount")]
public class CollectionCountAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand Down Expand Up @@ -456,7 +455,6 @@ namespace .Conditions
protected override .<.> CheckAsync(.<TCollection> metadata) { }
protected override string GetExpectation() { }
}
[.("IsEmpty")]
public class CollectionIsEmptyAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand All @@ -480,7 +478,6 @@ namespace .Conditions
protected override .<.> CheckAsync(.<TCollection> metadata) { }
protected override string GetExpectation() { }
}
[.("IsNotEmpty")]
public class CollectionIsNotEmptyAssertion<TCollection, TItem> : .<TCollection, TItem>
where TCollection : .<TItem>
{
Expand Down Expand Up @@ -1997,11 +1994,6 @@ namespace .Extensions
public static .<TCollection, TItem> Contains<TCollection, TItem>(this .<TCollection> source, <TItem, bool> predicate, [.("predicate")] string? predicateExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionCountAssertionExtensions
{
public static .<TCollection, TItem> HasCount<TCollection, TItem>(this .<TCollection> source, int expectedCount, [.("expectedCount")] string? expectedCountExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionDoesNotContainAssertionExtensions
{
public static .<TCollection, TItem> DoesNotContain<TCollection, TItem>(this .<TCollection> source, TItem expected, .<TItem>? comparer = null, [.("expected")] string? expectedExpression = null, [.("comparer")] string? comparerExpression = null)
Expand All @@ -2012,11 +2004,6 @@ namespace .Extensions
public static .<TCollection, TItem> DoesNotContain<TCollection, TItem>(this .<TCollection> source, <TItem, bool> predicate, string predicateDescription, [.("predicate")] string? predicateExpression = null, [.("predicateDescription")] string? predicateDescriptionExpression = null)
where TCollection : .<TItem> { }
}
public static class CollectionIsEmptyAssertionExtensions
{
public static .<TCollection, TItem> IsEmpty<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CollectionIsInDescendingOrderAssertionExtensions
{
public static .<TCollection, TItem> IsInDescendingOrder<TCollection, TItem>(this .<TCollection> source)
Expand All @@ -2027,11 +2014,6 @@ namespace .Extensions
public static .<TCollection, TItem> IsInOrder<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CollectionIsNotEmptyAssertionExtensions
{
public static .<TCollection, TItem> IsNotEmpty<TCollection, TItem>(this .<TCollection> source)
where TCollection : .<TItem> { }
}
public static class CultureInfoAssertionExtensions
{
public static ._IsEnglish_Assertion IsEnglish(this .<.CultureInfo> source) { }
Expand Down
2 changes: 1 addition & 1 deletion tools/speed-comparison/UnifiedTests/AssertionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void NumericAssertionsTest()
await Assert.That(value).IsEqualTo(42);
await Assert.That(value).IsGreaterThan(40);
await Assert.That(value).IsLessThan(50);
await Assert.That(value).IsBetween(40, 45).WithInclusiveBounds();
await Assert.That(value).IsBetween(40, 45).Inclusive();

await Assert.That(pi).IsEqualTo(3.14159);
await Assert.That(pi).IsGreaterThan(3.0);
Expand Down
Loading