public void TestMethod_04() { var recordClient = new RecordApiEndpoint(BASE_URL); var id = 1; Assert.IsTrue(recordClient.Delete(id), "Deleting failed"); }
/// <summary> /// Delete record by id /// </summary> private static void DeleteById(int id) { var recordClient = new RecordApiEndpoint(BASE_URL); if (recordClient.Delete(id)) { Console.WriteLine("Record#{0} is deleted", id); } }
public void TestMethod_03() { var recordClient = new RecordApiEndpoint(BASE_URL); var id = 1; var data = recordClient.Get(id); Assert.IsNotNull(data, "Record is null"); Console.WriteLine("Record#{0} is ready", data.Id); }
/// <summary> /// Get record by id /// </summary> private static void GetById(int id) { var recordClient = new RecordApiEndpoint(BASE_URL); var data = recordClient.Get(id); if (data != null) { Console.WriteLine("Record#{0} is ready", data.Id); Console.WriteLine("*************************"); Console.WriteLine("Account:{0}", data.Account); Console.WriteLine("Volume:{0}", data.Volumne); Console.WriteLine("{0}", data.Comment); Console.WriteLine("*************************"); } }