-
Notifications
You must be signed in to change notification settings - Fork 581
/
sumOfPrimitiveProcedureTest.stg
48 lines (37 loc) · 1.28 KB
/
sumOfPrimitiveProcedureTest.stg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import "copyright.stg"
import "primitiveLiteral.stg"
import "primitiveEquals.stg"
isTest() ::= "true"
skipBoolean() ::= "true"
targetPath() ::= "org/eclipse/collections/impl/block/procedure"
fileName(primitive) ::= "SumOf<primitive.name>ProcedureTest"
class(primitive) ::= <<
<body(primitive.type, primitive.wrapperName, primitive.name)>
>>
body(type, wrapperName, name) ::= <<
<copyright()>
package org.eclipse.collections.impl.block.procedure;
import org.eclipse.collections.api.block.function.primitive.<name>Function;
import org.junit.Assert;
import org.junit.Test;
/**
* JUnit test for {@link SumOf<name>Procedure}.
* This file was automatically generated from template file sumOfPrimitiveProcedureTest.stg.
*/
public class SumOf<name>ProcedureTest
{
@Test
public void getResult()
{
<name>Function\<String> stringToLengthFunction = (String string) -> (<type>) string.length();
SumOf<name>Procedure\<String> procedure = new SumOf<name>Procedure\<>(stringToLengthFunction);
procedure.value("");
procedure.value("0");
procedure.value("00");
procedure.value("000");
<type> actual = (<type>) procedure.getResult();
<type> expected = (<type>) 6;
Assert.assertTrue(<(equals.(type))("actual", "expected")>);
}
}
>>