public void Should_Throw_If_LogFileContent_Is_WhiteSpace() { // Given / When var result = Record.Exception(() => InspectCodeIssuesSettings.FromContent(" ")); // Then result.IsArgumentOutOfRangeException("logFileContent"); }
public void Should_Throw_If_LogFileContent_Is_Null() { // Given / When var result = Record.Exception(() => InspectCodeIssuesSettings.FromContent(null)); // Then result.IsArgumentNullException("logFileContent"); }
public void Should_Set_Property_Values_Passed_To_Constructor() { // Given const string logFileContent = "foo"; // When var settings = InspectCodeIssuesSettings.FromContent(logFileContent); // Then settings.LogFileContent.ShouldBe(logFileContent); }
public void Should_Throw_If_Log_Is_Null() { // Given / When var result = Record.Exception(() => new InspectCodeIssuesProvider( null, InspectCodeIssuesSettings.FromContent(@"foo"))); // Then result.IsArgumentNullException("log"); }
public InspectCodeIssuesProviderFixture(string fileResourceName) { this.Log = new FakeLog { Verbosity = Verbosity.Normal }; using (var stream = this.GetType().Assembly.GetManifestResourceStream("Cake.Prca.Issues.InspectCode.Tests.Testfiles." + fileResourceName)) { using (var sr = new StreamReader(stream)) { this.Settings = InspectCodeIssuesSettings.FromContent( sr.ReadToEnd()); } } this.PrcaSettings = new ReportIssuesToPullRequestSettings(@"c:\Source\Cake.Prca"); }