public static WorkflowPacket Break(this WorkflowPacket wp) { wp.Log("Break"); Debugger.Break(); return(wp); }
public static WorkflowPacket IShouldSee(this WorkflowPacket wp, Action test) { wp.Log($"IShouldSee"); test(); return(wp); }
public static WorkflowPacket Then(this WorkflowPacket wp, Action <WorkflowPacket> action) { wp.Log($"Then"); action(wp); return(wp); }
public static WorkflowPacket AndInternalServerError(this WorkflowPacket wp) { wp.Log("AndInternalServerError"); wp.LogInternalServerError(); wp.LastResponse.Should().Be(HttpStatusCode.InternalServerError); return(wp); }
public static WorkflowPacket IShouldSee(this WorkflowPacket wp, Func <bool> test) { wp.Log($"IShouldSee"); bool b = test(); b.Should().BeTrue(); return(wp); }
public static WorkflowPacket IShouldSee <T>(this WorkflowPacket wp, string containerName, Action <T> test) where T : class { wp.Log($"IShouldSee {typeof(T).Name} {containerName}"); T obj = wp.GetObject <T>(containerName); test(obj); return(wp); }
public static WorkflowPacket LogInternalServerError(this WorkflowPacket wp) { if (wp.LastResponse == HttpStatusCode.InternalServerError) { wp.Log(wp.LastContent); } return(wp); }
public static WorkflowPacket IGet <T>(this WorkflowPacket wp, string containerName, Action <T> getter) where T : class { wp.Log($"IGet {typeof(T).Name} {containerName}"); T obj = wp.GetObject <T>(containerName); getter(obj); return(wp); }
public static WorkflowPacket IShouldSee(this WorkflowPacket wp, string containerName, Func <dynamic, bool> test) { wp.Log($"IShouldSee {containerName}"); var obj = wp.GetObject(containerName); bool b = test(obj); b.Should().BeTrue(); return(wp); }
public static WorkflowPacket Delete(this WorkflowPacket wp, string route) { wp.Log($"DELETE: {route}"); var resp = RestService.Delete($"{wp.BaseUrl}/{route}", wp.Headers); wp.LastResponse = resp.status; wp.LastContent = resp.content; return(wp); }
public static WorkflowPacket Patch(this WorkflowPacket wp, string route, object data) { wp.Log($"PATCH: {route}"); var resp = RestService.Patch($"{wp.BaseUrl}/{route}", data, wp.Headers); wp.LastResponse = resp.status; wp.LastContent = resp.content; return(wp); }
public static WorkflowPacket Patch <T>(this WorkflowPacket wp, string name, string route, object data) where T : new() { wp.Log($"PATCH: {typeof(T).Name} {route}"); var resp = RestService.Patch <T>($"{wp.BaseUrl}/{route}", data, wp.Headers); wp.LastResponse = resp.status; wp.LastContent = resp.content; wp.SetObject(name, resp.item); return(wp); }
public static WorkflowPacket IShouldSee <T>(this WorkflowPacket wp, Action <T> test) where T : class { wp.Log($"IShouldSee {typeof(T).Name}"); return(wp.IShouldSee(typeof(T).Name, test)); }