/*
 * Copyright 2015 www.seleniumtests.com
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.seleniumtests.util.internal.entity;

import org.apache.commons.lang3.StringUtils;

public class TestEntity {
    public static final String TEST_CASE_ID = "TestEntity.TestCaseId";
    public static final String TEST_METHOD = "TestEntity.TestMethod";
    public static final String TEST_TITLE = "TestEntity.TestTitle";
    public static final String TEST_DP_TAGS = "TestEntity.TestTags";
    public static final String TEST_IS_ACTIVE = "TestEntity.IsActive";

    private String testCaseId = "";
    private String testMethod = "";
    private String testTitle = "";
    private String testSite = "";
    private boolean isActive = true;

    public String getTestCaseId() {
        return testCaseId;
    }

    public String getTestMethod() {
        return testMethod;
    }

    public String getTestSite() {
        return testSite;
    }

    public String getTestTitle() {
        return testTitle;
    }

    public boolean isActive() {
        return isActive;
    }

    public void setActive(final boolean isActive) {
        this.isActive = isActive;
    }

    public void setTestCaseId(final String testCaseId) {
        this.testCaseId = testCaseId;
    }

    public void setTestMethod(final String testMethod) {
        this.testMethod = testMethod;
    }

    public void setTestSite(final String testSite) {
        this.testSite = testSite;
    }

    public void setTestTitle(final String testTitle) {
        this.testTitle = testTitle;
    }

    public String toString() {
        StringBuffer ret = new StringBuffer();
        ret.append("Test Attributes: [ TestCaseId: " + testCaseId);
        if (StringUtils.isNotEmpty(testMethod)) {
            ret.append("|| TestMethod: " + testMethod);
        }

        if (StringUtils.isNotEmpty(testTitle)) {
            ret.append("||TestTitle: " + testTitle);
        }

        if (!isActive) {
            ret.append("||IsActive: " + isActive);
        }

        ret.append(" ]");
        return ret.toString();
    }
}

@@ -639,426 +639,170 @@
 y;%0A%0A
-import org.apache.commons.lang3.StringUtils;%0A%0Apublic class TestEntity %7B%0A    public static final String TEST_CASE_ID = %22TestEntity.TestCaseId%22;%0A    public static final String TEST_METHOD = %22TestEntity.TestMethod%22;%0A    public static final String TEST_TITLE = %22TestEntity.TestTitle%22;%0A    public static final String TEST_DP_TAGS = %22TestEntity.TestTags%22;%0A    public static final String TEST_IS_ACTIVE = %22TestEntity.IsActive
+public class TestEntity %7B%0A    public static final String TEST_METHOD = %22TestEntity.TestMethod%22;%0A    public static final String TEST_DP_TAGS = %22TestEntity.TestTags
 %22;%0A%0A
@@ -900,89 +900,17 @@
 test
-Title = %22%22;%0A    private String testSite = %22%22;%0A    private boolean isActive = true
+Site = %22%22
 ;%0A%0A 
@@ -1118,233 +1118,8 @@
  %7D%0A%0A
-    public String getTestTitle() %7B%0A        return testTitle;%0A    %7D%0A%0A    public boolean isActive() %7B%0A        return isActive;%0A    %7D%0A%0A    public void setActive(final boolean isActive) %7B%0A        this.isActive = isActive;%0A    %7D%0A%0A
     
@@ -1427,613 +1427,98 @@
 lic 
-void setTestTitle(final String testTitle) %7B%0A        this.testTitle = testTitle;%0A    %7D%0A%0A    public String toString() %7B%0A        StringBuffer ret = new StringBuffer();%0A        ret.append(%22Test Attributes: %5B TestCaseId: %22 + testCaseId);%0A        if (StringUtils.isNotEmpty(testMethod)) %7B%0A            ret.append(%22%7C%7C TestMethod: %22 + testMethod);%0A        %7D%0A%0A        if (StringUtils.isNotEmpty(testTitle)) %7B%0A            ret.append(%22%7C%7CTestTitle: %22 + testTitle);%0A        %7D%0A%0A        if (!isActive) %7B%0A            ret.append(%22%7C%7CIsActive: %22 + isActive);%0A        %7D%0A%0A        ret.append(%22 %5D%22);%0A        return ret.toString()
+String toString() %7B%0A        return (%22Test Attributes: %5B TestCaseId: %22 + testCaseId) + %22 %5D%22
 ;%0A  

remove redundant parameters