public void TestListUploadPresets() { var localCloudinaryMock = new MockedCloudinary("{presets: [{eval: 'some value'}]}"); var result = localCloudinaryMock.ListUploadPresets(); localCloudinaryMock.AssertHttpCall(SystemHttp.HttpMethod.Get, uploadPresetsRootUrl); Assert.AreEqual("some value", result.Presets.First().Eval); }
public void TestGetUploadPreset() { var localCloudinaryMock = new MockedCloudinary("{eval: 'some value'}"); var result = localCloudinaryMock.GetUploadPreset(apiTestPreset); localCloudinaryMock.AssertHttpCall(SystemHttp.HttpMethod.Get, $"{uploadPresetsRootUrl}/{apiTestPreset}"); Assert.AreEqual("some value", result.Eval); }
public void TestDeleteUploadPreset() { mockedCloudinary.DeleteUploadPreset(apiTestPreset); mockedCloudinary.AssertHttpCall(SystemHttp.HttpMethod.Delete, $"{uploadPresetsRootUrl}/{apiTestPreset}"); }
public void TestListMetadataFields() { mockedCloudinary.ListMetadataFields(); mockedCloudinary.AssertHttpCall(SystemHttp.HttpMethod.Get, "metadata_fields"); }