Skip to content

CQRS-Muflone/Muflone.SpecificationTests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muflone.SpecificationTests

Helper for creating specification tests with Muflone

Install

Install-Package Muflone.SpecificationTests

Usage

Look at this repo

Repository mocking

In the test's constructor implement your mock and replace the Repository property

public void MyTest()
{
  var repo = new Mock<InMemoryEventRepository> { CallBase = true };
  repo.Setup(x => x.GetById<Product>(It.IsAny<string>(), productId)).Returns(product);
  Repository = repo.Object;
}

About

Support for testing events

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages