net.sourceforge.cobertura.metrics.api.event
Interface SourceLocationListener

All Known Implementing Classes:
AbstractSourceLocationListener

public interface SourceLocationListener

Event listener invoked by instrumented tests when a particular SourceLocation has been hit/touched during an automated test execution.

Author:
Lennart Jörelid, jGuru Europe AB

Method Summary
 void addExecutionStep(SourceLocation location)
          Adds 1 to the recorded execution steps ("hits"/"touches") to the supplied SourceLocation.
 void addExecutionSteps(SourceLocation location, int numSteps)
          Adds a given number of execution steps ("hits"/"touches") to the supplied SourceLocation.
 

Method Detail

addExecutionStep

void addExecutionStep(SourceLocation location)
Adds 1 to the recorded execution steps ("hits"/"touches") to the supplied SourceLocation. The addExecutionStep method should be implemented to be atomic/synchronized, in regards to the data state it updates.

Parameters:
location - The SourceLocation where 1 execution step should be added. Cannot be null.

addExecutionSteps

void addExecutionSteps(SourceLocation location,
                       int numSteps)
Adds a given number of execution steps ("hits"/"touches") to the supplied SourceLocation. The addExecutionSteps method should be implemented to be atomic/synchronized, in regards to the data state it updates.

Parameters:
location - The SourceLocation where 1 execution step should be added. Cannot be null.
numSteps - The number of execution steps to add to the supplied SourceLocation. Cannot be less than 1.


Copyright © 2013–2015 Cobertura. All rights reserved.