forked from jdiamond/Nustache
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using extension method to assert parts now.
- Loading branch information
Showing
5 changed files
with
71 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using NUnit.Framework; | ||
using Nustache.Core; | ||
|
||
namespace Nustache.Tests | ||
{ | ||
internal static class EnumerablePartExtensions | ||
{ | ||
public static void IsEmpty( | ||
this IEnumerable<Part> actualParts) | ||
{ | ||
Assert.That(actualParts.ToArray(), Is.Empty); | ||
} | ||
|
||
public static void IsEqualTo( | ||
this IEnumerable<Part> actualParts, | ||
params Part[] expectedParts) | ||
{ | ||
Assert.That(actualParts.ToArray(), Is.EqualTo(expectedParts) | ||
.Using(new PartComparer())); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters