 
 final class InstanceAnalytics: NSObject {
   static let shared = InstanceAnalytics()
-  func logEvent(_ eventName: String, parameters: [String: Any]?) {
+  var loggedEvents: [(name: String, parameters: [String: Any]?)] = []
+
+  @objc func logEvent(_ eventName: String, parameters: [String: Any]?) {
+    self.loggedEvents.append((name: eventName, parameters: parameters))
   }
 }
 

}

final class RuntimeProviderTests: XCTestCase {
  func testClassProvider() {
    let provider = ClassProvider()
    XCTAssertTrue(provider.cls === ClassAnalytics.self)
    XCTAssertEqual(provider.selector, #selector(ClassAnalytics.logEvent(_:parameters:)))
    XCTAssertTrue(provider.responds)
  }

  func testInstanceProvider() {
    let provider = InstanceProvider()
    XCTAssertTrue(provider.cls === InstanceAnalytics.self)
    XCTAssertTrue(provider.instance === InstanceAnalytics.shared)
    XCTAssertEqual(provider.selector, #selector(InstanceAnalytics.logEvent(_:parameters:)))
    XCTAssertTrue(provider.responds)
  }
}

import Umbrella

final class ClassAnalytics: NSObject {
  static var loggedEvents: [(name: String, parameters: [String: Any]?)] = []

  class func logEvent(_ eventName: String, parameters: [String: Any]?) {
    self.loggedEvents.append((name: eventName, parameters: parameters))
  }
}

