Skip to content

Instantly share code, notes, and snippets.

public void testSomething() throws Exception {
String[] items = { "Any" };
Integer[] sellins = { 0 };
Integer[] qualities = { 0 };
CombinationApprovals.verifyAllCombinations(this::checkItem, items, sellins, qualities);
}
1)
* *
*
. . . .
. . B B
. . . .
. . . .
. . . .
@maaretp
maaretp / gist:5b96936ecd72c616a15d
Last active August 29, 2015 14:13
First Unit Test - after
[TestClass]
public class ClaimEqualityComparerTest : BaseTest
{
[TestMethod]
public void ClaimsAreEqual()
{
var identical = new Claim { Type = "Type", Value = "Value" };
var sameType = new Claim { Type = "TYPE", Value = "Value" };
AssertEquality(true, identical, sameType);
}
@maaretp
maaretp / gist:ff4638ae7d9f21f19af0
Last active August 29, 2015 14:13
First Unit Test - before
[TestClass]
public class ClaimEqualityComparerTest : BaseTest
{
[TestMethod]
public void Equals_ClaimsAreEqual_ReturnsTrue()
{
var claim1 = new Claim { Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", Value = "Foo" };
var claim2 = new Claim { Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", Value = "Foo" };
var comparator = new ClaimEqualityComparer();
comparator.Equals(claim1, claim2).Should().BeTrue();