Skip to content

Commit 3a67f5e

Browse files
committed
Add NoMono category to tests
Add 'NoMono' category to AssemblyInfoBuilder tests since source information is not available to `ShouldMatchApproved()` on Mono.
1 parent 2755fb7 commit 3a67f5e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/GitVersionTask.Tests/AssemblyInfoBuilderTests.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public Compilation Compile(string assemblyInfoText)
6161
};
6262

6363
[Test]
64+
[NUnit.Framework.Category("NoMono")]
65+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
6466
public void VerifyCreatedCode([ValueSource("compilers")]ICompiler compiler)
6567
{
6668
var semanticVersion = new SemanticVersion
@@ -94,6 +96,8 @@ public void VerifyCreatedCode([ValueSource("compilers")]ICompiler compiler)
9496
}
9597

9698
[Test]
99+
[NUnit.Framework.Category("NoMono")]
100+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
97101
public void VerifyCreatedCode_NoNamespaceConflict([ValueSource("compilers")]ICompiler compiler)
98102
{
99103
var semanticVersion = new SemanticVersion
@@ -120,34 +124,44 @@ public void VerifyCreatedCode_NoNamespaceConflict([ValueSource("compilers")]ICom
120124

121125
[Test]
122126
[MethodImpl(MethodImplOptions.NoInlining)]
127+
[NUnit.Framework.Category("NoMono")]
128+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
123129
public void VerifyAssemblyVersion_Major([ValueSource("compilers")]ICompiler compiler)
124130
{
125131
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.Major);
126132
}
127133

128134
[Test]
129135
[MethodImpl(MethodImplOptions.NoInlining)]
136+
[NUnit.Framework.Category("NoMono")]
137+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
130138
public void VerifyAssemblyVersion_MajorMinor([ValueSource("compilers")]ICompiler compiler)
131139
{
132140
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.MajorMinor);
133141
}
134142

135143
[Test]
136144
[MethodImpl(MethodImplOptions.NoInlining)]
145+
[NUnit.Framework.Category("NoMono")]
146+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
137147
public void VerifyAssemblyVersion_MajorMinorPatch([ValueSource("compilers")]ICompiler compiler)
138148
{
139149
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.MajorMinorPatch);
140150
}
141151

142152
[Test]
143153
[MethodImpl(MethodImplOptions.NoInlining)]
154+
[NUnit.Framework.Category("NoMono")]
155+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
144156
public void VerifyAssemblyVersion_MajorMinorPatchTag([ValueSource("compilers")]ICompiler compiler)
145157
{
146158
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.MajorMinorPatchTag);
147159
}
148160

149161
[Test]
150162
[MethodImpl(MethodImplOptions.NoInlining)]
163+
[NUnit.Framework.Category("NoMono")]
164+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
151165
public void VerifyAssemblyVersion_Major_InvalidInformationalValue([ValueSource("compilers")]ICompiler compiler)
152166
{
153167
var exception = Assert.Throws<WarningException>(() => VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.Major, "{ThisVariableDoesntExist}"));
@@ -156,34 +170,43 @@ public void VerifyAssemblyVersion_Major_InvalidInformationalValue([ValueSource("
156170

157171
[Test]
158172
[MethodImpl(MethodImplOptions.NoInlining)]
173+
[NUnit.Framework.Category("NoMono")]
174+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
159175
public void VerifyAssemblyVersion_Major_NugetAssemblyInfo([ValueSource("compilers")]ICompiler compiler)
160176
{
161177
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.Major, "{NugetVersion}");
162178
}
163179

164180
[Test]
165181
[MethodImpl(MethodImplOptions.NoInlining)]
182+
[NUnit.Framework.Category("NoMono")]
166183
public void VerifyAssemblyVersion_MajorMinor_NugetAssemblyInfoWithMultipleVariables([ValueSource("compilers")]ICompiler compiler)
167184
{
168185
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.MajorMinor, "{BranchName}-{Major}.{Minor}.{Patch}-{Sha}");
169186
}
170187

171188
[Test]
172189
[MethodImpl(MethodImplOptions.NoInlining)]
190+
[NUnit.Framework.Category("NoMono")]
191+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
173192
public void VerifyAssemblyVersion_MajorMinor_NugetAssemblyInfo([ValueSource("compilers")]ICompiler compiler)
174193
{
175194
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.MajorMinor, "{NugetVersion}");
176195
}
177196

178197
[Test]
179198
[MethodImpl(MethodImplOptions.NoInlining)]
199+
[NUnit.Framework.Category("NoMono")]
200+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
180201
public void VerifyAssemblyVersion_MajorMinorPatch_NugetAssemblyInfo([ValueSource("compilers")]ICompiler compiler)
181202
{
182203
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.MajorMinorPatch, "{NugetVersion}");
183204
}
184205

185206
[Test]
186207
[MethodImpl(MethodImplOptions.NoInlining)]
208+
[NUnit.Framework.Category("NoMono")]
209+
[NUnit.Framework.Description("Won't run on Mono due to source information not being available for ShouldMatchApproved.")]
187210
public void VerifyAssemblyVersion_MajorMinorPatchTag_NugetAssemblyInfo([ValueSource("compilers")]ICompiler compiler)
188211
{
189212
VerifyAssemblyVersion(compiler, AssemblyVersioningScheme.MajorMinorPatchTag, "{NugetVersion}");

0 commit comments

Comments
 (0)