Wouldn't it be nice to just chain assertions after a method call or is it just me? I was thinking that it'd improve readability.Instead of:var myObject = _objectService.GetRandomObject();Trace.Assert(myObject!=null);it'll just be this:_objectService.GetRandomObject().NeverNull();with the extension method defined asnamespace System{    public static class AssertionExtensions    {        public static T NeverNull<T>(this T obj)             where T : class        {            Trace.Assert(obj != null);            return obj;        }    }}We could make extensions for some of the most common assertions:public static T Never<T>(this T obj, bool condition)     where T : class{    Trace.Assert(!condition);    return obj;}public static T Always<T>(this T obj, bool condition)     where T : class{    Trace.Assert(condition);    return obj;}If one prefers exceptions over asserts, that's a possibility too.
Chained Assertions
c#;extension methods