<commit_before>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;
    }
}<commit_msg>Set test width/height via attributes<commit_after>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, "match_parent");
        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());

        return lp;
    }
}
{'fraction_non_alphanumeric': 0.07083782811938152, 'fraction_numerical': 0.0, 'mean_word_length': 2.5439490445859874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '424215', 'n_tokens_mistral': 683, 'n_tokens_neox': 669, 'n_words': 120}