private void CheckOneOf(IFoo foo, bool succeed) { var expect = Mockery.ExactOneOf( foo.ActivityOf(f => f.Foo(1), m => m.Repeat.Once()), foo.ActivityOf(f => f.Foo(1, 2), m => m.Repeat.Once()), foo.ActivityOf(f => f.Foo(1, 2, 3), m => m.Repeat.Once()) ); if (succeed) { Assert.IsTrue(expect); Mockery.Assert(expect); } else { Assert.IsFalse(expect); Assert.Throws <ExpectationViolationException>( () => Mockery.Assert(expect)); } }