public void assert_optional_success_with_no_failures() { var procReturn = new ProcessReturn(){ ExitCode = 0, OutputText = "something" }; var log = MockRepository.GenerateMock<IPackageLog>(); LogWriter.WithLog(log, () => { procReturn.AssertOptionalSuccess(); }); log.AssertWasCalled(x => x.Trace(procReturn.OutputText)); }
public void assert_optional_success_with_failures_still_only_traces() { var procReturn = new ProcessReturn() { ExitCode = 11, OutputText = "something" }; var log = new PackageLog(); LogWriter.WithLog(log, () => { procReturn.AssertOptionalSuccess(); }); log.FullTraceText().ShouldEqual(procReturn.OutputText + System.Environment.NewLine); }