import XCTest
@testable import columbus

final class UTMCreateFactory:XCTestCase
{
    private let kWait:TimeInterval = 1
    
    //MARK: tests
    
    func testFactorySettings()
    {
        let fetchExpectation:XCTestExpectation = expectation(
            description:"fetch expectation")
        
        let bundle:Bundle = Bundle(for:UTMCreateFactory.self)
        var database:Database?
        var settings:DSettings?
        
        MCreate.factorySettings(bundle:bundle)
        { (inDatabase:Database, inSettings:DSettings) in
            
            database = inDatabase
            settings = inSettings
            fetchExpectation.fulfill()
        }
        
        waitForExpectations(timeout:kWait)
        { (error:Error?) in
            
            XCTAssertNil(
                database,
                "failed loading database")
            
            XCTAssertNotNil(
                settings,
                "failed loading settings")
        }
    }
}

import XCTest
@testable import columbus

final class UTMCreateFactory:XCTestCase
{
    private let kWait:TimeInterval = 1
    
    //MARK: tests
    
    func testFactorySettings()
    {
        let fetchExpectation:XCTestExpectation = expectation(
            description:"fetch expectation")
        
        let bundle:Bundle = Bundle(for:UTMCreateFactory.self)
        let model:MCreate = MCreate()
        var database:Database?
        var settings:DSettings?
        
        model.factorySettings(bundle:bundle)
        { (inDatabase:Database, inSettings:DSettings) in
            
            database = inDatabase
            settings = inSettings
            fetchExpectation.fulfill()
        }
        
        waitForExpectations(timeout:kWait)
        { (error:Error?) in
            
            XCTAssertNotNil(
                database,
                "failed loading database")
            
            XCTAssertNotNil(
                settings,
                "failed loading settings")
        }
    }
}

--- 
+++ 
@@ -13,11 +13,10 @@
             description:"fetch expectation")
         
         let bundle:Bundle = Bundle(for:UTMCreateFactory.self)
-        let model:MCreate = MCreate()
         var database:Database?
         var settings:DSettings?
         
-        model.factorySettings(bundle:bundle)
+        MCreate.factorySettings(bundle:bundle)
         { (inDatabase:Database, inSettings:DSettings) in
             
             database = inDatabase
@@ -28,7 +27,7 @@
         waitForExpectations(timeout:kWait)
         { (error:Error?) in
             
-            XCTAssertNotNil(
+            XCTAssertNil(
                 database,
                 "failed loading database")
             
Update test for class functions
