All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sahagin.share.srctree.code.TestStepLabel Maven / Gradle / Ivy

There is a newer version: 0.10.1
Show newest version
package org.sahagin.share.srctree.code;

import java.util.Map;

import org.sahagin.share.yaml.YamlConvertException;
import org.sahagin.share.yaml.YamlUtils;

public class TestStepLabel extends Code {
    public static final String TYPE = "stepLabel";

    private String label;
    private String text;

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    protected String getType() {
        return TYPE;
    }

    @Override
    public Map toYamlObject() {
        Map result = super.toYamlObject();
        if (label != null) {
            result.put("label", label);
        }
        if (text != null) {
            result.put("text", text);
        }

        return result;
    }

    @Override
    public void fromYamlObject(Map yamlObject)
            throws YamlConvertException {
        super.fromYamlObject(yamlObject);
        label = YamlUtils.getStrValue(yamlObject, "label", true);
        text = YamlUtils.getStrValue(yamlObject, "text", true);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy