private static void AssertSwitchedLeft(IEither <string, int> either) { var switchedLeft = false; var switchedRight = false; either.Switch(v => switchedLeft = true, v => switchedRight = true); Assert.That(switchedLeft, Is.True); Assert.That(switchedRight, Is.False); }