Skip to content

Commit 4f3f429

Browse files
committed
Adding tests
1 parent 934e890 commit 4f3f429

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using Nerdbank.GitVersioning.Tasks;
7+
using Xunit;
8+
9+
namespace NerdBank.GitVersioning.Tests
10+
{
11+
public class AssemblyInfoTest
12+
{
13+
[Fact]
14+
public void FSharpGenerator()
15+
{
16+
var info = new AssemblyVersionInfo();
17+
info.AssemblyCompany = "company";
18+
info.AssemblyFileVersion = "1.3";
19+
info.AssemblyVersion = "1.3.0";
20+
info.CodeLanguage = "f#";
21+
22+
var built = info.BuildCode();
23+
24+
var expected = @"//------------------------------------------------------------------------------
25+
// <auto-generated>
26+
// This code was generated by a tool.
27+
// Runtime Version:4.0.30319.42000
28+
//
29+
// Changes to this file may cause incorrect behavior and will be lost if
30+
// the code is regenerated.
31+
// </auto-generated>
32+
//------------------------------------------------------------------------------
33+
34+
namespace AssemblyInfo
35+
[<assembly: System.Reflection.AssemblyVersionAttribute(""1.3.0"")>]
36+
[<assembly: System.Reflection.AssemblyFileVersionAttribute(""1.3"")>]
37+
[<assembly: System.Reflection.AssemblyInformationalVersionAttribute("""")>]
38+
do()
39+
type ThisAssembly() =
40+
static member AssemblyVersion = ""1.3.0""
41+
static member AssemblyFileVersion = ""1.3""
42+
static member AssemblyCompany = ""company""
43+
static member RootNamespace = """"
44+
do()
45+
";
46+
Assert.Equal(expected, built);
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)