<commit_before>import XCTest
@testable import nubecero

class TFDatabaseModelAlbum:XCTestCase
{
    
}<commit_msg>test init name<commit_after>import XCTest
@testable import nubecero

class TFDatabaseModelAlbum:XCTestCase
{
    private let kName:String = "a super cool nubecero album"
    private let kCreated:TimeInterval = 154423
    private let kNoName:String = ""
    private let kNoTime:TimeInterval = 0
    
    func testInitName()
    {
        let currentTime:TimeInterval = NSDate().timeIntervalSince1970
        
        let keyName:String = FDatabaseModelAlbum.Property.name.rawValue
        let keyCreated:String = FDatabaseModelAlbum.Property.created.rawValue
        let model:FDatabaseModelAlbum = FDatabaseModelAlbum(
            name:kName)
        
        XCTAssertEqual(
            model.name,
            kName,
            "Error storing name")
        
        XCTAssertGreaterThanOrEqual(
            model.created,
            currentTime,
            "Error created should be higher than current time")
        
        let modelJson:[String:Any]? = model.modelJson() as? [String:Any]
        
        XCTAssertNotNil(
            modelJson,
            "Error json is nil")
        
        let jsonCreated:TimeInterval? = modelJson?[keyCreated] as? TimeInterval
        let jsonName:String? = modelJson?[keyName] as? String
        
        XCTAssertGreaterThanOrEqual(
            jsonCreated!,
            currentTime,
            "Error json created")
        
        XCTAssertEqual(
            jsonName,
            kName,
            "Error json name")
    }
}
{'fraction_non_alphanumeric': 0.06833855799373041, 'fraction_numerical': 0.006896551724137931, 'mean_word_length': 2.0990291262135923, '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': '3956067', 'n_tokens_mistral': 454, 'n_tokens_neox': 441, 'n_words': 100}