LCOV - code coverage report
Current view: top level - shared_model/backend/protobuf/commands/impl - proto_transfer_asset.cpp (source / functions) Hit Total Coverage
Test: coverage_cleared.info Lines: 9 10 90.0 %
Date: 2018-12-05 17:11:35 Functions: 11 24 45.8 %

          Line data    Source code
       1             : /**
       2             :  * Copyright Soramitsu Co., Ltd. All Rights Reserved.
       3             :  * SPDX-License-Identifier: Apache-2.0
       4             :  */
       5             : 
       6             : #include "backend/protobuf/commands/proto_transfer_asset.hpp"
       7             : 
       8             : namespace shared_model {
       9             :   namespace proto {
      10             : 
      11             :     template <typename CommandType>
      12             :     TransferAsset::TransferAsset(CommandType &&command)
      13         976 :         : CopyableProto(std::forward<CommandType>(command)),
      14         976 :           transfer_asset_{proto_->transfer_asset()},
      15         976 :           amount_{
      16             :               [this] { return interface::Amount(transfer_asset_.amount()); }} {}
      17             : 
      18             :     template TransferAsset::TransferAsset(TransferAsset::TransportType &);
      19             :     template TransferAsset::TransferAsset(const TransferAsset::TransportType &);
      20             :     template TransferAsset::TransferAsset(TransferAsset::TransportType &&);
      21             : 
      22             :     TransferAsset::TransferAsset(const TransferAsset &o)
      23           0 :         : TransferAsset(o.proto_) {}
      24             : 
      25             :     TransferAsset::TransferAsset(TransferAsset &&o) noexcept
      26         976 :         : TransferAsset(std::move(o.proto_)) {}
      27             : 
      28             :     const interface::Amount &TransferAsset::amount() const {
      29         550 :       return *amount_;
      30             :     }
      31             : 
      32             :     const interface::types::AssetIdType &TransferAsset::assetId() const {
      33         537 :       return transfer_asset_.asset_id();
      34             :     }
      35             : 
      36             :     const interface::types::AccountIdType &TransferAsset::srcAccountId() const {
      37         828 :       return transfer_asset_.src_account_id();
      38             :     }
      39             : 
      40             :     const interface::types::AccountIdType &TransferAsset::destAccountId()
      41             :         const {
      42         828 :       return transfer_asset_.dest_account_id();
      43             :     }
      44             : 
      45             :     const interface::types::DescriptionType &TransferAsset::description()
      46             :         const {
      47         358 :       return transfer_asset_.description();
      48             :     }
      49             : 
      50             :   }  // namespace proto
      51             : }  // namespace shared_model

Generated by: LCOV version 1.13