예제 #1
0
        public void NonExistingTemplate()
        {
            ITransloadit     transloadit = new Transloadit.Transloadit("YOUR-PUBLIC-API-KEY", "YOUR-SECRET-KEY");
            IAssemblyBuilder assembly    = new AssemblyBuilder();

            assembly.SetTemplateID("YOUR-NON-EXISTING-TEMPLATE-ID");

            TransloaditResponse response = transloadit.InvokeAssembly(assembly);

            Assert.AreEqual("TEMPLATE_NOT_FOUND", (string)(response.Data["error"]));
        }
예제 #2
0
        public void ExistingTemplate()
        {
            ITransloadit     transloadit = new Transloadit.Transloadit("YOUR-PUBLIC-API-KEY", "YOUR-SECRET-KEY");
            IAssemblyBuilder assembly    = new AssemblyBuilder();

            assembly.SetTemplateID("YOUR-EXISTING-TEMPLATE-ID");

            TransloaditResponse response = transloadit.InvokeAssembly(assembly);

            Assert.IsTrue((string)response.Data["ok"] == "ASSEMBLY_COMPLETED" || (string)response.Data["ok"] == "ASSEMBLY_EXECUTING");
        }