예제 #1
0
        public void TestMethod_04()
        {
            var recordClient = new RecordApiEndpoint(BASE_URL);
            var id           = 1;

            Assert.IsTrue(recordClient.Delete(id), "Deleting failed");
        }
예제 #2
0
        /// <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);
            }
        }
예제 #3
0
        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);
        }
예제 #4
0
        /// <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("*************************");
            }
        }