CSNUnit.gms : Compiles and runs NUnit tests for object oriented C# API

Description

Note: The unit testing framework NUnit needs to be installed and nunit-console
      has to be in the PATH to run this test. Also, NuGet.exe needs to be in
      the PATH.
See : https://www.nunit.org and https://www.nuget.org/
Contributor: Lutz Westermann, March 2015


Small Model of Type : .Net


Category : GAMS API library


Main file : CSNUnit.gms

$title 'Compiles and runs NUnit tests for object oriented C# API' (CSNUNIT,SEQ=50)

$onText
Note: The unit testing framework NUnit needs to be installed and nunit-console
      has to be in the PATH to run this test. Also, NuGet.exe needs to be in
      the PATH.
See : https://www.nunit.org and https://www.nuget.org/
Contributor: Lutz Westermann, March 2015
$offText


$set srcRoot %gams.sysdir%api%system.dirsep%dotnet%system.dirsep%examples%system.dirsep%control%system.dirsep%csharp%system.dirsep%

$escape &

$if %system.platform% == WEX $set PLATFORM x64
$if %system.platform% == LAX $set PLATFORM arm64
$if %system.platform% == LEX $set PLATFORM x64
$if %system.platform% == DEX $set PLATFORM x64
$if %system.platform% == DAX $set PLATFORM arm64

$onEcho > "%srcRoot%GamsApiTests%system.dirsep%test.properties"
gamsVersion    = %system.GAMSReleaseMaint%
gamsSystemDir  = %gams.sysdir%.
gamsWorkingDir = .
gamsDebugLevel = off
$offEcho

$call dotnet test "%srcRoot%GamsApiTests%system.dirsep%GamsApiTests.csproj" -c Release -p:Platform=%PLATFORM%
$ife errorlevel 1 $abort 'Problem compiling or executing GamsApiTests'