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

net.thucydides.core.statistics.AtomicTestCount Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
package net.thucydides.core.statistics;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * Keeps track of the tests executed.
 * Should be managed by Guice as a singleton.
 */
public class AtomicTestCount implements TestCount {
    private final AtomicInteger count = new AtomicInteger();

    public int getNextTest() {
        return count.addAndGet(1);
    }

    @Override
    public int getCurrentTestNumber() {
        return count.get();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy