Add class for calculating combinations and a unitTest
This commit is contained in:
1 parent
1ba0d429a1
commit
1bb296c04d
6 files changed
+259
-17
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace VocaluxeTests
|
||||
{
|
||||
static class CTestHelpers
|
||||
{
|
||||
public static void AssertFail<T>(Action test) where T : Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
test.Invoke();
|
||||
Assert.Fail("Exception " + typeof(T).Name + " not thrown!");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.IsInstanceOfType(e, typeof(T));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user