Beispiel #1
0
        public void TestListTransformations()
        {
            // should allow listing transformations

            ImageUploadParams uploadParams = new ImageUploadParams()
            {
                File            = new FileDescription(m_testImagePath),
                EagerTransforms = new List <Transformation>()
                {
                    m_simpleTransformation
                },
                Tags = m_apiTag
            };

            m_cloudinary.Upload(uploadParams);

            ListTransformsResult result = m_cloudinary.ListTransformations();

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Transformations);
            TransformDesc td = result.Transformations.Where(t => t.Name == m_simpleTransformationAsString).First();

            Assert.IsFalse(td.Named);
            Assert.IsTrue(td.Used);
        }
        public void TestListTransformations()
        {
            // should allow listing transformations

            ImageUploadParams uploadParams = new ImageUploadParams()
            {
                File            = new FileDescription(m_testImagePath),
                EagerTransforms = new List <Transformation>()
                {
                    new Transformation().Crop("scale").Width(100)
                },
                Tags = "transformation"
            };

            m_cloudinary.Upload(uploadParams);

            ListTransformsResult result = m_cloudinary.ListTransformations();

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Transformations);
            TransformDesc td = result.Transformations.Where(t => t.Name == "c_scale,w_100").First();

            Assert.IsTrue(td.Used);
        }