public void ItGetsShowcase()
        {
            // Arrange
            const string slug = "unit-test-showcase";

            var rawEvent = new ContentfulEventBuilder().Slug(slug).EventDate(new DateTime(2017, 4, 1)).Build();
            var events   = new List <ContentfulEvent> {
                rawEvent
            };

            var modelledEvent = new Event("title", "event-slug", "", "", "", "", "", "", DateTime.MaxValue, "", "", 1, EventFrequency.None, null, "", null, new List <string>(), null, false, "", DateTime.MinValue, new List <string>(), null, null, new List <EventCategory> {
                new EventCategory("event", "slug", "icon")
            }, null, null, null, null);

            _eventFactory.Setup(e => e.ToModel(It.IsAny <ContentfulEvent>())).Returns(modelledEvent);

            var collection  = new ContentfulCollection <ContentfulShowcase>();
            var rawShowcase = new ContentfulShowcaseBuilder().Slug(slug).Build();

            collection.Items = new List <ContentfulShowcase> {
                rawShowcase
            };

            var builder = new QueryBuilder <ContentfulShowcase>().ContentTypeIs("showcase").FieldEquals("fields.slug", slug).Include(3);

            _contentfulClient.Setup(o => o.GetEntries(It.Is <QueryBuilder <ContentfulShowcase> >(q => q.Build() == builder.Build()), It.IsAny <CancellationToken>()))
            .ReturnsAsync(collection);

            _cacheWrapper.Setup(o => o.GetFromCacheOrDirectlyAsync(It.Is <string>(s => s == "event-all"), It.IsAny <Func <Task <IList <ContentfulEvent> > > >(), It.Is <int>(s => s == 60))).ReturnsAsync(events);

            // Act
            var response = AsyncTestHelper.Resolve(_repository.GetShowcases(slug));

            // Assert
            response.StatusCode.Should().Be(HttpStatusCode.OK);
        }
        public ShowcasesViewModel(INetworkActivityService networkActivity, ShowcaseRepository showcaseRepository)
        {
            GoToShowcaseCommand = ReactiveCommand.Create();
            GoToShowcaseCommand.OfType <Showcase>().Subscribe(x =>
            {
                var vm          = CreateViewModel <ShowcaseViewModel>();
                vm.ShowcaseSlug = x.Slug;
                vm.Title        = x.Name;
                ShowViewModel(vm);
            });

            var showcases = new ReactiveList <Showcase>();

            Showcases = showcases;

            LoadCommand = ReactiveCommand.CreateAsyncTask(async t =>
                                                          showcases.Reset(await showcaseRepository.GetShowcases()));
            LoadCommand.TriggerNetworkActivity(networkActivity);
        }