/*
 * 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 io.trino.tests.product.launcher.env;

import org.testng.annotations.Test;

import static io.trino.tests.product.launcher.Configurations.canonicalName;
import static org.assertj.core.api.Assertions.assertThat;

public class TestConfigurations
{
    @Test
    public void testCanonicalName()
    {
        assertThat(canonicalName("ala")).isEqualTo("ala");
        assertThat(canonicalName("Ala")).isEqualTo("ala");
        assertThat(canonicalName("DuzaAla")).isEqualTo("duza-ala");
        assertThat(canonicalName("duza-ala")).isEqualTo("duza-ala");
        assertThat(canonicalName("duza-Ala")).isEqualTo("duza-ala");
        assertThat(canonicalName("duza----Ala")).isEqualTo("duza-ala");
    }
}

@@ -601,16 +601,210 @@
 r.env;%0A%0A
+import io.trino.tests.product.launcher.suite.suites.Suite1;%0Aimport io.trino.tests.product.launcher.suite.suites.Suite6NonGeneric;%0Aimport io.trino.tests.product.launcher.suite.suites.SuiteTpcds;%0A
 import o
@@ -908,16 +908,96 @@
 alName;%0A
+import static io.trino.tests.product.launcher.Configurations.nameForSuiteClass;%0A
 import s
@@ -1534,11 +1534,441 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void testSuiteName()%0A    %7B%0A        // suite name with a number%0A        assertThat(nameForSuiteClass(Suite1.class)).isEqualTo(%22suite-1%22);%0A        // suite name with a word%0A        assertThat(nameForSuiteClass(SuiteTpcds.class)).isEqualTo(%22suite-tpcds%22);%0A        // suite name with a number  and then a word%0A        assertThat(nameForSuiteClass(Suite6NonGeneric.class)).isEqualTo(%22suite-6-non-generic%22);%0A    %7D
 %0A%7D%0A

Test suite name generation