---
url: https://node-ts.github.io/bus/api/bus-test/classes/TestCommand.md
---
[API reference](../../index.md) / [@node-ts/bus-test](../index.md) / TestCommand

# Class: TestCommand

Defined in: [bus-test/src/helpers/test-command.ts:3](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-command.ts#L3)

A base message type that is transmitted over a transport. Declaring messages with this base class enables
efficient routing and dispatch to handlers.

## Extends

* [`Command`](../../bus-messages/classes/Command.md)

## Constructors

### Constructor

```ts
new TestCommand(value, date): TestCommand;
```

Defined in: [bus-test/src/helpers/test-command.ts:10](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-command.ts#L10)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `string` |
| `date` | `Date` |

#### Returns

`TestCommand`

#### Overrides

[`Command`](../../bus-messages/classes/Command.md).[`constructor`](../../bus-messages/classes/Command.md#constructor)

## Properties

| Property | Modifier | Type | Default value | Overrides | Defined in |
| ------ | ------ | ------ | ------ | ------ | ------ |
| <a id="property-name"></a> `$name` | `public` | `string` | `TestCommand.NAME` | [`Command`](../../bus-messages/classes/Command.md).[`$name`](../../bus-messages/classes/Command.md#property-name) | [bus-test/src/helpers/test-command.ts:5](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-command.ts#L5) |
| <a id="property-version"></a> `$version` | `public` | `number` | `1` | [`Command`](../../bus-messages/classes/Command.md).[`$version`](../../bus-messages/classes/Command.md#property-version) | [bus-test/src/helpers/test-command.ts:6](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-command.ts#L6) |
| <a id="property-date"></a> `date` | `readonly` | `Date` | `undefined` | - | [bus-test/src/helpers/test-command.ts:8](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-command.ts#L8) |
| <a id="property-value"></a> `value` | `readonly` | `string` | `undefined` | - | [bus-test/src/helpers/test-command.ts:11](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-command.ts#L11) |
| <a id="property-name-1"></a> `NAME` | `static` | `string` | `'@node-ts/bus-core/test-command'` | - | [bus-test/src/helpers/test-command.ts:4](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-command.ts#L4) |
