LCOV - code coverage report
Current view: top level - shared_model/backend/protobuf/commands/impl - proto_subtract_asset_quantity.cpp (source / functions) Hit Total Coverage
Test: coverage_cleared.info Lines: 7 8 87.5 %
Date: 2018-12-05 17:11:35 Functions: 8 21 38.1 %

          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_subtract_asset_quantity.hpp"
       7             : 
       8             : namespace shared_model {
       9             :   namespace proto {
      10             : 
      11             :     template <typename CommandType>
      12             :     SubtractAssetQuantity::SubtractAssetQuantity(CommandType &&command)
      13          45 :         : CopyableProto(std::forward<CommandType>(command)),
      14          45 :           subtract_asset_quantity_{proto_->subtract_asset_quantity()},
      15             :           amount_{[this] {
      16          31 :             return interface::Amount(subtract_asset_quantity_.amount());
      17          45 :           }} {}
      18             : 
      19             :     template SubtractAssetQuantity::SubtractAssetQuantity(
      20             :         SubtractAssetQuantity::TransportType &);
      21             :     template SubtractAssetQuantity::SubtractAssetQuantity(
      22             :         const SubtractAssetQuantity::TransportType &);
      23             :     template SubtractAssetQuantity::SubtractAssetQuantity(
      24             :         SubtractAssetQuantity::TransportType &&);
      25             : 
      26             :     SubtractAssetQuantity::SubtractAssetQuantity(const SubtractAssetQuantity &o)
      27           0 :         : SubtractAssetQuantity(o.proto_) {}
      28             : 
      29             :     SubtractAssetQuantity::SubtractAssetQuantity(
      30             :         SubtractAssetQuantity &&o) noexcept
      31          45 :         : SubtractAssetQuantity(std::move(o.proto_)) {}
      32             : 
      33             :     const interface::types::AssetIdType &SubtractAssetQuantity::assetId()
      34             :         const {
      35          35 :       return subtract_asset_quantity_.asset_id();
      36             :     }
      37             : 
      38             :     const interface::Amount &SubtractAssetQuantity::amount() const {
      39          44 :       return *amount_;
      40             :     }
      41             : 
      42             :   }  // namespace proto
      43             : }  // namespace shared_model

Generated by: LCOV version 1.13