C# Class Kore.Domain.Tests.MockUnitOfWork

An implementation of Unit of Work that can be used in tests.
Inheritance: BaseUnitOfWork, IUnitOfWork
Mostrar archivo Open project: holotrek/kore-csharp Class Usage Examples

Public Methods

Method Description
BeginTransaction ( ) : void

Begins the transaction.

Commit ( ) : void

Commits the changes to the repositories in this unit of work.

Dispose ( ) : void

Disposes the unit of work and all corresponding repositories.

MockUnitOfWork ( IAuthenticationProvider authenticationProvider, IMessageProvider messageProvider, IDomainEventDispatcher eventDispatcher ) : System

Initializes a new instance of the MockUnitOfWork class.

Rollback ( ) : void

Rolls back the transaction.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Private Methods

Method Description
MockUnitOfWork ( ) : System

Prevents a default instance of the MockUnitOfWork class from being created.

Method Details

BeginTransaction() public method

Begins the transaction.
public BeginTransaction ( ) : void
return void

Commit() public method

Commits the changes to the repositories in this unit of work.
public Commit ( ) : void
return void

Dispose() public method

Disposes the unit of work and all corresponding repositories.
public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

MockUnitOfWork() public method

Initializes a new instance of the MockUnitOfWork class.
public MockUnitOfWork ( IAuthenticationProvider authenticationProvider, IMessageProvider messageProvider, IDomainEventDispatcher eventDispatcher ) : System
authenticationProvider IAuthenticationProvider The authentication provider.
messageProvider IMessageProvider The message provider.
eventDispatcher IDomainEventDispatcher The event dispatcher.
return System

Rollback() public method

Rolls back the transaction.
public Rollback ( ) : void
return void