Skip to content

Commit

Permalink
test(unit): ScheduleInfoQuery
Browse files Browse the repository at this point in the history
Signed-off-by: Ricky Saechao <[email protected]>
  • Loading branch information
RickyLB committed Aug 22, 2023
1 parent 7a3203c commit 7f65696
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Tests/HederaTests/ScheduleInfoQueryTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2023 Hedera Hashgraph, LLC
* ​
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ‍
*/

import SnapshotTesting
import XCTest

@testable import Hedera

internal final class ScheduleInfoQueryTests: XCTestCase {
internal func testSerialize() throws {
let query = try ScheduleInfoQuery()
.scheduleId(ScheduleId.fromString("0.0.5005"))
.maxPaymentAmount(100000)
.toQueryProtobufWith(.init())

assertSnapshot(matching: query, as: .description)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
HederaProtobufs.Proto_Query:
scheduleGetInfo {
header {
}
scheduleID {
scheduleNum: 5005
}
}

0 comments on commit 7f65696

Please sign in to comment.