// ----------------------------------
// Test Code
// ----------------------------------
var testCodeTypeEnum = new Enumeration('Setup', 'Teardown', 'Pre Code', 'Post Code', 'Driver Code');
var TestCode = Class.create(Model, {
  initialize: function($super) {
    $super(['id', 'name', 'type', 'lang', 'common', 'code'], 'test_code', testCodeStore);
  }
});

var testCodeStore = new ModelStore('test_code', TestCode);


// ----------------------------------
// Test Code UI
// ----------------------------------
displayEnumerationInSelectInput(testCodeTypeEnum, 'edit_code_type');
new ValueObserver('edit_code_name', testCodeStore.proxy, 'name');
new ValueObserver('edit_code_type', testCodeStore.proxy, 'type');
new ValueObserver('edit_code_language', testCodeStore.proxy, 'lang');
new CheckedObserver('edit_code_common', testCodeStore.proxy,'common');
new ValueObserver('edit_code_code', testCodeStore.proxy, 'code');
new SelectableProxyStoreObserver('test_codes', testCodeStore, 'id', 'name');
new SaveAction('save_edit_code', testCodeStore, 'click');
new DestroyAction('delete_edit_code', testCodeStore, 'click');
new NewAction('new_test_code', testCodeStore, 'click');
