public void DeleteEntity_ValidEntityWithWrongETag_ThrowsException()
        {
            ITableServiceClient client = new TableServiceClient(_accountSettings);
            var tableName = _util.GenerateSampleTableName();
            string partitionKey = "A";
            string rowKey = "1";
            _util.CreateTable(tableName);
            var etag = _util.InsertTableEntity(tableName, partitionKey, rowKey);

            client.DeleteEntity(tableName, partitionKey, rowKey, etag.Replace("201","XXX"));    // ms uses a date in the etag so we can replace part of it to invalidate it

            // expects exception
        }
        public void DeleteEntity_NonExistentTable_ThrowsException()
        {
            ITableServiceClient client = new TableServiceClient(_accountSettings);
            var tableName = _util.GenerateSampleTableName();
            string partitionKey = "A";
            string rowKey = "1";

            client.DeleteEntity(tableName, partitionKey, rowKey);

            // expects exception
        }
        public void DeleteEntity_ValidEntityWithRightETag_DeletesEntity()
        {
            ITableServiceClient client = new TableServiceClient(_accountSettings);
            var tableName = _util.GenerateSampleTableName();
            string partitionKey = "A";
            string rowKey = "1";
            _util.CreateTable(tableName);
            var etag = _util.InsertTableEntity(tableName, partitionKey, rowKey);

            client.DeleteEntity(tableName, partitionKey, rowKey, etag);

            _util.AssertEntityDoesNotExist(tableName, partitionKey, rowKey);
        }