diff --git a/OFX-Tool.Test/Core/BuildTests.cs b/OFX-Tool.Test/Core/BuildTests.cs index e0a5b37..4f8b771 100644 --- a/OFX-Tool.Test/Core/BuildTests.cs +++ b/OFX-Tool.Test/Core/BuildTests.cs @@ -4,6 +4,7 @@ using RFD.OFXTool.Library.Entities.Signon; using RFD.OFXTool.Library.Enums; using System.Collections.Generic; +using System.IO; namespace RFD.OFXTool.Library.Core.Tests { @@ -39,5 +40,28 @@ public void BuildTest() Assert.AreEqual(ofx, newOfx); } + + [TestMethod()] + [ExpectedException(typeof(OFXToolException))] + public void BuildTest_PathNotExist() + { + var myBuildFile = "/path1/path2/path3/buildTest_PathNotExist.ofx"; + var ofx = new Ofx(); + + // Build the OFX File + new Build(ofx, myBuildFile); + } + + [TestMethod()] + public void BuildTest_Empty() + { + var myBuildFile = "./buildTest_Empty.ofx"; + var ofx = new Ofx(); + + // Build the OFX File + var build = new Build(ofx, myBuildFile); + + Assert.IsTrue(File.Exists(build.OfxFile)); + } } } \ No newline at end of file