Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

Commit e9d0d47

Browse files
authored
Merge pull request #71 from cake-contrib/feature/dxhtmlgrid-option-tests
Add test cases for HtmlDxDataGridOption
2 parents 83bd481 + f2f9e9a commit e9d0d47

File tree

2 files changed

+593
-25
lines changed

2 files changed

+593
-25
lines changed

src/Cake.Issues.Reporting.Generic.Tests/GenericIssueReportFixture.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
namespace Cake.Issues.Reporting.Generic.Tests
22
{
3+
using System;
34
using System.Collections.Generic;
45
using System.IO;
56
using Cake.Testing;
67
using Core.Diagnostics;
8+
using Shouldly;
79

810
internal class GenericIssueReportFixture
911
{
@@ -62,5 +64,28 @@ public string CreateReport(IEnumerable<IIssue> issues)
6264
}
6365
}
6466
}
67+
68+
public void TestReportCreation(Action<GenericIssueReportFormatSettings> settings)
69+
{
70+
// Given
71+
settings(this.GenericIssueReportFormatSettings);
72+
73+
// When
74+
var result =
75+
this.CreateReport(
76+
new List<IIssue>
77+
{
78+
IssueBuilder
79+
.NewIssue("Message Foo", "ProviderType Foo", "ProviderName Foo")
80+
.InFile(@"src\Cake.Issues.Reporting.Generic.Tests\Foo.cs", 10)
81+
.OfRule("Rule Foo")
82+
.WithPriority(IssuePriority.Warning)
83+
.Create(),
84+
});
85+
86+
// Then
87+
// Currently only checks if genertions failed or not without checking actual output.
88+
result.ShouldNotBeNull();
89+
}
6590
}
6691
}

0 commit comments

Comments
 (0)