Skip to content

Commit 9ceac21

Browse files
Add mockable only if mock contents is empty (#764)
1 parent 9942a06 commit 9ceac21

File tree

37 files changed

+2
-36
lines changed

37 files changed

+2
-36
lines changed

Sources/NodesGenerator/Resources/Stencils/Flow.stencil

+2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ internal protocol {{ node_name }}ContextInterface: Context {}
2828
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
2929
implementation as necessary.
3030
*/
31+
{% if not view_controllable_mock_contents %}
3132
/// @mockable
33+
{% endif %}
3234
@MainActor
3335
internal protocol {{ node_name }}ViewControllable: {{ view_controllable_type }} {}
3436
{% endif %}

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.Flow-AppKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.Flow-AppKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.Flow-Custom-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.Flow-Custom-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.Flow-SwiftUI-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.Flow-SwiftUI-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.Flow-UIKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode.Flow-UIKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNodePresetRoot.Flow-UIKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol RootContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol RootViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNodePresetRoot.Flow-UIKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol RootContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol RootViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNodeViewInjected.Flow-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNodeViewInjected.Flow-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.Flow-AppKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.Flow-AppKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.Flow-Custom-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.Flow-Custom-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.Flow-SwiftUI-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.Flow-SwiftUI-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.Flow-UIKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPlugin.Flow-UIKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.Flow-AppKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.Flow-AppKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.Flow-Custom-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.Flow-Custom-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.Flow-SwiftUI-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.Flow-SwiftUI-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.Flow-UIKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withPluginAndTests.Flow-UIKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.Flow-AppKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.Flow-AppKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.Flow-Custom-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.Flow-Custom-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.Flow-SwiftUI-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.Flow-SwiftUI-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.Flow-UIKit-mockCount-1.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1717
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1818
implementation as necessary.
1919
*/
20-
/// @mockable
2120
@MainActor
2221
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2322

Tests/NodesGeneratorTests/__Snapshots__/StencilRendererTests/testRenderNode_withTests.Flow-UIKit-mockCount-2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal protocol <nodeName>ContextInterface: Context {}
1818
protocols to add further pre-baked presentation behavior and/or add new methods for custom presentation
1919
implementation as necessary.
2020
*/
21-
/// @mockable
2221
@MainActor
2322
internal protocol <nodeName>ViewControllable: <viewControllableType> {}
2423

0 commit comments

Comments
 (0)