Gridarta Editor
net.sf.gridarta.model.index.MapsIndexTest Class Reference

Regression tests for MapsIndex. More...

+ Collaboration diagram for net.sf.gridarta.model.index.MapsIndexTest:

Classes

class  Listener
 An IndexListener that records a text representation of all generated events. More...
 

Public Member Functions

void test1 ()
 Checks that values are correctly marked as pending. More...
 
void testFind1 ()
 Checks that Index#findPartialName(String) works as expected. More...
 
void testListener ()
 Checks that listeners are notified. More...
 
void testTransaction ()
 Checks that Index#beginUpdate() and Index#endUpdate() works as expected. More...
 

Static Private Member Functions

static String findPartialName (@NotNull final Index< File > index, @NotNull final String name)
 Calls Index#findPartialName(String) on the given Index and name and returns a string representation of the result. More...
 
static String format (@NotNull final Collection< File > files)
 Returns a text representation of a Collection. More...
 
static String getPending (@NotNull final Index< File > index)
 Returns all pending values of a MapsIndex. More...
 
static Index< File > newIndex ()
 Returns a new Index instance. More...
 

Detailed Description

Regression tests for MapsIndex.

Author
Andreas Kirschbaum

Definition at line 35 of file MapsIndexTest.java.

Member Function Documentation

◆ findPartialName()

static String net.sf.gridarta.model.index.MapsIndexTest.findPartialName ( @NotNull final Index< File >  index,
@NotNull final String  name 
)
staticprivate

Calls Index#findPartialName(String) on the given Index and name and returns a string representation of the result.

Parameters
indexthe index
namethe name
Returns
the string representation

Definition at line 178 of file MapsIndexTest.java.

References net.sf.gridarta.model.index.MapsIndexTest.format(), and name.

Referenced by net.sf.gridarta.model.index.MapsIndexTest.testFind1(), and net.sf.gridarta.model.index.MapsIndexTest.testTransaction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format()

static String net.sf.gridarta.model.index.MapsIndexTest.format ( @NotNull final Collection< File >  files)
staticprivate

Returns a text representation of a Collection.

Parameters
filesthe collection
Returns
the text representation

Definition at line 188 of file MapsIndexTest.java.

References files, and it.

Referenced by net.sf.gridarta.model.index.MapsIndexTest.findPartialName(), and net.sf.gridarta.model.index.MapsIndexTest.getPending().

+ Here is the caller graph for this function:

◆ getPending()

static String net.sf.gridarta.model.index.MapsIndexTest.getPending ( @NotNull final Index< File >  index)
staticprivate

Returns all pending values of a MapsIndex.

Afterwards the pending entries have been removed from the index.

Parameters
indexthe index
Returns
the pending values

Definition at line 158 of file MapsIndexTest.java.

References net.sf.gridarta.model.index.MapsIndexTest.format().

Referenced by net.sf.gridarta.model.index.MapsIndexTest.test1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newIndex()

static Index<File> net.sf.gridarta.model.index.MapsIndexTest.newIndex ( )
staticprivate

◆ test1()

void net.sf.gridarta.model.index.MapsIndexTest.test1 ( )

◆ testFind1()

void net.sf.gridarta.model.index.MapsIndexTest.testFind1 ( )

◆ testListener()

◆ testTransaction()


The documentation for this class was generated from the following file: