eventstore_client_test 0.5.0 copy "eventstore_client_test: ^0.5.0" to clipboard
eventstore_client_test: ^0.5.0 copied to clipboard

outdated

A testing library for applications using EventStore Client with a local EventStoreDB instance.

Pub Dart codecov

A testing library for applications using EventStore Client with a local EventStoreDB instance.

Usage #

A simple usage example setup for testing an event-sourced application:

import 'package:eventstore_client/eventstore_client.dart';
import 'package:eventstore_client_test/eventstore_client_test.dart';
import 'package:test/test.dart';

void main() {
  // Reusable test resources
  late EventStoreStreamsClient client;
  late EventStoreServerSingleNode server;

  setUpAll(() {
    server = EventStoreServerSingleNode();
    client = EventStoreStreamsClient(
      EventStoreClientSettings.parse('esdb://127.0.0.1:2113'),
    );
    return server.start();
  });

  tearDownAll(() async {
    await client.shutdown();
    await server.stop();
  });

  test('test application', () {
    // TODO: Add test using client
  });
}

If you want to run an application against a standalone EventStoreDB running locally, you can use the command-line tool esdbtcli provided by this package. Before you can use it, you need to active it with:

dart pub global activate eventstore_client_test 

For more information about usage, run

esdbtcli -h

A command-line tool for testing EventStoreDB locally

Usage: esdbtcli <command> [arguments]

Global options:
-h, --help            Print this usage information.
-v, --[no-]verbose    Prints more output.

Available commands:
  certs   Generates self-signed certificates for EventStoreDB
  start   Start a single EventStoreDB instance in docker
  stop    Stop a single EventStoreDB instance running in docker

Run "esdbtcli help <command>" for more information about a command.

Note

All test utilities for working with EventStoreDB instances assumes that docker is installed on your machine.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
0
points
160
downloads

Publisher

verified publisherdiscoos.org

Weekly Downloads

A testing library for applications using EventStore Client with a local EventStoreDB instance.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, eventstore_client, file, logging, path, shell, universal_io

More

Packages that depend on eventstore_client_test