Пример #1
0
        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);
        }
Пример #2
0
        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());
        }