Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public void TestDeleteUploadPreset()
        {
            mockedCloudinary.DeleteUploadPreset(apiTestPreset);

            mockedCloudinary.AssertHttpCall(SystemHttp.HttpMethod.Delete, $"{uploadPresetsRootUrl}/{apiTestPreset}");
        }
Ejemplo n.º 4
0
        public void TestListMetadataFields()
        {
            mockedCloudinary.ListMetadataFields();

            mockedCloudinary.AssertHttpCall(SystemHttp.HttpMethod.Get, "metadata_fields");
        }