Add project files.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Sacs.UnitTests.Net.Standard.Base.App
|
||||
{
|
||||
//=======================================================================
|
||||
[TestClass]
|
||||
public class SacsCommandLineInfo_Tester
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
[TestMethod]
|
||||
public void SacsCommandLineInfo_CTR()
|
||||
{
|
||||
SacsCommandLineInfo cmdLineInfo = new SacsCommandLineInfo(new String[]
|
||||
{
|
||||
"-ABC",
|
||||
"/DEF",
|
||||
"Andy",
|
||||
"-SaProcess:ExportData",
|
||||
});
|
||||
Assert.IsNotNull(cmdLineInfo);
|
||||
Assert.AreEqual(4, cmdLineInfo.ParamCount);
|
||||
Assert.AreEqual(1, cmdLineInfo.ProcessDefinitions.Count);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Sacs.UnitTests.Net.Standard.Base.App
|
||||
{
|
||||
//=======================================================================
|
||||
[TestClass]
|
||||
public class SacsProcessDefinition_Tester
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
[TestMethod]
|
||||
public void SacsProcessDefinition_CTR()
|
||||
{
|
||||
// Valid process definitions.
|
||||
Assert.IsNotNull(new SacsProcessDefinition("SaProcess:ExportData"));
|
||||
Assert.IsNotNull(new SacsProcessDefinition("SaProcess:Proc=ExportData"));
|
||||
Assert.IsNotNull(new SacsProcessDefinition("SaProcess:ExportData;User=System"));
|
||||
|
||||
// Invalid process definition - blank argument.
|
||||
try
|
||||
{
|
||||
SacsProcessDefinition processDfn = new SacsProcessDefinition("");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Assert.AreEqual(typeof(NotSupportedException), exc.GetType());
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
[TestMethod]
|
||||
public void SacsProcessDefinition_IsValidProcessDefinition()
|
||||
{
|
||||
// Valid process params.
|
||||
Assert.AreEqual(true, SacsProcessDefinition.IsValidProcessDefinition("SaProcess:ExportData"));
|
||||
|
||||
// Invalid process params.
|
||||
Assert.AreEqual(false, SacsProcessDefinition.IsValidProcessDefinition(""));
|
||||
Assert.AreEqual(false, SacsProcessDefinition.IsValidProcessDefinition("Abc"));
|
||||
Assert.AreEqual(false, SacsProcessDefinition.IsValidProcessDefinition("SaProcess"));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user