public async Task GetCampaignDetailsByIdIsNotNullTest()
        {
            var campaignService          = new CampaignMockService();
            var campaignDetailsViewModel = new CampaignDetailsViewModel(campaignService);

            await campaignDetailsViewModel.InitializeAsync(1);

            Assert.NotNull(campaignDetailsViewModel.Campaign);
        }
Exemple #2
0
        public async Task GetCampaignDetailsByIdIsNotNullTest()
        {
            Xamarin.Forms.DependencyService.RegisterSingleton <ISettingsService>(new MockSettingsService());
            Xamarin.Forms.DependencyService.RegisterSingleton <ICampaignService>(new CampaignMockService());
            var campaignDetailsViewModel = new CampaignDetailsViewModel();

            await campaignDetailsViewModel.InitializeAsync(new Dictionary <string, string> {
                { nameof(Campaign.Id), "1" }
            });

            Assert.NotNull(campaignDetailsViewModel.Campaign);
        }