function testBlockRadioChanges() {
  var rad1 = new vsaq.questionnaire.items.RadioItem('radio1_id', [], 'radio1');
  var rad2 = new vsaq.questionnaire.items.RadioItem('radio2_id', [], 'radio2');

  block.addItem(rad1);
  block.addItem(rad2);

  var expectedEvent = {
    type: vsaq.questionnaire.items.Item.CHANGED,
    source: block,
    changes: {'radio1_id': rad1.getValue(), 'radio2_id': ''}
  };

  var mock = new goog.testing.MockControl();
  mock.createFunctionMock(block.eventDispatcher, 'dispatchEvent');

  block.eventDispatcher.dispatchEvent(
      new goog.testing.mockmatchers.ObjectEquals(expectedEvent));

  mock.$replayAll();

  // Change the selection.
  goog.testing.events.fireClickEvent(rad1.radioButton);

  mock.$verifyAll();
  mock.$tearDown();
}
/**
 * Tests changes to radio buttons within the block.
 */
Tests changes to radio buttons within the block.
Tests changes to radio buttons within the block .
function testBlockRadioChanges() {
  var rad1 = new vsaq.questionnaire.items.RadioItem('radio1_id', [], 'radio1');
  var rad2 = new vsaq.questionnaire.items.RadioItem('radio2_id', [], 'radio2');
  block.addItem(rad1);
  block.addItem(rad2);
  var expectedEvent = {
    type: vsaq.questionnaire.items.Item.CHANGED,
    source: block,
    changes: {'radio1_id': rad1.getValue(), 'radio2_id': ''}
  };
  var mock = new goog.testing.MockControl();
  mock.createFunctionMock(block.eventDispatcher, 'dispatchEvent');
  block.eventDispatcher.dispatchEvent(
      new goog.testing.mockmatchers.ObjectEquals(expectedEvent));
  mock.$replayAll();
  goog.testing.events.fireClickEvent(rad1.radioButton);
  mock.$verifyAll();
  mock.$tearDown();
}
function testBlockRadioChanges ( ) { var rad1 = new vsaq . questionnaire . items . RadioItem ( 'radio1_id' , [ ] , 'radio1' ) ; var rad2 = new vsaq . questionnaire . items . RadioItem ( 'radio2_id' , [ ] , 'radio2' ) ; block . addItem ( rad1 ) ; block . addItem ( rad2 ) ; var expectedEvent = { type : vsaq . questionnaire . items . Item . CHANGED , source : block , changes : { 'radio1_id' : rad1 . getValue ( ) , 'radio2_id' : '' } } ; var mock = new goog . testing . MockControl ( ) ; mock . createFunctionMock ( block . eventDispatcher , 'dispatchEvent' ) ; block . eventDispatcher . dispatchEvent ( new goog . testing . mockmatchers . ObjectEquals ( expectedEvent ) ) ; mock . $replayAll ( ) ; goog . testing . events . fireClickEvent ( rad1 . radioButton ) ; mock . $verifyAll ( ) ; mock . $tearDown ( ) ; }
Tests changes to radio buttons within the block.
Tests changes to radio buttons within the block .
// Change the selection.