<commit_before>//
//  TabmanBarAppearanceTests.swift
//  Tabman
//
//  Created by <NAME> on 10/03/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import XCTest
@testable import Tabman
import Pageboy

class TabmanBarAppearanceTests: TabmanViewControllerTests {
    
    func testPreferredIndicatorStyleConformance() {
        self.tabmanViewController.bar.style = .buttonBar
        self.tabmanViewController.bar.appearance = TabmanBar.Appearance({ (appearance) in
            appearance.indicator.preferredStyle = .dot
        })
        
        self.tabmanViewController.bar.appearance = TabmanBar.Appearance({ (appearance) in
            appearance.indicator.preferredStyle = .chevron
        })
        
        let indicator = self.tabmanViewController.tabmanBar!.indicator!
        let type = TabmanIndicator.Style.chevron.rawType!
        
        XCTAssertTrue(type(of: indicator) == type,
                      "preferredIndicatorStyle is incorrectly ignored when using .buttonBar style")
    }
    
    func testPreferredIndicatorStyleIgnorance() {
        self.tabmanViewController.bar.style = .blockTabBar
        self.tabmanViewController.bar.appearance = TabmanBar.Appearance({ (appearance) in
            appearance.indicator.preferredStyle = .dot
        })
        
        let indicator = self.tabmanViewController.tabmanBar!.indicator!
        let type = TabmanIndicator.Style.dot.rawType!
        
        XCTAssertFalse(type(of: indicator) == type,
                       "preferredIndicatorStyle is incorrectly conformed to when using .blockTabBar style")
    }
    
    func testBackgroundStyleConformance() {
        
        self.tabmanViewController.bar.appearance = TabmanBar.Appearance({ (appearance) in
            appearance.style.background = .blur(style: .dark)
        })
        
        let backgroundStyle = self.tabmanViewController.tabmanBar!.backgroundView.backgroundStyle
        XCTAssertTrue(backgroundStyle != .none,
                      "background style in TabmanBarAppearance is ignored incorrectly")
    }
}<commit_msg>Fix broken tests<commit_after>//
//  TabmanBarAppearanceTests.swift
//  Tabman
//
//  Created by <NAME> on 10/03/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import XCTest
@testable import Tabman
import Pageboy

class TabmanBarAppearanceTests: TabmanViewControllerTests {
    
    func testPreferredIndicatorStyleConformance() {
        self.tabmanViewController.bar.style = .buttonBar
        self.tabmanViewController.bar.appearance = TabmanBar.Appearance({ (appearance) in
            appearance.indicator.preferredStyle = .dot
        })
        
        self.tabmanViewController.bar.appearance = TabmanBar.Appearance({ (appearance) in
            appearance.indicator.preferredStyle = .chevron
        })
        
        let indicator = self.tabmanViewController.tabmanBar!.indicator!
        let type = TabmanIndicator.Style.chevron.rawType!
        
        XCTAssertTrue(type(of: indicator) == type,
                      "preferredIndicatorStyle is incorrectly ignored when using .buttonBar style")
    }
    
    func testPreferredIndicatorStyleIgnorance() {
        self.tabmanViewController.bar.style = .blockTabBar
        self.tabmanViewController.bar.appearance = TabmanBar.Appearance({ (appearance) in
            appearance.indicator.preferredStyle = .dot
        })
        
        let indicator = self.tabmanViewController.tabmanBar!.indicator!
        let type = TabmanIndicator.Style.dot.rawType!
        
        XCTAssertFalse(type(of: indicator) == type,
                       "preferredIndicatorStyle is incorrectly conformed to when using .blockTabBar style")
    }
    
    func testBackgroundStyleConformance() {
        
        self.tabmanViewController.bar.appearance = TabmanBar.Appearance({ (appearance) in
            appearance.style.background = .blur(style: .dark)
        })
        
        let backgroundStyle = self.tabmanViewController.tabmanBar!.backgroundView.style
        XCTAssertTrue(backgroundStyle != .none,
                      "background style in TabmanBarAppearance is ignored incorrectly")
    }
}
{'fraction_non_alphanumeric': 0.08479884365213201, 'fraction_numerical': 0.005781739339918092, 'mean_word_length': 2.5396419437340154, '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': '2006850', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1102, 'n_words': 216}