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

            // When
            await _defaultClient.PostAsync(id, expectedValue);

            var actualValue = await _defaultClient.GetAsync(id);

            // Then
            Assert.Equal(expectedValue, actualValue);
            Fixture.MockLogger
            .VerifyNoErrorsWasLogged()
            .VerifyNoWarningsWasLogged();
        }
        public async Task <ApiClient> PostValueAsync(int id, string value)
        {
            CurrentState = await _valuesServiceClient.PostAsync(id, value);

            return(this);
        }