<commit_before>//
//  PreferencesWorkerTests.swift
//  SwiftyPress
//
//  Created by <NAME> on 2018-10-06.
//

import XCTest
import ZamzamCore
@testable import SwiftyPress

final class PreferencesTests: BaseTestCase {
    @Inject private var preferences: PreferencesType
}

extension PreferencesTests {
    
    func stestUserDefaults() {
        preferences.set("abc", forKey: .testString1)
        preferences.set("xyz", forKey: .testString2)
        preferences.set(true, forKey: .testBool1)
        preferences.set(false, forKey: .testBool2)
        preferences.set(123, forKey: .testInt1)
        preferences.set(987, forKey: .testInt2)
        preferences.set(1.1, forKey: .testFloat1)
        preferences.set(9.9, forKey: .testFloat2)
        preferences.set([1, 2, 3], forKey: .testArray)
        <commit_msg>Fix unit test typo<commit_after>//
//  PreferencesWorkerTests.swift
//  SwiftyPress
//
//  Created by <NAME> on 2018-10-06.
//

import XCTest
import ZamzamCore
@testable import SwiftyPress

final class PreferencesTests: BaseTestCase {
    @Inject private var preferences: PreferencesType
}

extension PreferencesTests {
    
    func testUserDefaults() {
        preferences.set("abc", forKey: .testString1)
        preferences.set("xyz", forKey: .testString2)
        preferences.set(true, forKey: .testBool1)
        preferences.set(false, forKey: .testBool2)
        preferences.set(123, forKey: .testInt1)
        preferences.set(987, forKey: .testInt2)
        preferences.set(1.1, forKey: .testFloat1)
        preferences.set(9.9, forKey: .testFloat2)
        preferences.set([1, 2, 3], forKey: .testArray)
        
{'fraction_non_alphanumeric': 0.115995115995116, 'fraction_numerical': 0.03540903540903541, 'mean_word_length': 3.0369458128078817, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4935901', 'n_tokens_mistral': 556, 'n_tokens_neox': 541, 'n_words': 117}