Loading...
Searching...
No Matches
GamsApiTests.HouseKeeper Class Reference

Static Public Member Functions

static void prepare (String dir)
 Prepare directory by checking its existence. If exists, (non - recursively) delete all its contents, otherwise create the directory.
 
static bool clear (String dir)
 (non-recursively) delete all contents under dir.
 
static bool rcleanup (String dir)
 (recursively) delete all contents under dir, and delete dir.
 
static bool isGAMSDirectory (String dir)
 check a GAMS directory.
 
static void initializeTestFrom (String filename, String subdir)
 initialize class properties from fileName and prepare directory subdir
 
static String findGAMSFromAlternativeEnvironment ()
 Find a valid GAMS system directory from environment. in case of Windows: read from window registry "gams.location" in case of MacOs: read from "LD_LIBRARY_PATH" in case of MacOs: read from "LD_LIBRARY_PATH".
 
static String findGAMSFromPathEnvironmentVariable ()
 Find a valid GAMS system directory from environment.
 
static String findGAMS (String systemPath)
 Find a valid GAMS system directory from the given path. A valid GAMS system directory contains a file name "gams.exe"(windows) or "gams"(non-windows).
 

Detailed Description

Definition at line 13 of file HouseKeeper.cs.

Methods

◆ clear()

static bool GamsApiTests.HouseKeeper.clear ( String  dir)
inlinestatic

(non-recursively) delete all contents under dir.

Parameters
dirdirectory whose contents to be deleted
Returns
true if succeeded, false otherwise

Definition at line 51 of file HouseKeeper.cs.

◆ findGAMS()

static String GamsApiTests.HouseKeeper.findGAMS ( String  systemPath)
inlinestatic

Find a valid GAMS system directory from the given path. A valid GAMS system directory contains a file name "gams.exe"(windows) or "gams"(non-windows).

Parameters
systemPathpath to find a valid GAMS system directory
Returns
the directory if found, null otherwise.

Definition at line 196 of file HouseKeeper.cs.

◆ findGAMSFromAlternativeEnvironment()

static String GamsApiTests.HouseKeeper.findGAMSFromAlternativeEnvironment ( )
inlinestatic

Find a valid GAMS system directory from environment. in case of Windows: read from window registry "gams.location" in case of MacOs: read from "LD_LIBRARY_PATH" in case of MacOs: read from "LD_LIBRARY_PATH".

Returns
the directory if found, null otherwise.

Definition at line 176 of file HouseKeeper.cs.

◆ findGAMSFromPathEnvironmentVariable()

static String GamsApiTests.HouseKeeper.findGAMSFromPathEnvironmentVariable ( )
inlinestatic

Find a valid GAMS system directory from environment.

Returns
the directory if found, null otherwise.

Definition at line 186 of file HouseKeeper.cs.

◆ initializeTestFrom()

static void GamsApiTests.HouseKeeper.initializeTestFrom ( String  filename,
String  subdir 
)
inlinestatic

initialize class properties from fileName and prepare directory subdir

Parameters
filenamefile to be initialized
subdirsub directory to be prepared

Definition at line 114 of file HouseKeeper.cs.

◆ isGAMSDirectory()

static bool GamsApiTests.HouseKeeper.isGAMSDirectory ( String  dir)
inlinestatic

check a GAMS directory.

Parameters
dirdirectory directory to check
Returns
true if it is a GAMS directory, false otherwise

Definition at line 104 of file HouseKeeper.cs.

◆ prepare()

static void GamsApiTests.HouseKeeper.prepare ( String  dir)
inlinestatic

Prepare directory by checking its existence. If exists, (non - recursively) delete all its contents, otherwise create the directory.

Parameters
dirdirectory to be prepared

Definition at line 30 of file HouseKeeper.cs.

◆ rcleanup()

static bool GamsApiTests.HouseKeeper.rcleanup ( String  dir)
inlinestatic

(recursively) delete all contents under dir, and delete dir.

Parameters
dirdirectory to be deleted
Returns
true if succeeded, false otherwise

Definition at line 77 of file HouseKeeper.cs.