Skip to content

Commit

Permalink
Update JSONCodecTests.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
rebello95 committed Oct 13, 2023
1 parent e60dc11 commit cf31c1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/ConnectLibraryTests/ConnectTests/JSONCodecTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class JSONCodecTests: XCTestCase {
}

func testSerializingAndDeserializingWithEnumsAsInts() throws {
let codec = JSONCodec(alwaysEncodeEnumsAsInts: true, encodeProtoFieldNames: false)
let codec = JSONCodec(alwaysEncodeEnumsAsInts: true, preserveProtobufFieldNames: false)
let serialized = try codec.serialize(message: self.message)
let dictionary = try XCTUnwrap(
try JSONSerialization.jsonObject(with: serialized) as? [String: Any]
Expand All @@ -42,7 +42,7 @@ final class JSONCodecTests: XCTestCase {
}

func testSerializingAndDeserializingWithEnumsAsStrings() throws {
let codec = JSONCodec(alwaysEncodeEnumsAsInts: false, encodeProtoFieldNames: false)
let codec = JSONCodec(alwaysEncodeEnumsAsInts: false, preserveProtobufFieldNames: false)
let serialized = try codec.serialize(message: self.message)
let dictionary = try XCTUnwrap(
try JSONSerialization.jsonObject(with: serialized) as? [String: Any]
Expand All @@ -51,8 +51,8 @@ final class JSONCodecTests: XCTestCase {
XCTAssertEqual(try codec.deserialize(source: serialized), self.message)
}

func testSerializingAndDeserializingWithProtoFieldNames() throws {
let codec = JSONCodec(alwaysEncodeEnumsAsInts: false, encodeProtoFieldNames: true)
func testSerializingAndDeserializingWithProtobufFieldNames() throws {
let codec = JSONCodec(alwaysEncodeEnumsAsInts: false, preserveProtobufFieldNames: true)
let serialized = try codec.serialize(message: self.message)
let dictionary = try XCTUnwrap(
try JSONSerialization.jsonObject(with: serialized) as? [String: Any]
Expand All @@ -66,7 +66,7 @@ final class JSONCodecTests: XCTestCase {
}

func testSerializingAndDeserializingWithCamelCaseFieldNames() throws {
let codec = JSONCodec(alwaysEncodeEnumsAsInts: false, encodeProtoFieldNames: false)
let codec = JSONCodec(alwaysEncodeEnumsAsInts: false, preserveProtobufFieldNames: false)
let serialized = try codec.serialize(message: self.message)
let dictionary = try XCTUnwrap(
try JSONSerialization.jsonObject(with: serialized) as? [String: Any]
Expand Down

0 comments on commit cf31c1d

Please sign in to comment.