File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ using Xunit ;
2+ using Semmle . Extraction . CSharp ;
3+ using System . IO ;
4+
5+ namespace Semmle . Extraction . Tests
6+ {
7+ public class OverlayTests
8+ {
9+ [ Fact ]
10+ public void TestOverlay ( )
11+ {
12+ var logger = new LoggerStub ( ) ;
13+ var json =
14+ """
15+ {
16+ "changes": [
17+ "app/controllers/about_controller.xyz",
18+ "app/models/about.xyz"
19+ ]
20+ }
21+ """ ;
22+
23+ var overlay = new OverlayInfo ( logger , "overlay/source/path" , json ) ;
24+
25+ Assert . True ( overlay . IsOverlayMode ) ;
26+ Assert . False ( overlay . OnlyMakeScaffold ( "overlay/source/path" + Path . DirectorySeparatorChar + "app/controllers/about_controller.xyz" ) ) ;
27+ Assert . False ( overlay . OnlyMakeScaffold ( "overlay/source/path" + Path . DirectorySeparatorChar + "app/models/about.xyz" ) ) ;
28+ Assert . True ( overlay . OnlyMakeScaffold ( "overlay/source/path" + Path . DirectorySeparatorChar + "app/models/unchanged.xyz" ) ) ;
29+ }
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments