updates for storage manager mock
This commit is contained in:
parent
ab9b6c8c89
commit
72d7c43445
@ -1,11 +1,11 @@
|
|||||||
#include "StorageManagerMock.h"
|
#include "StorageManagerMock.h"
|
||||||
|
|
||||||
ReturnValue_t StorageManagerMock::addData(store_address_t *storageId, const uint8_t *data,
|
ReturnValue_t StorageManagerMock::addData(store_address_t *storageId, const uint8_t *data,
|
||||||
size_t size, bool ignoreFault) {
|
size_t size) {
|
||||||
if (nextAddDataCallFails.first) {
|
if (nextAddDataCallFails.first) {
|
||||||
return nextAddDataCallFails.second;
|
return nextAddDataCallFails.second;
|
||||||
}
|
}
|
||||||
return LocalPool::addData(storageId, data, size, ignoreFault);
|
return LocalPool::addData(storageId, data, size);
|
||||||
}
|
}
|
||||||
ReturnValue_t StorageManagerMock::deleteData(store_address_t packet_id) {
|
ReturnValue_t StorageManagerMock::deleteData(store_address_t packet_id) {
|
||||||
if (nextDeleteDataCallFails.first) {
|
if (nextDeleteDataCallFails.first) {
|
||||||
@ -36,11 +36,11 @@ ReturnValue_t StorageManagerMock::modifyData(store_address_t packet_id, uint8_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t StorageManagerMock::getFreeElement(store_address_t *storageId, size_t size,
|
ReturnValue_t StorageManagerMock::getFreeElement(store_address_t *storageId, size_t size,
|
||||||
uint8_t **p_data, bool ignoreFault) {
|
uint8_t **p_data) {
|
||||||
if (nextFreeElementCallFails.first) {
|
if (nextFreeElementCallFails.first) {
|
||||||
return nextFreeElementCallFails.second;
|
return nextFreeElementCallFails.second;
|
||||||
}
|
}
|
||||||
return LocalPool::getFreeElement(storageId, size, p_data, ignoreFault);
|
return LocalPool::getFreeElement(storageId, size, p_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StorageManagerMock::hasDataAtId(store_address_t storeId) const {
|
bool StorageManagerMock::hasDataAtId(store_address_t storeId) const {
|
||||||
|
@ -8,15 +8,13 @@ class StorageManagerMock : public LocalPool {
|
|||||||
public:
|
public:
|
||||||
StorageManagerMock(object_id_t setObjectId, const LocalPoolConfig &poolConfig);
|
StorageManagerMock(object_id_t setObjectId, const LocalPoolConfig &poolConfig);
|
||||||
|
|
||||||
ReturnValue_t addData(store_address_t *storageId, const uint8_t *data, size_t size,
|
ReturnValue_t addData(store_address_t *storageId, const uint8_t *data, size_t size) override;
|
||||||
bool ignoreFault) override;
|
|
||||||
ReturnValue_t deleteData(store_address_t packet_id) override;
|
ReturnValue_t deleteData(store_address_t packet_id) override;
|
||||||
ReturnValue_t deleteData(uint8_t *buffer, size_t size, store_address_t *storeId) override;
|
ReturnValue_t deleteData(uint8_t *buffer, size_t size, store_address_t *storeId) override;
|
||||||
ReturnValue_t getData(store_address_t packet_id, const uint8_t **packet_ptr,
|
ReturnValue_t getData(store_address_t packet_id, const uint8_t **packet_ptr,
|
||||||
size_t *size) override;
|
size_t *size) override;
|
||||||
ReturnValue_t modifyData(store_address_t packet_id, uint8_t **packet_ptr, size_t *size) override;
|
ReturnValue_t modifyData(store_address_t packet_id, uint8_t **packet_ptr, size_t *size) override;
|
||||||
ReturnValue_t getFreeElement(store_address_t *storageId, size_t size, uint8_t **p_data,
|
ReturnValue_t getFreeElement(store_address_t *storageId, size_t size, uint8_t **p_data) override;
|
||||||
bool ignoreFault) override;
|
|
||||||
[[nodiscard]] bool hasDataAtId(store_address_t storeId) const override;
|
[[nodiscard]] bool hasDataAtId(store_address_t storeId) const override;
|
||||||
void clearStore() override;
|
void clearStore() override;
|
||||||
void clearSubPool(uint8_t poolIndex) override;
|
void clearSubPool(uint8_t poolIndex) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user