コード例 #1
0
        public async Task Empty_home_page_info_if_no_home_page_info_created_yet()
        {
            // arrange
            var request = new GetHomePageInfo();

            // act
            var result = await _handler.Handle(request, CancellationToken.None);

            // assert
            Assert.That(result.TickerMessages, Is.Null);
        }
コード例 #2
0
        public async Task Home_page_info_is_shown()
        {
            // arrange
            var expectedHomePageInfo = new HomePageInfo();

            expectedHomePageInfo.TickerMessages = new List <string> {
                "message 1", "2nd message"
            };
            await InsertTestDocument("homePageInfo", expectedHomePageInfo);

            var request = new GetHomePageInfo();

            // act
            var result = await _handler.Handle(request, CancellationToken.None);

            // assert
            Assert.That(result.TickerMessages.Count, Is.EqualTo(expectedHomePageInfo.TickerMessages.Count));
        }