public static T Require <T>(params string[] scriptArgs) where T : Bau { var scriptPack = new BauScriptPack(); scriptPack.Initialize(new ScriptPackSession(scriptArgs)); return((T)scriptPack.Context); }
public static void CanInitializeWhenScriptArgsAreNull() { // arrange var session = A.Fake<IScriptPackSession>(); A.CallTo(() => session.ScriptArgs).Returns(null); var sut = new BauScriptPack(); // act var ex = Record.Exception(() => sut.Initialize(session)); // assert ex.Should().BeNull(); }
public static void CanInitializeWhenScriptArgsAreNull() { // arrange var session = A.Fake <IScriptPackSession>(); A.CallTo(() => session.ScriptArgs).Returns(null); var sut = new BauScriptPack(); // act var ex = Record.Exception(() => sut.Initialize(session)); // assert ex.Should().BeNull(); }