Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static final String THREAD_NAME = "TestNG";

    /**
     * @return true if the current thread was created by TestNG.
     */
    public static boolean isTestNGThread() {
        return Thread.currentThread().getName().contains(THREAD_NAME);
    }
}