<commit_before>//
//  BondTests.swift
//  BondTests
//
//  Created by <NAME> on 19/07/16.
//  Copyright © 2016 Swift Bond. All rights reserved.
//

import XCTest
import ReactiveKit
@testable import Bond

class BondTests: XCTestCase {

  func testUIView() {
    let view = UIView()

    SafeSignal.just(UIColor.red).bind(to: view.reactive.backgroundColor)
    XCTAssertEqual(view.backgroundColor!, UIColor.red)

    SafeSignal.just(0.3).bind(to: view.reactive.alpha)
    XCTAssertEqual(view.alpha, 0.3)

    SafeSignal.just(true).bind(to: view.reactive.isHidden)
    XCTAssertEqual(view.isHidden, true)

    SafeSignal.just(true).bind(to: view.reactive.isUserInteractionEnabled)
    XCTAssertEqual(view.isUserInteractionEnabled, true)

    SafeSignal.just(UIColor.red).bind(to: view.reactive.tintColor)
    XCTAssertEqual(view.tintColor, UIColor.red)
  }

  func testUIActivityIndicatorView() {
    let subject = PublishSubject1<Bool>()

    let view = UIActivityIndicatorView()
    subject.bind(to: view.reactive.animating)

    XCTAssertEqual(view.isAnimating, false)

    subject.next(true)
    XCTAssertEqual(view.isAnimating, true)

    subject.next(false)<commit_msg>Fix tests<commit_after>//
//  BondTests.swift
//  BondTests
//
//  Created by <NAME> on 19/07/16.
//  Copyright © 2016 Swift Bond. All rights reserved.
//

import XCTest
import ReactiveKit
@testable import Bond

class BondTests: XCTestCase {

  func testUIView() {
    let view = UIView()

    SafeSignal.just(UIColor.red).bind(to: view.reactive.backgroundColor)
    XCTAssertEqual(view.backgroundColor!, UIColor.red)

    SafeSignal.just(0.3).bind(to: view.reactive.alpha)
    XCTAssertEqual(view.alpha, 0.3)

    SafeSignal.just(true).bind(to: view.reactive.isHidden)
    XCTAssertEqual(view.isHidden, true)

    SafeSignal.just(true).bind(to: view.reactive.isUserInteractionEnabled)
    XCTAssertEqual(view.isUserInteractionEnabled, true)

    SafeSignal.just(UIColor.red).bind(to: view.reactive.tintColor)
    XCTAssertEqual(view.tintColor, UIColor.red)
  }

  func testUIActivityIndicatorView() {
    let subject = PublishSubject1<Bool>()

    let view = UIActivityIndicatorView()
    subject.bind(to: view.reactive.isAnimating)

    XCTAssertEqual(view.isAnimating, false)

    subject.next(true)
    XCTAssertEqual(view.isAnimating, true)

    subject.next(false)
{'fraction_non_alphanumeric': 0.11870196413321947, 'fraction_numerical': 0.012809564474807857, 'mean_word_length': 4.027896995708154, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2456442', 'n_tokens_mistral': 829, 'n_tokens_neox': 791, 'n_words': 134}