Skip to content

Instantly share code, notes, and snippets.

@jeremiahredekop
Created December 11, 2011 06:50
Show Gist options
  • Save jeremiahredekop/1458940 to your computer and use it in GitHub Desktop.
Save jeremiahredekop/1458940 to your computer and use it in GitHub Desktop.
My First CQRS Test
[Test]
public void Assert_that_view_can_respond_to_events_via_bus_and_make_dto()
{
var myRepo = _container.Resolve<IRepository<AllProductsViewDto>>();
_bus.PublishEvents(new[]
{
new ProductCreated("Bingo",100)
});
var myDto = myRepo.GetById(100);
myDto.Should().NotBeNull();
myDto.Name.Should().Be("Bingo");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment