package com.snowble.android.verticalstepper;

import android.app.Activity;

import org.robolectric.Robolectric;

public class RobolectricTestUtils {

    public static  VerticalStepper.LayoutParams createTestLayoutParams(Activity activity,
                                                                       int leftMargin, int topMargin,
                                                                       int rightMargin, int bottomMargin) {
        VerticalStepper.LayoutParams lp = createTestLayoutParams(activity);
        lp.leftMargin = leftMargin;
        lp.topMargin = topMargin;
        lp.rightMargin = rightMargin;
        lp.bottomMargin = bottomMargin;

        return lp;
    }

    public static VerticalStepper.LayoutParams createTestLayoutParams(Activity activity) {
        Robolectric.AttributeSetBuilder attributeSetBuilder = Robolectric.buildAttributeSet();
        attributeSetBuilder.addAttribute(android.R.attr.layout_width, "wrap_content");
        attributeSetBuilder.addAttribute(android.R.attr.layout_height, "wrap_content");
        attributeSetBuilder.addAttribute(R.attr.step_title, "title");

        VerticalStepper.LayoutParams lp =
                new VerticalStepper.LayoutParams(activity, attributeSetBuilder.build());
        lp.width = VerticalStepper.LayoutParams.MATCH_PARENT;
        lp.height = VerticalStepper.LayoutParams.WRAP_CONTENT;

        return lp;
    }
}

@@ -161,17 +161,16 @@
  static 
- 
 Vertical
@@ -298,25 +298,24 @@
             
- 
 int leftMarg
@@ -333,17 +333,16 @@
 Margin,%0A
- 
         
@@ -948,25 +948,25 @@
 width, %22
-wrap_cont
+match_par
 ent%22);%0A 
@@ -1257,133 +1257,8 @@
 ());
-%0A        lp.width = VerticalStepper.LayoutParams.MATCH_PARENT;%0A        lp.height = VerticalStepper.LayoutParams.WRAP_CONTENT;
 %0A%0A  

Set test width/height via attributes