Generate mocks for all SDK classes and introduce a simple TimelineItemFactory test to try them out

This commit is contained in:
Stefan Ceriu
2024-06-05 15:27:04 +03:00
parent c51593476c
commit 53fc5df55b
7 changed files with 18608 additions and 1768 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ struct GenerateSDKMocks: ParsableCommand {
/// Generates the SDK mocks using Sourcery.
func generateSDKMocks(ffiPath: String) throws {
try Zsh.run(command: "sourcery --sources \(ffiPath) --sources ElementX/Sources/Mocks/SDK --templates Tools/Sourcery --output ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift --args autoMockableImports=\"Foundation\",autoMockableImports=\"MatrixRustSDK\"")
try Zsh.run(command: "sourcery --sources \(ffiPath) --templates Tools/Sourcery/SDKAutoMockable.stencil --output ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift --args autoMockableImports=\"Foundation\",autoMockableImports=\"MatrixRustSDK\"")
}
/// Downloads the specified version of the `matrix_sdk_ffi.swift` file and returns the path to the downloaded file.