Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class When_Trying_To_Save_User : XCTestCase {
- private var dataAccess :DataAccess!
- override func setUp() {
- super.setUp()
- self.dataAccess = DataAccess()
- }
- func test_should_save_user_successfully() {
- let user = User(username :"johndoe", password: "password")
- _ = self.dataAccess.saveUser(user)
- // You can also get the user and compare the values of the username and password properties
- XCTAssertTrue(self.dataAccess.getUsers().count == 1)
- }
- }
Add Comment
Please, Sign In to add comment