Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:3982502
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
[Test]
public void When_fetching_all_documents_all_are_returned()
{
const int expectedCategoryCount = 2;
 
var container = new WindsorContainer();
container.Install(new MongoInstaller());
 
container.Register(Component.For(typeof (IRepository<>)).ImplementedBy(typeof (Repository<>)));
 
var repository = container.Resolve<IRepository<Category>>();
 
repository.Save(new Category
{
Id = "test1"
});
repository.Save(new Category
{
Id = "test2"
});
 
var result = repository.GetAll();
result.Count().Should().Be(expectedCategoryCount);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.