Created
October 30, 2012 19:40
-
-
Save wayne-o/3982502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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