File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -450,6 +450,7 @@ public void LookingOutABranchByNameWithBadParamsThrows()
450
450
}
451
451
}
452
452
453
+ [ Fact ]
453
454
public void CanGetInformationFromUnbornBranch ( )
454
455
{
455
456
string repoPath = InitNewRepository ( true ) ;
Original file line number Diff line number Diff line change 4
4
using System . Linq ;
5
5
using System . Reflection ;
6
6
using System . Text ;
7
+ using LibGit2Sharp . Tests . TestHelpers ;
7
8
using Xunit ;
9
+ using Xunit . Extensions ;
8
10
9
11
namespace LibGit2Sharp . Tests
10
12
{
11
13
public class MetaFixture
12
14
{
15
+ [ Fact ]
16
+ public void PublicTestMethodsAreFactsOrTheories ( )
17
+ {
18
+ var exceptions = new [ ]
19
+ {
20
+ "LibGit2Sharp.Tests.FilterBranchFixture.Dispose" ,
21
+ } ;
22
+
23
+ var fixtures = from t in Assembly . GetAssembly ( typeof ( MetaFixture ) ) . GetExportedTypes ( )
24
+ where t . IsPublic && ! t . IsNested
25
+ where t . Namespace != typeof ( BaseFixture ) . Namespace // Exclude helpers
26
+ let methods = t . GetMethods ( BindingFlags . DeclaredOnly | BindingFlags . Instance | BindingFlags . Public )
27
+ from m in methods
28
+ where ! m . GetCustomAttributes ( typeof ( FactAttribute ) , false )
29
+ . Concat ( m . GetCustomAttributes ( typeof ( TheoryAttribute ) , false ) )
30
+ . Any ( )
31
+ let name = t . FullName + "." + m . Name
32
+ where ! exceptions . Contains ( name )
33
+ select name ;
34
+
35
+ Assert . Equal ( "" , string . Join ( Environment . NewLine , fixtures . ToArray ( ) ) ) ;
36
+ }
37
+
13
38
// Related to https://github.com/libgit2/libgit2sharp/pull/251
14
39
[ Fact ]
15
40
public void TypesInLibGit2DecoratedWithDebuggerDisplayMustFollowTheStandardImplPattern ( )
You can’t perform that action at this time.
0 commit comments