public IEnumerable <string> Get() { using (new LogCastContext()) { _logger.Info("Operation started"); Debug.Assert(LogCastContext.Current != null); var values = _valuesRepository.Get(); _logger.Info("Values got from repository"); Debug.Assert(LogCastContext.Current != null); return(values); } }
public async Task Pass_Data_With_Put_Request() { const string expectedName = "John Smith"; var id = Guid.NewGuid(); var user = new { name = expectedName }; await Api .When() .Post($"putNameToValues_PUT/{id}", user) .Then() .Status(HttpStatusCode.OK); Assert.Equal(expectedName, ValuesRepository.Get(id)); }