package com.cognifide.aet.executor.model;

import org.junit.Test;

import java.util.Collections;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

public class TestSuiteRunTest {

  @Test
  public void constructor_whenOverridingNameAndDomain_expectUpdatedValues() {
    String company = "company";
    String project = "project";
    String name = "abcd";
    String domain = "ijkl";
    TestSuiteRun baseSuiteRun = new TestSuiteRun(name, company, project, domain, Collections.emptyList());

    String newName = "efgh";
    String newDomain = "mnop";
    TestSuiteRun updatedSuiteRun = new TestSuiteRun(baseSuiteRun, newName, newDomain, Collections.emptyList());
    String correlationRegex = String.format("^%s-%s-%s-[0-9]*$", company, project, newName);

    assertThat(updatedSuiteRun.getName(), equalTo(newName));
    assertThat(updatedSuiteRun.getDomain(), equalTo(newDomain));
    assertThat(updatedSuiteRun.getCorrelationId(), updatedSuiteRun.getCorrelationId().matches(correlationRegex));
  }

}
@@ -1,8 +1,614 @@
+/**%0A * AET%0A *%0A * Copyright (C) 2013 Cognifide Limited%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not use this file except%0A * in compliance with the License. You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software distributed under the License%0A * is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express%0A * or implied. See the License for the specific language governing permissions and limitations under%0A * the License.%0A */%0A
 package 

Add missing license