Integration tests implementation for stream_factory_create_stream() with the fs_stream adapter.
More...
#include "fs_stream/cr/fs_stream_cr_api.h"#include "stream/borrowers/stream.h"#include "stream/lifecycle/stream_lifecycle.h"#include "stream/cr/stream_factory_cr_api.h"#include "osal/file/test/osal_file_fake_provider.h"#include "osal/mem/osal_mem.h"#include "policy/lexleo_cstd_types.h"#include "policy/lexleo_cstd_lib.h"#include "policy/lexleo_cstd_jmp.h"#include "lexleo_cmocka.h"
Go to the source code of this file.
This file implements integration-level validation of the interaction between the stream factory and the fs_stream adapter registered through the Composition Root API.
Covered surfaces:
stream_factory_create_stream()fs_stream descriptor registrationTest strategy:
fs_stream_create_desc()fake_fileLocal test doubles:
fake_fileSee also:
Definition in file integration_test_stream_factory_fs_stream.c.
stream_status_t stream_factory_create_stream( const stream_factory_t *f, stream_key_t key, const void *args, stream_t **out );
Precondition:
f designates a valid factory instance previously created by stream_create_factory().fs_stream adapter descriptor registered under the key "fs".args designates a valid fs_stream_args_t object prepared by the fixture.Invalid arguments:
f, key, args, and out must not be NULL.key must not be NULL and must not be an empty string.args->path must not be NULL and must not be an empty string.args->flags must not be zero.Success:
STREAM_STATUS_OK.*out.stream_destroy().Failure:
STREAM_STATUS_INVALID for invalid argumentsSTREAM_STATUS_NOT_FOUND if key is not registeredSTREAM_STATUS_IO_ERROR when OSAL file operations fail*out unchanged if out is not NULL.Doubles:
fake_fileSee also:
The scenarios below define the test oracle for stream_factory_create_stream() with the fs_stream adapter.
Definition at line 100 of file integration_test_stream_factory_fs_stream.c.