Skip to content

Commit f91b88c

Browse files
implement interfacemocker
1 parent 9c63706 commit f91b88c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Generate.../InterfaceMocker.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ struct InterfaceMocker {
1313
let variables: [VarSignature]
1414
let sensibleVariables: [VarSignature]
1515
let wasCalledVariables: [VarSignature]
16+
let wasCalledVariablesTimes: [VarSignature]
1617
let returnVariables: [VarSignature]
1718
let funcsMockers: [FuncMocker]
1819
let indentation: String
@@ -28,6 +29,7 @@ struct InterfaceMocker {
2829
funcsMockers = interfaceSignature.funcSignatures.map { FuncMocker(funcSignature: $0, indentationWidth: indentationWidth) }
2930
sensibleVariables = funcsMockers.flatMap { $0.sensibleVariables }
3031
wasCalledVariables = funcsMockers.map { $0.wasCalledVariable }
32+
wasCalledVariablesTimes = funcsMockers.map { $0.wasCalledTimesVariable }
3133
returnVariables = funcsMockers.flatMap { $0.returnVariable }
3234
}
3335

@@ -37,6 +39,7 @@ struct InterfaceMocker {
3739
lines += linesOf(variables: variables, varType: { $0.rawType })
3840
lines += linesOf(variables: sensibleVariables, varType: { $0.rawType })
3941
lines += linesOf(variables: wasCalledVariables, varType: { $0.optionalType })
42+
lines += linesOf(variables: wasCalledVariablesTimes, varType: { $0.rawType })
4043
lines += linesOf(variables: returnVariables, varType: { $0.forceUnwrappedType })
4144
funcsMockers.forEach { funcMocker in
4245
lines.append(contentsOf: funcMocker.lines)

0 commit comments

Comments
 (0)