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
21cfba1a
Commit
21cfba1a
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Rename ContactFact model to Fact
parent
58bbf5f7
No related branches found
No related tags found
1 merge request
!3
Bindings models wrapper
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sources/ElixxirDAppsSDK/Fact.swift
+2
-2
2 additions, 2 deletions
Sources/ElixxirDAppsSDK/Fact.swift
Tests/ElixxirDAppsSDKTests/FactTests.swift
+3
-3
3 additions, 3 deletions
Tests/ElixxirDAppsSDKTests/FactTests.swift
with
5 additions
and
5 deletions
Sources/ElixxirDAppsSDK/
Contact
Fact.swift
→
Sources/ElixxirDAppsSDK/Fact.swift
+
2
−
2
View file @
21cfba1a
public
struct
Contact
Fact
:
Equatable
{
public
struct
Fact
:
Equatable
{
public
init
(
public
init
(
fact
:
String
,
fact
:
String
,
type
:
Int
type
:
Int
...
@@ -11,7 +11,7 @@ public struct ContactFact: Equatable {
...
@@ -11,7 +11,7 @@ public struct ContactFact: Equatable {
public
var
type
:
Int
public
var
type
:
Int
}
}
extension
Contact
Fact
:
Codable
{
extension
Fact
:
Codable
{
enum
CodingKeys
:
String
,
CodingKey
{
enum
CodingKeys
:
String
,
CodingKey
{
case
fact
=
"Fact"
case
fact
=
"Fact"
case
type
=
"Type"
case
type
=
"Type"
...
...
This diff is collapsed.
Click to expand it.
Tests/ElixxirDAppsSDKTests/
Contact
FactTests.swift
→
Tests/ElixxirDAppsSDKTests/FactTests.swift
+
3
−
3
View file @
21cfba1a
...
@@ -13,9 +13,9 @@ final class ContactFactTests: XCTestCase {
...
@@ -13,9 +13,9 @@ final class ContactFactTests: XCTestCase {
let
jsonData
=
jsonString
.
data
(
using
:
.
utf8
)
!
let
jsonData
=
jsonString
.
data
(
using
:
.
utf8
)
!
let
decoder
=
JSONDecoder
()
let
decoder
=
JSONDecoder
()
decoder
.
dataDecodingStrategy
=
.
base64
decoder
.
dataDecodingStrategy
=
.
base64
let
fact
=
try
decoder
.
decode
(
Contact
Fact
.
self
,
from
:
jsonData
)
let
fact
=
try
decoder
.
decode
(
Fact
.
self
,
from
:
jsonData
)
XCTAssertNoDifference
(
fact
,
Contact
Fact
(
XCTAssertNoDifference
(
fact
,
Fact
(
fact
:
"Zezima"
,
fact
:
"Zezima"
,
type
:
0
type
:
0
))
))
...
@@ -23,7 +23,7 @@ final class ContactFactTests: XCTestCase {
...
@@ -23,7 +23,7 @@ final class ContactFactTests: XCTestCase {
let
encoder
=
JSONEncoder
()
let
encoder
=
JSONEncoder
()
encoder
.
dataEncodingStrategy
=
.
base64
encoder
.
dataEncodingStrategy
=
.
base64
let
encodedFact
=
try
encoder
.
encode
(
fact
)
let
encodedFact
=
try
encoder
.
encode
(
fact
)
let
decodedFact
=
try
decoder
.
decode
(
Contact
Fact
.
self
,
from
:
encodedFact
)
let
decodedFact
=
try
decoder
.
decode
(
Fact
.
self
,
from
:
encodedFact
)
XCTAssertNoDifference
(
decodedFact
,
fact
)
XCTAssertNoDifference
(
decodedFact
,
fact
)
}
}
...
...
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