 class TestQuizDelegate: QuizDelegate {
   let quiz: Quiz
   let onFinish: (Int) -> ()
+  private var score = 0
 
   init(quiz: Quiz, onFinish: @escaping (Int) -> ()) {
     self.quiz = quiz

import XCTest
@testable import Conjugar

class QuizTests: XCTestCase {
  private let testGameCenter = TestGameCenter()


    onFinish(quiz.score)
  }

  func scoreDidChange(newScore: Int) {
    score = newScore
    XCTAssert(score >= 0 && score <= difficultSpain)
  }

  func timeDidChange(newTime: Int) {
    // Note: The time is always 0, so I'm not going to bother testing it.
    // I could slow down the test so it takes longer than 0 seconds, but
    // that would be contrary to the quickness goal of unit tests.
  }

  func progressDidChange(current: Int, total: Int) {
    let questionCount = 50
    XCTAssert(current >= 0 && current < questionCount)
    XCTAssertEqual(total, questionCount)
  }
}
