This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
import CoreData | |
@testable import DoIt | |
/// Test the DatabaseManager against a Mock Database Manager. | |
/// | |
/// Note that testing is done against a mock version of the database, linking | |
/// to the memory instead of the actual SQLite file. | |
/// | |
/// - Author: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This work is licensed under a Creative Commons | |
// Attribution-ShareAlike 4.0 International License. | |
// © 2016 Rafael Papallas and www.computingstories.com | |
import Foundation | |
import CoreData | |
/// Mock version of DatabaseManager for testing purposes. | |
/// | |
/// This intent of this class it to inherit all functionality from DatabaseManager |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This work is licensed under a Creative Commons | |
// Attribution-ShareAlike 4.0 International License. | |
// © 2016 Rafael Papallas and www.computingstories.com | |
import Foundation | |
import CoreData | |
class DatabaseManager { | |
/// Implements the Singleton Design Pattern | |
static let instance = DatabaseManager() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
factorial n = product [1..n] |
NewerOlder