<commit_before>//
//  VaporAPNSTests.swift
//  VaporAPNS
//
//  Created by <NAME> on 23/09/2016.
//
//

import XCTest
@testable import VaporAPNS

class VaporAPNSTests: XCTestCase { // TODO: Set this up so others can test this 😉
    
    let vaporAPNS: VaporAPNS! = nil
    
    override func setUp() {
        print ("Hi")
    }
    
    func testInitializer() throws {
        let wrongVaporAPNSInstance = try VaporAPNS(authKeyPath: "/Users/matthijs/Downloads/APNSAuthKey_T36248L7C8.p9")
        XCTAssertNil(wrongVaporAPNSInstance)
        
        let correctVaporAPNSInstance = try VaporAPNS(authKeyPath: "/Users/matthijs/Downloads/APNSAuthKey_T36248L7C8.p8")
        XCTAssertNotNil(correctVaporAPNSInstance)
    }
    
    func testSendPush() throws {
        let correctVaporAPNSInstance = try VaporAPNS(authKeyPath: "/Users/matthijs/Downloads/APNSAuthKey_T36248L7C8.p8")
        
        let pushMessage = ApplePushMessage(topic: "nl.logicbit.ReviusSchoolkrant", priority: .immediately, payload: Dictionary(), deviceToken: "43e798c31a282d129a34d84472bbdd7632562ff0732b58a85a27c5d9fdf59b69", sandbox: true)
        
        let t = correctVaporAPNSInstance?.send(applePushMessage: pushMessage)
        print (t)
    }
}<commit_msg>Changed tests<commit_after>//
//  VaporAPNSTests.swift
//  VaporAPNS
//
//  Created by <NAME> on 23/09/2016.
//
//

import XCTest
@testable import VaporAPNS

class VaporAPNSTests: XCTestCase { // TODO: Set this up so others can test this 😉
    
    let vaporAPNS: VaporAPNS! = nil
    
    override func setUp() {
        print ("Hi")
    }
    
    func testInitializer() throws {
    }
    
    func testSendPush() throws {
        let correctVaporAPNSInstance = try VaporAPNS(certPath: "/Users/matthijs/Downloads/newfile.crt.pem", keyPath: "/Users/matthijs/Downloads/newfile.key.pem")
        
        let pl = Payload(title: "Hello", body: "from here! :D")
        let pushMessage = ApplePushMessage(topic: "nl.logicbit.ReviusSchoolkrant", priority: .immediately, payload: pl, deviceToken: "<KEY>", sandbox: true)
        
        let t = correctVaporAPNSInstance.send(applePushMessage: pushMessage)
//        let t2 = correctVaporAPNSInstance.send(applePushMessage: pushMessage)
        print (t)
    }
}
{'fraction_non_alphanumeric': 0.1045838896306186, 'fraction_numerical': 0.037383177570093455, 'mean_word_length': 3.065099457504521, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3212376', 'n_tokens_mistral': 838, 'n_tokens_neox': 782, 'n_words': 155}