public void CanGenerateDAT() { string testPath = Utility.TestFilesDirectoryName(); Report18 r18 = new Report18(testPath + "R18.txt"); Report79 r79 = new Report79(testPath + "R79.txt"); Report90 r90 = new Report90(testPath + "R90.txt"); Converter c = new Converter(r18, r79, r90); c.ToDat(testPath + "outDat.dat"); }
public void CanGenerateADA() { string testPath = Utility.TestFilesDirectoryName(); Report18 r18 = new Report18(testPath + "R18.txt"); Report79 r79 = new Report79(testPath + "R79.txt"); Report90 r90 = new Report90(testPath + "R90.txt"); Converter c = new Converter(r18, r79, r90); c.FillADATable(); c.ToADA(testPath + "outADA.ada"); }
public void TestBaseDates() { string testPath = Utility.TestFilesDirectoryName(); Report18 r18 = new Report18(testPath + "R18.txt"); Report79 r79 = new Report79(testPath + "R79.txt"); Report90 r90 = new Report90(testPath + "R90.txt"); Assert.AreEqual(new DateTime(2013, 11, 18), r18.BaseDate); Assert.AreEqual(new DateTime(2013, 11, 18), r79.BaseDate); Assert.AreEqual(new DateTime(2013, 11, 18), r90.BaseDate); }
public void TestHaveSameBaseDates() { string testPath = Utility.TestFilesDirectoryName(); Report18 r18 = new Report18(testPath + "R18.txt"); Report79 r79 = new Report79(testPath + "R79.txt"); Report79 r79Wrong = new Report79(testPath + "R79Wrong.txt"); Report90 r90 = new Report90(testPath + "R90.txt"); Converter c = new Converter(r18, r79Wrong, r90); bool equalBaseDates = c.HaveSameBaseDate(new LCHFile[] { r18, r79Wrong, r90 }); Assert.IsFalse(equalBaseDates); c = new Converter(r18, r79, r90); equalBaseDates = c.HaveSameBaseDate(new LCHFile[] { r18, r79, r90 }); Assert.IsTrue(equalBaseDates); }
public void BasicSetUp() { string testPath = Utility.TestFilesDirectoryName(); Report18 r18 = new Report18(testPath + "R18.txt"); Report79 r79 = new Report79(testPath + "R79.txt"); Report90 r90 = new Report90(testPath + "R90.txt"); double x = (double)r79.DataTable.Rows[r79.DataTable.Rows.Count - 1]["DiscountFactor"]; double y = (double)r90.DataTable.Rows[3]["6M"]; double z = (double)r18.DataTable.Rows[3]["Exchangerate"]; double u = r18["AUD"]; double v = r90["AUD", new DateTime(2013, 11, 6)]; Assert.AreEqual(0.0688413619, x, 1e-6); Assert.AreEqual(-1.9715, y, 1e-6); Assert.AreEqual(1.352, z, 1e-6); Assert.AreEqual(1.7135, u, 1e-6); Assert.AreEqual(1.8765645, v, 1e-6); }