public void GetCampaign_GetsCampaignById() { // Arrange var user = new User { UserId = "U1", Campaigns = new List <Campaign>() { new Campaign { CampaignId = 1, Name = "Campaign 1" }, new Campaign { CampaignId = 2, Name = "Campaign 2" } } }; var resolver = new UserResolvers(); // Act var campaign = resolver.GetCampaign(user, 2); // Assert Assert.True(string.Equals("Campaign 2", campaign.Name)); }
public void GetCampaigns_GetsUsersCampaigns() { // Arrange var user = new User { UserId = "U1", Campaigns = new List <Campaign>() { new Campaign { CampaignId = 1 }, new Campaign { CampaignId = 2 } } }; var resolver = new UserResolvers(); // Act var campaigns = resolver.GetCampaigns(user); // Assert Assert.Equal(2, campaigns.Count()); }
public Mutation(UserResolvers userResolvers, ClientResolvers clientResolvers) { _userResolvers = userResolvers; _clientResolvers = clientResolvers; }
public Query(UserResolvers userResolvers, ClientResolvers clientResolvers) { _userResolvers = userResolvers; _clientResolvers = clientResolvers; }
public ClientType(UserResolvers userResolvers) { _userResolvers = userResolvers; }