예제 #1
0
        public void EventMessageServiceExtractPageLocationReturnsnullForMissingContentItems()
        {
            // arrange
            var contentPageModel = new ContentPageModel();

            var eventMessageService = new EventMessageService <ContentPageModel>(fakeLogger, fakeContentPageService);

            // act
            var result = eventMessageService.ExtractPageLocation(contentPageModel);

            // assert
            Assert.Null(result);
        }
예제 #2
0
        public void EventMessageServiceExtractPageLocationReturnsSuccess()
        {
            // arrange
            var          contentPageModel = BuildContentPageModelWithPageLocations();
            const string expectedResult   = "/a/b/c";

            var eventMessageService = new EventMessageService <ContentPageModel>(fakeLogger, fakeContentPageService);

            // act
            var result = eventMessageService.ExtractPageLocation(contentPageModel);

            // assert
            Assert.Equal(expectedResult, result);
        }