public void TestAddOrUpdateAsync_ServerAcceptsSetting_ReturnsSetting()
{
var setting = new SurveySetting { Name = "Setting X" };
var mockedNfieldConnection = new Mock<INfieldConnectionClient>();
var mockedHttpClient = CreateHttpClientMock(mockedNfieldConnection);
var content = new StringContent(JsonConvert.SerializeObject(setting));
mockedHttpClient
.Setup(client => client.PostAsJsonAsync(ServiceAddress + "Surveys/" + SurveyId + "/Settings", setting))
.Returns(CreateTask(HttpStatusCode.OK, content));
var target = new NfieldSurveySettingsService();
target.InitializeNfieldConnection(mockedNfieldConnection.Object);
var actual = target.AddOrUpdateAsync(SurveyId, setting).Result;
Assert.Equal(setting.Name, actual.Name);
}