Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpalme committed Feb 10, 2021
1 parent 4c0d2ed commit ffb79d9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/ReportGenerator.Core.Test/Parser/Analysis/ClassTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ public class ClassTest
/// <summary>
/// A test for the Constructor
/// </summary>
[Fact]
public void Constructor()
[Theory]
[InlineData("TestClass", "TestClass")]
[InlineData("TestClass`1", "TestClass<T>")]
[InlineData("TestClass`2", "TestClass<T1, T2>")]
[InlineData("TestClass`3", "TestClass<T1, T2, T3>")]
public void Constructor(string classname, string expectedClassName)
{
Assembly assembly = new Assembly("C:\\test\\TestAssembly.dll");
string classname = "TestClass";

var sut = new Class(classname, assembly);

Assert.Equal(assembly, sut.Assembly);
Assert.Equal(classname, sut.Name);
Assert.Equal(expectedClassName, sut.Name);
}

/// <summary>
Expand Down

0 comments on commit ffb79d9

Please sign in to comment.