guardia-messenger/node_modules/expo-modules-core/ios/Tests/EnumerableSpec.swift
DESKTOP-TKLFCPRython f29f525c77 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 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>
2026-05-31 10:09:17 +09:00

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
}