Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Commits
1444ea9a
Commit
1444ea9a
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Update GroupReport model
parent
8df6ce7c
No related branches found
No related tags found
2 merge requests
!102
Release 1.0.0
,
!78
Update Bindings
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sources/XXClient/Models/GroupReport.swift
+4
-0
4 additions, 0 deletions
Sources/XXClient/Models/GroupReport.swift
Tests/XXClientTests/Models/GroupReportTests.swift
+6
-3
6 additions, 3 deletions
Tests/XXClientTests/Models/GroupReportTests.swift
with
10 additions
and
3 deletions
Sources/XXClient/Models/GroupReport.swift
+
4
−
0
View file @
1444ea9a
...
...
@@ -4,15 +4,18 @@ public struct GroupReport: Equatable {
public
init
(
id
:
Data
,
rounds
:
[
Int
],
roundURL
:
String
,
status
:
Int
)
{
self
.
id
=
id
self
.
rounds
=
rounds
self
.
roundURL
=
roundURL
self
.
status
=
status
}
public
var
id
:
Data
public
var
rounds
:
[
Int
]
public
var
roundURL
:
String
public
var
status
:
Int
}
...
...
@@ -20,6 +23,7 @@ extension GroupReport: Codable {
enum
CodingKeys
:
String
,
CodingKey
{
case
id
=
"Id"
case
rounds
=
"Rounds"
case
roundURL
=
"RoundURL"
case
status
=
"Status"
}
...
...
This diff is collapsed.
Click to expand it.
Tests/XXClientTests/Models/GroupReportTests.swift
+
6
−
3
View file @
1444ea9a
...
...
@@ -4,13 +4,15 @@ import XCTest
final
class
GroupReportTests
:
XCTestCase
{
func
testCoding
()
throws
{
let
idB64
=
"EB/70R5HYEw5htZ4Hg9ondrn3+cAc/lH2G0mjQMja3w="
let
rounds
:
[
Int
]
=
[
1
,
5
,
9
]
let
status
:
Int
=
123
let
idB64
=
"AAAAAAAAAM0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE"
let
rounds
:
[
Int
]
=
[
25
,
64
]
let
roundURL
=
"https://dashboard.xx.network/rounds/25?xxmessenger=true"
let
status
:
Int
=
1
let
jsonString
=
"""
{
"
Id
": "
\(
idB64
)
",
"
Rounds
": [
\(
rounds
.
map
{
"
\(
$0
)
"
}
.
joined
(
separator
:
", "
)
)
],
"
RoundURL
": "
\(
roundURL
)
",
"
Status
":
\(
status
)
}
"""
...
...
@@ -20,6 +22,7 @@ final class GroupReportTests: XCTestCase {
XCTAssertNoDifference
(
model
,
GroupReport
(
id
:
Data
(
base64Encoded
:
idB64
)
!
,
rounds
:
rounds
,
roundURL
:
roundURL
,
status
:
status
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment