-
-
Save ehvattum/e9d061d9bd51a621b390 to your computer and use it in GitHub Desktop.
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
#region License | |
// -------------------------------------------------- | |
// Copyright © PayEx. All Rights Reserved. | |
// | |
// This software is proprietary information of PayEx. | |
// USE IS SUBJECT TO LICENSE TERMS. | |
// -------------------------------------------------- | |
#endregion | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using NUnit.Framework; | |
using NUnit.Framework.Constraints; | |
namespace JAY_Z | |
{ | |
[TestFixture] | |
public class BitchTests | |
{ | |
[Test] | |
public void AssertMe() | |
{ | |
Assert.That( | |
I.Got<Problem>(99), But.A<Bitch>().Aint.One() | |
); | |
} | |
} | |
public class But | |
{ | |
internal Type What; | |
public Tuple<ConstraintExpression, But> Aint => new Tuple<ConstraintExpression, But>(Is.Not, this); | |
public static But A<T>() | |
{ | |
return new But | |
{ | |
What = typeof(T) | |
}; | |
} | |
} | |
public class Problem : Exception | |
{ | |
} | |
public class Bitch : Problem | |
{ | |
} | |
public static class I | |
{ | |
public static void A<TBithc>(this IEnumerable<Problem> problems) | |
{ | |
} | |
public static IEnumerable<T> Got<T>(int problems) where T : Problem, new() | |
{ | |
return Enumerable.Range(0, problems).Select(r => new T()); | |
} | |
public static IResolveConstraint One(this Tuple<ConstraintExpression, But> stuff) | |
{ | |
return stuff.Item1.TypeOf(stuff.Item2.What); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment