CodePlexProject Hosting for Open Source Software
1 person following this project (follow)
public static class Must { public static void Throw<T>(Action action) where T : Exception { if (action == null) throw new ArgumentNullException("action"); try { action(); Assert.Fail("action() did not throw expected exception " + typeof(T).ToString() + "."); } catch (Exception e) { Assert.AreEqual(typeof(T), e.GetType()); } } }
Last edited Dec 11 2010 at 12:00 AM by Neil_, version 80
IBCSharp