Skip to content

Instantly share code, notes, and snippets.

@maltebucksch
Created May 22, 2018 08:29
Show Gist options
  • Save maltebucksch/cff3f1767170b40e40b4d4398ca90611 to your computer and use it in GitHub Desktop.
Save maltebucksch/cff3f1767170b40e40b4d4398ca90611 to your computer and use it in GitHub Desktop.
Evaluating a great developer team
func test_TeamIsAwesome() {
let quickBirdTeamMembers = fetchTeamMembers()
let awesomeTeamMembers = quickBirdTeamMembers.filter { teamMember in
teamMember.isPassionate &&
teamMember.isFriendly &&
teamMember.isConstantlyImproving
}
XCTAssertEqual(quickBirdTeamMembers.count, awesomeTeamMembers.count)
}
@klaas
Copy link

klaas commented Jun 4, 2019

// $0 could be used, but is not that expressive

XCTAssertTrue(quickBirdTeamMembers..allSatisfy { teamMember in
            teamMember.isPassionate &&
            teamMember.isFriendly &&
            teamMember.isConstantlyImproving
})

@SmartArray
Copy link

Awesome! 😄

@FrankVilla
Copy link

Awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment