public async Task DynamicItemAsync_successfully_returns_a_V1DogmaDynamicItem() { Mock <IWebClient> mockedWebClient = new Mock <IWebClient>(); string json = "{\r\n \"created_by\": 2112625428,\r\n \"dogma_attributes\": [\r\n {\r\n \"attribute_id\": 9,\r\n \"value\": 350\r\n }\r\n ],\r\n \"dogma_effects\": [\r\n {\r\n \"effect_id\": 508,\r\n \"is_default\": false\r\n }\r\n ],\r\n \"mutator_type_id\": 47845,\r\n \"source_type_id\": 33103\r\n}"; mockedWebClient.Setup(x => x.GetAsync(It.IsAny <WebHeaderCollection>(), It.IsAny <string>(), It.IsAny <int>())).ReturnsAsync(new EsiModel { Model = json }); InternalLatestDogma internalLatestDogma = new InternalLatestDogma(mockedWebClient.Object, string.Empty); V1DogmaDynamicItem result = await internalLatestDogma.DynamicItemAsync(0, 0); Assert.Equal(2112625428, result.CreatedBy); Assert.Single(result.DogmaAttributes); Assert.Equal(9, result.DogmaAttributes[0].AttributeId); Assert.Equal(350, result.DogmaAttributes[0].Value); Assert.Single(result.DogmaEffects); Assert.Equal(508, result.DogmaEffects[0].EffectId); Assert.False(result.DogmaEffects[0].IsDefault); Assert.Equal(47845, result.MutatorTypeId); Assert.Equal(33103, result.SourceTypeId); }
public async Task DynamicItemAsync_successfully_returns_a_V1DogmaDynamicItem() { LatestDogmaEndpoints internalLatestDogma = new LatestDogmaEndpoints(string.Empty, true); V1DogmaDynamicItem result = await internalLatestDogma.DynamicItemAsync(0, 0); Assert.Equal(2112625428, result.CreatedBy); Assert.Single(result.DogmaAttributes); Assert.Equal(9, result.DogmaAttributes[0].AttributeId); Assert.Equal(350, result.DogmaAttributes[0].Value); Assert.Single(result.DogmaEffects); Assert.Equal(508, result.DogmaEffects[0].EffectId); Assert.False(result.DogmaEffects[0].IsDefault); Assert.Equal(47845, result.MutatorTypeId); Assert.Equal(33103, result.SourceTypeId); }