Skip to content

Commit cfe18c3

Browse files
committed
refactor: tidier code in unit test
1 parent 852e5ec commit cfe18c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/UnitTest/SourceControl/Git/ImportAll.cls

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Class UnitTest.SourceControl.Git.ImportAll Extends UnitTest.SourceControl.Git.AbstractTest
22
{
33

4+
Parameter WebAppName As STRING = "/csp/git/unittest/xsl";
5+
46
Property WebAppPath As %String;
57

68
Method %OnNew(initvalue) As %Status
@@ -10,11 +12,11 @@ Method %OnNew(initvalue) As %Status
1012
/// add mappings for MAC and CSP
1113
Set settings = ##class(SourceControl.Git.Settings).%New()
1214
Set settings.Mappings("MAC","*")="rtn/"
13-
Set settings.Mappings("/CSP/","/csp/git/unittest/xsl")="csp/git/unittest/xsl"
15+
Set settings.Mappings("/CSP/",..#WebAppName)="csp/git/unittest/xsl"
1416
$$$ThrowOnError(settings.%Save())
1517
set ..WebAppPath = ##class(%File).TempFilename()_"d"
1618
do ##class(%File).CreateDirectoryChain(..WebAppPath)
17-
do ..CreateTestWebApp("/csp/git/unittest/xsl", ..WebAppPath)
19+
do ..CreateTestWebApp(..#WebAppName, ..WebAppPath)
1820
return $$$OK
1921
}
2022

@@ -43,7 +45,7 @@ ClassMethod DeleteTestWebApp(name)
4345

4446
Method %OnClose() As %Status [ Private, ServerOnly = 1 ]
4547
{
46-
do ..DeleteTestWebApp("/csp/git/unittest/xsl")
48+
do ..DeleteTestWebApp(..#WebAppName)
4749
do ##class(%File).RemoveDirectoryTree(..WebAppPath)
4850
quit ##super()
4951
}

0 commit comments

Comments
 (0)