<commit_before>//
//  ObservableStoreTests.swift
//  ReSwiftRx
//
//  Created by <NAME> on 25/11/16.
//  Copyright © 2015 DigiTales. All rights reserved.
//

import XCTest
@testable import ReSwiftRx

class ObservableStoreTests: XCTestCase {

    /**
     it dispatches an Init action when it doesn't receive an initial state
     */
    func testInit() {
        let reducer = MockReducer()
        _ = Store(reducer: reducer,
                  stateType: CounterState.self,
                  observable: ObservableProperty(CounterState()))

        XCTAssert(reducer.calledWithAction.first is ReSwiftInit?)
    }

    /**
     it deinitializes when no reference is held
     */
    func testDeinit() {
        var deInitCount = 0

        autoreleasepool {
            _ = DeInitStore(reducer: TestReducer(),
                                      stateType: TestAppState.self,
                                      observable: ObservableProperty(TestAppState()),<commit_msg>Remove ReSwiftInit and tests relating to it<commit_after>//
//  ObservableStoreTests.swift
//  ReSwiftRx
//
//  Created by <NAME> on 25/11/16.
//  Copyright © 2015 DigiTales. All rights reserved.
//

import XCTest
@testable import ReSwiftRx

class ObservableStoreTests: XCTestCase {

    /**
     it deinitializes when no reference is held
     */
    func testDeinit() {
        var deInitCount = 0

        autoreleasepool {
            _ = DeInitStore(reducer: TestReducer(),
                                      stateType: TestAppState.self,
                                      observable: ObservableProperty(TestAppState()),
{'fraction_non_alphanumeric': 0.0864965774735532, 'fraction_numerical': 0.013690105787181083, 'mean_word_length': 1.9504587155963302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1357095', 'n_tokens_mistral': 473, 'n_tokens_neox': 430, 'n_words': 115}