You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
986 B
43 lines
986 B
//
|
|
// FunctionTest.swift
|
|
// GMERemittanceTests
|
|
//
|
|
// Created by InKwon Devik Kim on 09/07/2019.
|
|
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import XCTest
|
|
@testable import GME_Remit
|
|
|
|
class FunctionTest: XCTestCase {
|
|
func testExpireDate() {
|
|
guard let remindDay = Utility.calculateDDay(registDate: "7/10/2019 4:19:37 PM")
|
|
else {
|
|
XCTAssert(false)
|
|
return
|
|
}
|
|
XCTAssert(remindDay == "365")
|
|
|
|
}
|
|
|
|
func testDateFormat() {
|
|
let dateFormatter = DateFormatter()
|
|
|
|
dateFormatter.dateFormat = "M/d/yyyy h:mm:ss a"
|
|
dateFormatter.locale = Locale(identifier: "ko_kr")
|
|
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
|
|
|
|
var dateComponent = DateComponents()
|
|
dateComponent.year = 1
|
|
|
|
let resigstDate = "7/11/2019 4:19:37 PM"
|
|
|
|
guard
|
|
let date = dateFormatter.date(from: resigstDate) else {
|
|
XCTAssert(false)
|
|
return
|
|
}
|
|
|
|
print("Date: \(date)")
|
|
}
|
|
}
|