push
github
40 of 99 new or added lines in 7 files covered. (40.4%)
207 existing lines in 11 files now uncovered.4802 of 11563 relevant lines covered (41.53%)
98.17 hits per line
1 |
import Domain |
|
2 |
import Foundation |
|
3 |
|
|
4 |
struct LongFormPrismDID {
|
|
5 |
private let prismMethodId: PrismDIDMethodId
|
|
6 |
let did: DID |
|
7 |
let stateHash: String |
|
8 |
let encodedState: String |
|
9 |
|
|
UNCOV
10
|
init(did: DID) throws { |
× |
UNCOV
11
|
self.did = did |
× |
UNCOV
12
|
let methodId = try PrismDIDMethodId(string: did.methodId) |
× |
UNCOV
13
|
|
× |
UNCOV
14
|
guard |
× |
UNCOV
15
|
methodId.sections.count == 2,
|
× |
UNCOV
16
|
let stateHash = methodId.sections.first, |
× |
UNCOV
17
|
let encodedState = methodId.sections.last |
× |
UNCOV
18
|
else { throw CastorError.invalidLongFormDID } |
× |
UNCOV
19
|
|
× |
UNCOV
20
|
prismMethodId = methodId |
× |
UNCOV
21
|
self.stateHash = stateHash |
× |
UNCOV
22
|
self.encodedState = encodedState |
× |
UNCOV
23
|
} |
× |
24 |
} |