LCOV - code coverage report
Current view: top level - shared_model/backend/protobuf/commands/impl - proto_add_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_add_asset_quantity.hpp"
       7             : 
       8             : namespace shared_model {
       9             :   namespace proto {
      10             : 
      11             :     template <typename CommandType>
      12             :     AddAssetQuantity::AddAssetQuantity(CommandType &&command)
      13        1347 :         : CopyableProto(std::forward<CommandType>(command)),
      14        1347 :           add_asset_quantity_{proto_->add_asset_quantity()},
      15             :           amount_{[this] {
      16         594 :             return interface::Amount(add_asset_quantity_.amount());
      17        1347 :           }} {}
      18             : 
      19             :     // TODO 30/05/2018 andrei Reduce boilerplate code in variant classes
      20             :     template AddAssetQuantity::AddAssetQuantity(
      21             :         AddAssetQuantity::TransportType &);
      22             :     template AddAssetQuantity::AddAssetQuantity(
      23             :         const AddAssetQuantity::TransportType &);
      24             :     template AddAssetQuantity::AddAssetQuantity(
      25             :         AddAssetQuantity::TransportType &&);
      26             : 
      27             :     AddAssetQuantity::AddAssetQuantity(const AddAssetQuantity &o)
      28           0 :         : AddAssetQuantity(o.proto_) {}
      29             : 
      30             :     AddAssetQuantity::AddAssetQuantity(AddAssetQuantity &&o) noexcept
      31        1347 :         : AddAssetQuantity(std::move(o.proto_)) {}
      32             : 
      33             :     const interface::types::AssetIdType &AddAssetQuantity::assetId() const {
      34         703 :       return add_asset_quantity_.asset_id();
      35             :     }
      36             : 
      37             :     const interface::Amount &AddAssetQuantity::amount() const {
      38         846 :       return *amount_;
      39             :     }
      40             : 
      41             :   }  // namespace proto
      42             : }  // namespace shared_model

Generated by: LCOV version 1.13