private TestPart GetTestPart(List<TestPart> list, string message) { TestPart keyValuePair = list.Find(r => r.Message == message); if (keyValuePair == null) keyValuePair = new TestPart(message, null); return keyValuePair; }
public static void Then(string message, Action givenAction) { TestPart pair = new TestPart(message, givenAction); then.Add(pair); setupThen.Add(pair); }