using System;
using System.Collections.Generic;
using System.Text;
using Systin.Library;
using NUnit.Framework;
namespace Systin.Library.UnitTests{
[TestFixture]
class InstructionUnitTest
{
[Test]
[ExpectedException(typeof(ArgumentNullException))]
public void FactoryCreateWithNullThrowsNullException()
{
try
{
Instruction.NewInstruction(null);
Assert.Fail("Exception was not thrown");
}
catch (ArgumentNullException) { }
}
[Test]
[ExpectedException(typeof(ArgumentException))]
public void FactoryCreateWithEmptyStringCausesArgumentException()
{
try
{
Instruction.NewInstruction("");
Assert.Fail("Exception was not thrown");
}
catch (ArgumentException) { }
}
}
}
|