<commit_before>//
//  ReadRemainingInsulinMessageBodyTests.swift
//  RileyLink
//
//  Created by <NAME> on 5/25/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import XCTest
@testable import MinimedKit

class ReadRemainingInsulinMessageBodyTests: XCTestCase {
    
    func testReservoir723() {
        let message = PumpMessage(rxData: NSData(hexadecimalString: "a7594040730400000ca3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da")!)

        let body = message?.messageBody as! ReadRemainingInsulinMessageBody

        XCTAssertEqual(80.875, body.getUnitsRemainingForStrokes(PumpModel.Model723.strokesPerUnit))
    }
    
}<commit_msg>Adding a test case for the 522 decoding<commit_after>//
//  ReadRemainingInsulinMessageBodyTests.swift
//  RileyLink
//
//  Created by <NAME> on 5/25/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import XCTest
@testable import MinimedKit

class ReadRemainingInsulinMessageBodyTests: XCTestCase {
    
    func testReservoir723() {
        let message = PumpMessage(rxData: NSData(hexadecimalString: "a7594040730400000ca3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da")!)

        let body = message?.messageBody as! ReadRemainingInsulinMessageBody

        XCTAssertEqual(80.875, body.getUnitsRemainingForStrokes(PumpModel.Model723.strokesPerUnit))
    }

    func testReservoir522() {
        let message = PumpMessage(rxData: NSData(hexadecimalString: "a7578398730205460000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c2")!)

        let body = message?.messageBody as! ReadRemainingInsulinMessageBody

        XCTAssertEqual(135.0, body.getUnitsRemainingForStrokes(PumpModel.Model522.strokesPerUnit))
    }

}
{'fraction_non_alphanumeric': 0.07639620653319283, 'fraction_numerical': 0.24604847207586933, 'mean_word_length': 5.165584415584416, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, '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': '3956614', 'n_tokens_mistral': 943, 'n_tokens_neox': 518, 'n_words': 95}