mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Import code from previous AssetBuilder version
This commit is contained in:
25
test/ZoneCodeGeneratorTests/AssertionExtensions.cs
Normal file
25
test/ZoneCodeGeneratorTests/AssertionExtensions.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace ZoneCodeGeneratorTests
|
||||
{
|
||||
public static class AssertionExtensions
|
||||
{
|
||||
public static void Contains(this Assert assert, object expected, ICollection collection)
|
||||
{
|
||||
if (collection.Cast<object>().Any(item => item == expected))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
throw new AssertFailedException();
|
||||
}
|
||||
|
||||
public static void IsZero(this Assert assert, int number)
|
||||
{
|
||||
if(number != 0)
|
||||
throw new AssertFailedException();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user