Posted By

lordbron on 04/06/10



Versions (?)

TDD Question

 / Published in: ActionScript 3

What is the proper way to test this? Do I rewrite the method to return true/false so I can test the first if statement? Do I make the primaryAxis and secondaryAxis vars exposable so I can test them? Or do I just do an assertEqual on the public verticalAxisRenderer array items in the main class?

  1. /** This method syncs up the axis to be the same scale
  2.  */
  3. public function syncScalesToPrimary():void {
  4. if (this.verticalAxisRenderers.length < 2)
  5. {
  6. return;
  7. }
  8. var primaryAxis:MkLinearAxis = (this.verticalAxisRenderers[0] as AxisRenderer).axis as MkLinearAxis;
  9. var secondaryAxis:MkLinearAxis = (this.verticalAxisRenderers[1] as AxisRenderer).axis as MkLinearAxis;
  10. secondaryAxis.minimum = primaryAxis.computedMinimum;
  11. secondaryAxis.maximum = primaryAxis.computedMaximum;
  12. }

Report this snippet  


RSS Icon Subscribe to comments
Posted By: ziye on April 7, 2010

LV yy2010.4.7

The clock in the high church tower struck and the sound made him remember his parents'wow gold sale early love

for him. They had taught him and prayed to God for his accounts But he chose the wrong way. wow account With shame and glonger look towards that .ghd straighteners His

darkened eyes were full of tears, LVand with a despairing effort, he burst out a cry: "Come back, my early days! Come back!" yy2010.4.7

You need to login to post a comment.