Skip to content

Commit

Permalink
Add Build tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rfavreau committed Sep 11, 2022
1 parent 6d83fee commit d451ddf
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions OFX-Tool.Test/Core/BuildTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -39,5 +40,28 @@ public void BuildTest()

Assert.AreEqual<Ofx>(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));
}
}
}

0 comments on commit d451ddf

Please sign in to comment.