|
1 |
| -import XCTest |
| 1 | +import Testing |
2 | 2 | @testable import Generator
|
3 | 3 |
|
4 |
| -class GeneratorTests: XCTestCase { |
5 |
| - func testAllTestsIncluded() { |
6 |
| - let generatorHelp = GeneratorHelp(exercise: "two-fer", filePath: "./Tests/GeneratorTests/files/all-tests-included") |
7 |
| - XCTAssertNoThrow(try generatorHelp.toml()) |
8 |
| - let expected = ["1cf3e15a-a3d7-4a87-aeb3-ba1b43bc8dce", "3549048d-1a6e-4653-9a79-b0bda163e8d5", "b4c6dbb8-b4fb-42c2-bafd-10785abe7709"] |
9 |
| - XCTAssertEqual(generatorHelp.uuids, expected) |
10 |
| - } |
| 4 | +@Test("Testing having all tests be included") |
| 5 | +func testAllTestsIncluded() { |
| 6 | + let generatorHelp = GeneratorHelp(exercise: "two-fer", filePath: "./Tests/GeneratorTests/files/all-tests-included") |
| 7 | + #expect(throws: Never.self) {try generatorHelp.toml()} |
| 8 | + let expected = ["1cf3e15a-a3d7-4a87-aeb3-ba1b43bc8dce", "3549048d-1a6e-4653-9a79-b0bda163e8d5", "b4c6dbb8-b4fb-42c2-bafd-10785abe7709"] |
| 9 | + #expect(generatorHelp.uuids == expected) |
| 10 | +} |
11 | 11 |
|
12 |
| - func testAllTestsRemoved() { |
13 |
| - let generatorHelp = GeneratorHelp(exercise: "two-fer", filePath: "./Tests/GeneratorTests/files/all-test-removed") |
14 |
| - XCTAssertNoThrow(try generatorHelp.toml()) |
15 |
| - let expected: [String] = [] |
16 |
| - XCTAssertEqual(generatorHelp.uuids, expected) |
17 |
| - } |
| 12 | +@Test("Testing having all tests be removed") |
| 13 | +func testAllTestsRemoved() { |
| 14 | + let generatorHelp = GeneratorHelp(exercise: "two-fer", filePath: "./Tests/GeneratorTests/files/all-test-removed") |
| 15 | + #expect(throws: Never.self) {try generatorHelp.toml()} |
| 16 | + let expected: [String] = [] |
| 17 | + #expect(generatorHelp.uuids == expected) |
| 18 | +} |
18 | 19 |
|
19 |
| - func testTwoTestsRemoved() { |
20 |
| - let generatorHelp = GeneratorHelp(exercise: "two-fer", filePath: "./Tests/GeneratorTests/files/two-tests-removed") |
21 |
| - XCTAssertNoThrow(try generatorHelp.toml()) |
22 |
| - let expected = ["b4c6dbb8-b4fb-42c2-bafd-10785abe7709"] |
23 |
| - XCTAssertEqual(generatorHelp.uuids, expected) |
24 |
| - } |
| 20 | +@Test("Testing having two tests be removed") |
| 21 | +func testTwoTestsRemoved() { |
| 22 | + let generatorHelp = GeneratorHelp(exercise: "two-fer", filePath: "./Tests/GeneratorTests/files/two-tests-removed") |
| 23 | + #expect(throws: Never.self) {try generatorHelp.toml()} |
| 24 | + let expected = ["b4c6dbb8-b4fb-42c2-bafd-10785abe7709"] |
| 25 | + #expect(generatorHelp.uuids == expected) |
25 | 26 | }
|
0 commit comments