From 428b48620f28414eb6685ab53156ac089f83475f Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Mon, 1 Jul 2024 17:04:34 +0200 Subject: [PATCH] test(PlantUMLFramework): update tests --- .../PlantUMLFrameworkTests.swift | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/PlantUMLFramework/Tests/PlantUMLFrameworkTests/PlantUMLFrameworkTests.swift b/PlantUMLFramework/Tests/PlantUMLFrameworkTests/PlantUMLFrameworkTests.swift index 5c59126..c91e82a 100644 --- a/PlantUMLFramework/Tests/PlantUMLFrameworkTests/PlantUMLFrameworkTests.swift +++ b/PlantUMLFramework/Tests/PlantUMLFrameworkTests/PlantUMLFrameworkTests.swift @@ -2,10 +2,33 @@ import XCTest @testable import PlantUMLFramework final class PlantUMLFrameworkTests: XCTestCase { - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct - // results. - XCTAssertEqual(PlantUMLFramework().text, "Hello, World!") + + + func testPlantUML() { + + let clazz = SyntaxStructure(rawValue: "Bob -> Alice : hello") + + let script = PlantUMLScript( items: [clazz] ) + + let url = plantUMLUrl( of: script, format: .ASCIIArt ) + + print( url ) + + } + + func testPlantUMLWithError() { + + let clazz = SyntaxStructure(rawValue: "Bob > Alice : hello") + + let script = PlantUMLScript( items: [clazz] ) + + var url = plantUMLUrl( of: script, format: .ASCIIArt ) + + print( url ) + + url = plantUMLUrl( of: script, format: .imagePng ) + + print( url ) + } }