<commit_before>import XCTest
@testable import gattaca

class TMHomeStrategyFactory:XCTestCase
{
    //MARK: internal
    
    func testFactoryStrategyNew()
    {
        let session:MSession = MSession(status:MSession.Status.new)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyNew:MHomeStrategyNew? = strategy as? MHomeStrategyNew
        
        XCTAssertNotNil(
            strategyNew,
            "failed loading strategy for status new")
    }
    
    func testFactoryStrategyLoading()
    {
        let session:MSession = MSession(status:MSession.Status.loading)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyLoading:MHomeStrategyLoading? = strategy as? MHomeStrategyLoading
        
        XCTAssertNotNil(
            strategyLoading,
            "failed loading strategy for status loading")
    }
    
    func testFactoryStrategySync()
    {
        let session:MSession = MSession(status:MSession.Status.sync)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategySync:MHomeStrategySync? = strategy as? MHomeStrategySync
        
        XCTAssertNotNil(
            strategySync,
            "failed loading strategy for status sync")
    }
    
    func testFactoryStrategyLoaded()
    {
        let session:MSession = MSession(status:MSession.Status.loaded)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyLoaded:MHomeStrategyLoaded? = strategy as? MHomeStrategyLoaded
        
        XCTAssertNotNil(
            strategyLoaded,
            "failed loading strategy for status loaded")
    }
    
    func testFactoryStrategyAuthLocation()
    {
        let session:MSession = MSession(status:MSession.Status.authLocation)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyLoaded:MHomeStrategyAuthLocation? = strategy as? MHomeStrategyAuthLocation
        
        XCTAssertNotNil(
            strategyLoaded,
            "failed loading strategy for auth location")
    }
}<commit_msg>Test strategy waiting for location<commit_after>import XCTest
@testable import gattaca

class TMHomeStrategyFactory:XCTestCase
{
    //MARK: internal
    
    func testFactoryStrategyNew()
    {
        let session:MSession = MSession(status:MSession.Status.new)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyNew:MHomeStrategyNew? = strategy as? MHomeStrategyNew
        
        XCTAssertNotNil(
            strategyNew,
            "failed loading strategy for status new")
    }
    
    func testFactoryStrategyLoading()
    {
        let session:MSession = MSession(status:MSession.Status.loading)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyLoading:MHomeStrategyLoading? = strategy as? MHomeStrategyLoading
        
        XCTAssertNotNil(
            strategyLoading,
            "failed loading strategy for status loading")
    }
    
    func testFactoryStrategySync()
    {
        let session:MSession = MSession(status:MSession.Status.sync)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategySync:MHomeStrategySync? = strategy as? MHomeStrategySync
        
        XCTAssertNotNil(
            strategySync,
            "failed loading strategy for status sync")
    }
    
    func testFactoryStrategyLoaded()
    {
        let session:MSession = MSession(status:MSession.Status.loaded)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyLoaded:MHomeStrategyLoaded? = strategy as? MHomeStrategyLoaded
        
        XCTAssertNotNil(
            strategyLoaded,
            "failed loading strategy for status loaded")
    }
    
    func testFactoryStrategyAuthLocation()
    {
        let session:MSession = MSession(status:MSession.Status.authLocation)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyAuthLocation:MHomeStrategyAuthLocation? = strategy as? MHomeStrategyAuthLocation
        
        XCTAssertNotNil(
            strategyAuthLocation,
            "failed loading strategy for auth location")
    }
    
    func testFactoryStrategyWaitingLocation()
    {
        let session:MSession = MSession(status:MSession.Status.waitingLocation)
        let controller:CHome = CHome(session:session)
        
        let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy(
            controller:controller)
        let strategyWaitingLocation:MHomeStrategyWaitingLocation? = strategy as? MHomeStrategyWaitingLocation
        
        XCTAssertNotNil(
            strategyWaitingLocation,
            "failed loading strategy waiting for location")
    }
}
{'fraction_non_alphanumeric': 0.06440443213296398, 'fraction_numerical': 0.0, 'mean_word_length': 2.535495716034272, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4261249', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1440, 'n_words': 297}