test/src/scale/scale_collection_test.cpp
TEST(Scale, encodeCollectionUint16) {
  std::vector<uint16_t> collection = {1, 2, 3, 4};
  ScaleEncoderStream s;
  ASSERT_NO_THROW((s << collection));
  auto &&out = s.data();
  // clang-format off
  ASSERT_EQ(out,
          (ByteArray{
              16,  // header
            1, 0,  // first item
            2, 0,  // second item
            3, 0,  // third item
            4, 0  // fourth item
              }));
  // clang-format on
}
/**
 * @given collection of items of type uint16_t
 * @when encodeCollection is applied
 * @then expected result is obtained
 */
@given collection of items of type uint16_t
@when encodeCollection is applied
@then expected result is obtained
@given collection of items of type uint16_t @when encodeCollection is applied @then expected result is obtained
TEST(Scale, encodeCollectionUint16) {
  std::vector<uint16_t> collection = {1, 2, 3, 4};
  ScaleEncoderStream s;
  ASSERT_NO_THROW((s << collection));
  auto &&out = s.data();
  ASSERT_EQ(out,
          (ByteArray{
              16,  
            1, 0,  
            2, 0,  
            3, 0,  
            4, 0  
              }));
}
TEST ( Scale , encodeCollectionUint16 ) { std :: vector < uint16_t > collection = { 1 , 2 , 3 , 4 } ; ScaleEncoderStream s ; ASSERT_NO_THROW ( ( s << collection ) ) ; auto && out = s . data ( ) ; ASSERT_EQ ( out , ( ByteArray { 16 , 1 , 0 , 2 , 0 , 3 , 0 , 4 , 0 } ) ) ; }
@given collection of items of type uint16_t
 @when encodeCollection is applied
 @then expected result is obtained
@given collection of items of type uint16_t @when encodeCollection is applied @then expected result is obtained
// clang-format off // header // first item // second item // third item // fourth item // clang-format on