Exemple #1
0
        public void TestIr4()
        {
            using (var c = new Context())
            {
                var j = new Job(c);
                j.AddInputBytesPinned(0,
                                      Convert.FromBase64String(
                                          "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg=="));
                j.AddOutputBuffer(1);

                var response = j.ExecuteImageResizer4CommandString(0, 1, "w=200&h=200&scale=both&format=jpg");

                var data = response.DeserializeDynamic();

                output.WriteLine(response.GetString());

                Assert.Equal(200, (int)data.code);
                Assert.Equal(true, (bool)data.success);
            }
        }