Skip to content

Commit

Permalink
Fix tests that looks like Assert.True(true) (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuuddo authored and glennawatson committed Oct 12, 2019
1 parent 2be505f commit 928e4e2
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void LimitSizeTo()

var expected = people.Skip(100).ToArray().OrderBy(p => p.Name).ToArray();
var actual = results.Data.Items.OrderBy(p => p.Name).ToArray();
actual.ShouldAllBeEquivalentTo(actual, "Only second hundred should be in the cache");
actual.ShouldAllBeEquivalentTo(expected, "Only second hundred should be in the cache");
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions src/DynamicData.Tests/Cache/FilterControllerFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(80, "Should return 80 adds");

var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down Expand Up @@ -218,7 +218,7 @@ public void BatchSuccessiveUpdates()
_results.Messages.Count.Should().Be(80, "Should be 80 messages");
_results.Data.Count.Should().Be(80, "Should be 80 in the cache");
var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions src/DynamicData.Tests/Cache/FilterFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(80, "Should return 80 adds");

var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down Expand Up @@ -112,7 +112,7 @@ public void BatchSuccessiveUpdates()
_results.Messages.Count.Should().Be(80, "Should be 100 updates");
_results.Data.Count.Should().Be(80, "Should be 100 in the cache");
var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions src/DynamicData.Tests/Cache/FilterParallelFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(80, "Should return 80 adds");

var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Name).ToArray();
_results.Data.Items.OrderBy(p => p.Name).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Name), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Name).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down Expand Up @@ -112,7 +112,7 @@ public void BatchSuccessiveUpdates()
_results.Messages.Count.Should().Be(80, "Should be 100 updates");
_results.Data.Count.Should().Be(80, "Should be 100 in the cache");
var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData.Tests/Cache/TransformFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void BatchOfUniqueUpdates()
stub.Results.Messages[0].Adds.Should().Be(100, "Should return 100 adds");

var transformed = people.Select(stub.TransformFactory).OrderBy(p => p.Age).ToArray();
stub.Results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(stub.Results.Data.Items.OrderBy(p => p.Age), "Incorrect transform result");
stub.Results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(transformed, "Incorrect transform result");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData.Tests/Cache/TransformFixtureParallel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void BatchOfUniqueUpdates()

var transformed = people.Select(_transformFactory).ToArray();

_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect transform result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(transformed, "Incorrect transform result");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(80, "Should return 80 adds");

var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down Expand Up @@ -177,7 +177,7 @@ public void BatchSuccessiveUpdates()
_results.Messages.Count.Should().Be(80, "Should be 80 messages");
_results.Data.Count.Should().Be(80, "Should be 80 in the cache");
var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(80, "Should return 80 adds");

var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down Expand Up @@ -163,7 +163,7 @@ public void BatchSuccessiveUpdates()
_results.Messages.Count.Should().Be(80, "Should be 80 messages");
_results.Data.Count.Should().Be(80, "Should be 80 in the cache");
var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions src/DynamicData.Tests/List/FilterFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(80, "Should return 80 adds");

var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down Expand Up @@ -157,7 +157,7 @@ public void BatchSuccessiveUpdates()
_results.Messages.Count.Should().Be(80, "Should be 80 updates");
_results.Data.Count.Should().Be(80, "Should be 100 in the cache");
var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions src/DynamicData.Tests/List/FilterWithObservable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(80, "Should return 80 adds");

var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down Expand Up @@ -218,7 +218,7 @@ public void BatchSuccessiveUpdates()
_results.Messages.Count.Should().Be(80, "Should be 80 messages");
_results.Data.Count.Should().Be(80, "Should be 80 in the cache");
var filtered = people.Where(p => p.Age > 20).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect Filter result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(filtered, "Incorrect Filter result");
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData.Tests/List/SelectFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(100, "Should return 100 adds");

var transformed = people.Select(_transformFactory).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect transform result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(transformed, "Incorrect transform result");
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData.Tests/List/TransformFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void BatchOfUniqueUpdates()
_results.Messages[0].Adds.Should().Be(100, "Should return 100 adds");

var transformed = people.Select(_transformFactory).OrderBy(p => p.Age).ToArray();
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(_results.Data.Items.OrderBy(p => p.Age), "Incorrect transform result");
_results.Data.Items.OrderBy(p => p.Age).ShouldAllBeEquivalentTo(transformed, "Incorrect transform result");
}

[Fact]
Expand Down

0 comments on commit 928e4e2

Please sign in to comment.