- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49 lines
1.3 KiB
Swift
49 lines
1.3 KiB
Swift
// Copyright 2022-present 650 Industries. All rights reserved.
|
|
|
|
import ExpoModulesTestCore
|
|
|
|
@testable import ExpoModulesCore
|
|
|
|
final class EnumerableSpec: ExpoSpec {
|
|
override class func spec() {
|
|
describe("static createFromRawValue") {
|
|
it("succeeds") {
|
|
expect(try Position.create(fromRawValue: "top")) == .top
|
|
expect(try Position.create(fromRawValue: "right")) == .right
|
|
}
|
|
it("throws EnumNoSuchValueException") {
|
|
expect { try Position.create(fromRawValue: "top-right") }.to(
|
|
throwError(errorType: EnumNoSuchValueException.self)
|
|
)
|
|
}
|
|
it("throws EnumCastingException") {
|
|
expect { try Position.create(fromRawValue: 4729) }.to(
|
|
throwError(errorType: EnumCastingException.self)
|
|
)
|
|
expect { try Position.create(fromRawValue: ["left"]) }.to(
|
|
throwError(errorType: EnumCastingException.self)
|
|
)
|
|
}
|
|
}
|
|
|
|
describe("anyRawValue") {
|
|
it("returns type-erased raw value") {
|
|
expect(Position.left.anyRawValue as? String) == Position.left.rawValue
|
|
}
|
|
}
|
|
|
|
describe("allRawValues") {
|
|
it("returns all raw values") {
|
|
expect(Position.allRawValues as? [String]) == ["top", "right", "bottom", "left"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private enum Position: String, Enumerable {
|
|
case top
|
|
case right
|
|
case bottom
|
|
case left
|
|
}
|