Esempio n. 1
0
        public async Task ShouldSetValueAsync()
        {
            // Given
            const int    id            = 1;
            const string expectedValue = "test";

            // When
            await _defaultClient.SetAsync(
                new ValuesModificationRequest { Values = new[] { new ConfigurationValue {
                                                                     Id = id, Value = expectedValue
                                                                 } } }
                );

            var actualValue = await _defaultClient.GetAsync(id);

            // Then
            Assert.Equal(expectedValue, actualValue);
            Fixture.MockLogger
            .VerifyNoErrorsWasLogged()
            .VerifyNoWarningsWasLogged();
        }
        public async Task <ApiClient> SetValueAsync(ValuesModificationRequest request)
        {
            await _valuesServiceClient.SetAsync(request);

            return(this);
        }
        public async Task <ApiClient> SetValueAsync(int id, string value)
        {
            await _valuesServiceClient.SetAsync(id, value);

            return(this);
        }