@@ -29,57 +29,44 @@ public class ProjectBuilderTest
29
29
[ TestMethod ]
30
30
public void AddDocument_ValidExtension ( )
31
31
{
32
- EmptyCS . AddDocument ( "TestCases\\ VariableUnused. cs" ) . FindDocument ( "VariableUnused .cs" ) . Should ( ) . NotBeNull ( ) ;
33
- EmptyVB . AddDocument ( "TestCases\\ VariableUnused. vb" ) . FindDocument ( "VariableUnused .vb" ) . Should ( ) . NotBeNull ( ) ;
32
+ EmptyCS . AddDocument ( @ "TestCases\ProjectBuilder.AddDocument. cs") . FindDocument ( "ProjectBuilder.AddDocument .cs" ) . Should ( ) . NotBeNull ( ) ;
33
+ EmptyVB . AddDocument ( @ "TestCases\ProjectBuilder.AddDocument. vb") . FindDocument ( "ProjectBuilder.AddDocument .vb" ) . Should ( ) . NotBeNull ( ) ;
34
34
}
35
35
36
36
[ TestMethod ]
37
37
public void AddDocument_MismatchingExtension ( )
38
38
{
39
- Action f ;
40
-
41
- f = ( ) => EmptyCS . AddDocument ( "TestCases\\ VariableUnused.vb" ) ;
42
- f . Should ( ) . Throw < ArgumentException > ( ) ;
43
-
44
- f = ( ) => EmptyVB . AddDocument ( "TestCases\\ VariableUnused.cs" ) ;
45
- f . Should ( ) . Throw < ArgumentException > ( ) ;
39
+ EmptyCS . Invoking ( x => x . AddDocument ( @"TestCases\ProjectBuilder.AddDocument.vb" ) ) . Should ( ) . Throw < ArgumentException > ( ) ;
40
+ EmptyVB . Invoking ( x => x . AddDocument ( @"TestCases\ProjectBuilder.AddDocument.cs" ) ) . Should ( ) . Throw < ArgumentException > ( ) ;
46
41
}
47
42
48
43
[ TestMethod ]
49
44
public void AddDocument_InvalidExtension ( )
50
45
{
51
- Action f ;
52
-
53
- f = ( ) => EmptyCS . AddDocument ( "TestCases\\ VariableUnused.unknown" ) ;
54
- f . Should ( ) . Throw < ArgumentException > ( ) ;
55
-
56
- f = ( ) => EmptyVB . AddDocument ( "TestCases\\ VariableUnused.unknown" ) ;
57
- f . Should ( ) . Throw < ArgumentException > ( ) ;
46
+ EmptyCS . Invoking ( x => x . AddDocument ( @"TestCases\ProjectBuilder.AddDocument.unknown" ) ) . Should ( ) . Throw < ArgumentException > ( ) ;
47
+ EmptyVB . Invoking ( x => x . AddDocument ( @"TestCases\ProjectBuilder.AddDocument.unknown" ) ) . Should ( ) . Throw < ArgumentException > ( ) ;
58
48
}
59
49
60
50
[ TestMethod ]
61
51
public void AddDocument_SupportsRazorFiles ( )
62
52
{
63
- EmptyCS . AddDocument ( "TestCases\\ UnusedPrivateMember. razor" ) . FindDocument ( "UnusedPrivateMember .razor" ) . Should ( ) . NotBeNull ( ) ;
64
- EmptyVB . AddDocument ( "TestCases\\ UnusedPrivateMember. razor" ) . FindDocument ( "UnusedPrivateMember .razor" ) . Should ( ) . NotBeNull ( ) ;
53
+ EmptyCS . AddDocument ( @ "TestCases\ProjectBuilder.AddDocument. razor") . FindDocument ( "ProjectBuilder.AddDocument .razor" ) . Should ( ) . NotBeNull ( ) ;
54
+ EmptyVB . AddDocument ( @ "TestCases\ProjectBuilder.AddDocument. razor") . FindDocument ( "ProjectBuilder.AddDocument .razor" ) . Should ( ) . NotBeNull ( ) ;
65
55
}
66
56
67
57
[ TestMethod ]
68
58
public void AddDocument_CsharpSupportsCshtmlFiles ( ) =>
69
- EmptyCS . AddDocument ( "TestCases\\ UnusedPrivateMember. cshtml" ) . FindDocument ( "UnusedPrivateMember .cshtml" ) . Should ( ) . NotBeNull ( ) ;
59
+ EmptyCS . AddDocument ( @ "TestCases\ProjectBuilder.AddDocument. cshtml") . FindDocument ( "ProjectBuilder.AddDocument .cshtml" ) . Should ( ) . NotBeNull ( ) ;
70
60
71
61
[ TestMethod ]
72
62
public void AddDocument_VbnetDoesntSupportCshtmlFiles ( ) =>
73
- new Action ( ( ) => EmptyVB . AddDocument ( "TestCases\\ UnusedPrivateMember.cshtml" ) . FindDocument ( "UnusedPrivateMember.cshtml" ) . Should ( ) . NotBeNull ( ) )
74
- . Should ( ) . Throw < ArgumentException > ( ) ;
63
+ EmptyVB . Invoking ( x => x . AddDocument ( @"TestCases\ProjectBuilder.AddDocument.cshtml" ) . FindDocument ( "ProjectBuilder.AddDocument.cshtml" ) ) . Should ( ) . Throw < ArgumentException > ( ) ;
75
64
76
65
[ TestMethod ]
77
66
public void AddDocument_CsharpDoesntSupportVbnetFiles ( ) =>
78
- new Action ( ( ) => EmptyCS . AddDocument ( "TestCases\\ UnusedPrivateMember.vbhtml" ) . FindDocument ( "UnusedPrivateMember.vbhtml" ) . Should ( ) . NotBeNull ( ) )
79
- . Should ( ) . Throw < ArgumentException > ( ) ;
67
+ EmptyCS . Invoking ( x => x . AddDocument ( @"TestCases\ProjectBuilder.AddDocument.vbhtml" ) . FindDocument ( "ProjectBuilder.AddDocument.vbhtml" ) . Should ( ) . NotBeNull ( ) ) . Should ( ) . Throw < ArgumentException > ( ) ;
80
68
81
69
[ TestMethod ]
82
70
public void AddDocument_VbnetDoesntSupportVbnetFiles ( ) =>
83
- new Action ( ( ) => EmptyVB . AddDocument ( "TestCases\\ UnusedPrivateMember.vbhtml" ) . FindDocument ( "UnusedPrivateMember.vbhtml" ) . Should ( ) . NotBeNull ( ) )
84
- . Should ( ) . Throw < ArgumentException > ( ) ;
71
+ EmptyVB . Invoking ( x => x . AddDocument ( @"TestCases\ProjectBuilder.AddDocument.vbhtml" ) . FindDocument ( "ProjectBuilder.AddDocument.vbhtml" ) . Should ( ) . NotBeNull ( ) ) . Should ( ) . Throw < ArgumentException > ( ) ;
85
72
}
0 commit comments