Esempio n. 1
0
        public FramesCollection Throw <T>(params object[] arguments) where T : Exception
        {
            var frame = new ThrowExceptionFrame <T>(arguments);

            Add(frame);
            return(this);
        }
 public void format_with_one_value()
 {
     ThrowExceptionFrame <NotImplementedException> .ToFormat(new object[] { "boom" })
     .ShouldBe("throw new System.NotImplementedException({0});");
 }
 public void format_with_multiple_values()
 {
     ThrowExceptionFrame <NotImplementedException> .ToFormat(new object[] { "boom", Use.Type <Exception>() })
     .ShouldBe("throw new System.NotImplementedException({0}, {1});");
 }
 public void format_with_no_values()
 {
     ThrowExceptionFrame <NotImplementedException> .ToFormat(new object[0])
     .ShouldBe("throw new System.NotImplementedException();");
 }