-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
126 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...codeProjTests/Objects/Files/PBXFileSystemSynchronizedBuildFileExceptionSet+Fixtures.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import XcodeProj | ||
|
||
extension PBXFileSystemSynchronizedBuildFileExceptionSet { | ||
static func fixture(target: PBXTarget = .fixture(), | ||
membershipExceptions: [String]? = [], | ||
publicHeaders: [String]? = [], | ||
privateHeaders: [String]? = []) -> PBXFileSystemSynchronizedBuildFileExceptionSet { | ||
return PBXFileSystemSynchronizedBuildFileExceptionSet(target: target, | ||
membershipExceptions: membershipExceptions, | ||
publicHeaders: publicHeaders, | ||
privateHeaders: privateHeaders) | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
Tests/XcodeProjTests/Objects/Files/PBXFileSystemSynchronizedBuildFileExceptionSetTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Foundation | ||
import XCTest | ||
@testable import XcodeProj | ||
|
||
final class PBXFileSystemSynchronizedBuildFileExceptionSetTests: XCTestCase { | ||
var target: PBXTarget! | ||
var subject: PBXFileSystemSynchronizedBuildFileExceptionSet! | ||
|
||
override func setUp() { | ||
super.setUp() | ||
target = PBXTarget.fixture() | ||
subject = PBXFileSystemSynchronizedBuildFileExceptionSet.fixture(target: target) | ||
} | ||
|
||
override func tearDown() { | ||
target = nil | ||
subject = nil | ||
super.tearDown() | ||
} | ||
|
||
func test_itHasTheCorrectIsa() { | ||
XCTAssertEqual(PBXFileSystemSynchronizedBuildFileExceptionSet.isa, "PBXFileSystemSynchronizedBuildFileExceptionSet") | ||
} | ||
|
||
func test_equal_returnsTheCorrectValue() { | ||
let another = PBXFileSystemSynchronizedBuildFileExceptionSet.fixture(target: target) | ||
XCTAssertEqual(subject, another) | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Tests/XcodeProjTests/Objects/Files/PBXFileSystemSynchronizedRootGroup+Fixtures.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import XcodeProj | ||
|
||
extension PBXFileSystemSynchronizedRootGroup { | ||
static func fixture(sourceTree: PBXSourceTree? = nil, | ||
path: String? = nil, | ||
name: String? = nil, | ||
includeInIndex: Bool? = nil, | ||
usesTabs: Bool? = nil, | ||
indentWidth: UInt? = nil, | ||
tabWidth: UInt? = nil, | ||
wrapsLines: Bool? = nil, | ||
explicitFileTypes: [String: String] = [:], | ||
exceptions: [PBXFileSystemSynchronizedBuildFileExceptionSet] = [], | ||
explicitFolders: [String] = []) -> PBXFileSystemSynchronizedRootGroup { | ||
return PBXFileSystemSynchronizedRootGroup(sourceTree: sourceTree, | ||
path: path, | ||
name: name, | ||
includeInIndex: includeInIndex, | ||
usesTabs: usesTabs, | ||
indentWidth: indentWidth, | ||
tabWidth: tabWidth, | ||
wrapsLines: wrapsLines, | ||
explicitFileTypes: explicitFileTypes, | ||
exceptions: exceptions, | ||
explicitFolders: explicitFolders) | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
Tests/XcodeProjTests/Objects/Files/PBXFileSystemSynchronizedRootGroupTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import Foundation | ||
import XCTest | ||
@testable import XcodeProj | ||
|
||
final class PBXFileSystemSynchronizedRootGroupTests: XCTestCase { | ||
var subject: PBXFileSystemSynchronizedRootGroup! | ||
var target: PBXTarget! | ||
var exception: PBXFileSystemSynchronizedBuildFileExceptionSet! | ||
|
||
override func setUp() { | ||
super.setUp() | ||
target = PBXTarget.fixture() | ||
exception = PBXFileSystemSynchronizedBuildFileExceptionSet.fixture(target: target) | ||
subject = PBXFileSystemSynchronizedRootGroup(sourceTree: .group, | ||
path: "synchronized", | ||
name: "synchronized", | ||
includeInIndex: true, | ||
usesTabs: true, | ||
indentWidth: 2, | ||
tabWidth: 2, | ||
wrapsLines: true, | ||
explicitFileTypes: ["Source.m": "sourcecode.c.objc"], | ||
exceptions: [exception], | ||
explicitFolders: []) | ||
} | ||
|
||
override func tearDown() { | ||
exception = nil | ||
subject = nil | ||
super.tearDown() | ||
} | ||
|
||
func test_itHasTheCorrectIsa() { | ||
XCTAssertEqual(PBXFileSystemSynchronizedRootGroup.isa, "PBXFileSystemSynchronizedRootGroup") | ||
} | ||
|
||
func test_equal_returnsTheCorrectValue() { | ||
let another = PBXFileSystemSynchronizedRootGroup(sourceTree: .group, | ||
path: "synchronized", | ||
name: "synchronized", | ||
includeInIndex: true, | ||
usesTabs: true, | ||
indentWidth: 2, | ||
tabWidth: 2, | ||
wrapsLines: true, | ||
explicitFileTypes: ["Source.m": "sourcecode.c.objc"], | ||
exceptions: [exception], | ||
explicitFolders: []) | ||
XCTAssertEqual(subject, another) | ||
} | ||
} |