public void WillReturn404ForNotExistsPrayer() { var store = NewDocumentStore(); var controller = new SiddurController {RavenSession = store.OpenSession()}; var exception = Assert.Throws<HttpResponseException>(() => controller.GetPrayer("Not-Exists")); Assert.Equal(HttpStatusCode.NotFound, exception.Response.StatusCode); }
public void WillReturnTheCorrectPrayer() { var store = NewDocumentStore(); ImportData.Import(store); WaitForUserToContinueTheTest((EmbeddableDocumentStore) store); var controller = new SiddurController {RavenSession = store.OpenSession()}; var prayer = controller.GetPrayer("Tefilat-HaDerech"); Assert.Equal(1, prayer.Snippets.Count()); }