public void InvalidDeleteGenericRecordTests(ResourceId resource, InvalidDeleteGenericRecord condition)
        {
            var recordHandler = new GenericRecordManager();
            var propDic       = InvalidDeleteGenericRecordRequest(resource, condition);
            var requestData   = new KeyValuePair <string, List <Dictionary <string, object> > >("data", new List <Dictionary <string, object> >()
            {
                propDic
            });

            if (condition == InvalidDeleteGenericRecord.NotLogin)
            {
                PrivateApiConnection.GetConnectionForCurrentTest().DeAuthenticate();
                var result = recordHandler.DeleteRecord <DeleteGenericRecordResponse.Error>(requestData, HttpMethod.Delete);
                PrivateApiConnection.GetConnectionForCurrentTest().Authenticate();
                PrAssert.That(result, PrIs.ErrorResponse().And.HttpCode(System.Net.HttpStatusCode.Unauthorized));
            }
            else if (condition == InvalidDeleteGenericRecord.TransactionError)
            {
                // Currently, we can't test this case so It'll test in the next time
            }
            else
            {
                var result = recordHandler.DeleteRecord <DeleteGenericRecordResponse.Error>(requestData, HttpMethod.Delete);
                PrAssert.That(result, PrIs.ErrorResponse().And.HttpCode(System.Net.HttpStatusCode.BadRequest));
            }
        }
        public void ValidDeleteGenericRecordTests(ResourceId resource, ValidDeleteGenericRecord condition)
        {
            var recordHandler = new GenericRecordManager();
            var propDic       = ValidDeleteGenericRecordRequest(resource, condition);
            var requestDic    = new KeyValuePair <string, List <Dictionary <string, object> > >("data", new List <Dictionary <string, object> >()
            {
                propDic
            });

            var result   = recordHandler.DeleteRecord <DeleteGenericRecordResponse.Success>(requestDic, HttpMethod.Delete);
            var expected = Common.CheckExistedRecordId(resource, result.Result.Ids.SingleOrDefault()).ToString();

            PrAssert.That(result, PrIs.SuccessfulResponse().And.HttpCode(System.Net.HttpStatusCode.OK));
            PrAssert.That(result.IsSuccess, expected);
        }