public void ExistingTemplate() { ITransloadit transloadit = new Transloadit.Transloadit(); Transloadit.Assembly.IAssemblyBuilder assembly = new Transloadit.Assembly.AssemblyBuilder(); TransloaditResponse response = transloadit.InvokeAssembly(assembly); Assert.IsTrue((string)response.Data["ok"] == "ASSEMBLY_COMPLETED" || (string)response.Data["ok"] == "ASSEMBLY_EXECUTING"); }
public void InvokeAssemblyWithoutFormData() { ITransloadit transloadit = new Transloadit.Transloadit(); Transloadit.Assembly.IAssemblyBuilder assembly = new Transloadit.Assembly.AssemblyBuilder(); TransloaditResponse response = transloadit.InvokeAssembly(assembly); Assert.IsTrue((string)response.Data["ok"] == "ASSEMBLY_COMPLETED" || (string)response.Data["ok"] == "ASSEMBLY_EXECUTING"); Assert.IsTrue(((Dictionary<string, object>)(response.Data["fields"])).Count == 0); }
public void NonExistingTemplate() { ITransloadit transloadit = new Transloadit.Transloadit(); Transloadit.Assembly.IAssemblyBuilder assembly = new Transloadit.Assembly.AssemblyBuilder(); assembly.SetTemplateID(transloadit.Config.DefaultTemplateID + "hack"); TransloaditResponse response = transloadit.InvokeAssembly(assembly); Assert.AreEqual("TEMPLATE_NOT_FOUND", response.Data["error"]); }