Skip to content

Commit 212c2e1

Browse files
template
1 parent cd4894b commit 212c2e1

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/services/ContractTemplate.coffee

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ class ContractTemplate
1717
test: () -> 0
1818

1919
template: (inputJsonFile, directory) =>
20-
# @todo Read input json file
21-
testLatePenaltyInput = {
22-
"$class": "org.accordproject.helloworld.HelloWorldClause",
23-
"name": "Philip",
24-
"clauseId": "427c99b0-6df4-11e8-bb3b-67a2e79acc24"
25-
}
26-
20+
testLatePenaltyInput = JSON.parse(fs.readFileSync(inputJsonFile, 'utf8'))
2721
template = await Template.fromDirectory(directory)
2822
clause = new Clause(template)
2923
clause.setData testLatePenaltyInput

test_template.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
call run template json.json "C:\home\projects\accord\cicero-template-library\src\helloworld"
1+
call run template test_template.json "C:\home\projects\accord\cicero-template-library\src\helloworld"
22

test_template.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$class": "org.accordproject.helloworld.HelloWorldClause",
3+
"name": "Philip",
4+
"clauseId": "427c99b0-6df4-11e8-bb3b-67a2e79acc24"
5+
}

0 commit comments

Comments
 (0)