Skip to content

Commit

Permalink
updating xUnit.net tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Dec 24, 2024
1 parent be144ce commit 67248da
Show file tree
Hide file tree
Showing 5 changed files with 481 additions and 237 deletions.
56 changes: 48 additions & 8 deletions tests/data/result/xunit-qlnet-junit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<testsuites name="C:\projecrs\QLNet\tests\QLNet.Tests\bin\Debug\net8.0\QLNet.Tests.dll" tests="476" time="112.827" errors="0" failures="1" skipped="13" timestamp="2024-09-27T15:56:46">
<testsuite name="QLNet.Tests.T_DayCounters" tests="25" time="0.031" passed="25" failed="0" skipped="0">
<testsuite name="QLNet.Tests.T_DayCounters" tests="25" time="0.031" passed="25" failures="0" skipped="0">
<testcase name="testThirty365" classname="QLNet.Tests.T_DayCounters" time="0.0004152" status="Passed"/>
<testcase name="testActualActualIsma(isEndOfMonth: False, frequency: Semiannual, interestAccrualDateAsString: &quot;1999-01-30&quot;, maturityDateAsString: &quot;2000-06-30&quot;, firstCouponDateAsString: &quot;1999-07-30&quot;, penultimateCouponDateAsString: &quot;2000-01-30&quot;, d1AsString: &quot;1999-07-30&quot;, d2AsString: &quot;2000-01-30&quot;, expectedYearFraction: 0.5)" classname="QLNet.Tests.T_DayCounters" time="0.0011084" status="Passed"/>
<testcase name="testActualActualIsma(isEndOfMonth: False, frequency: Semiannual, interestAccrualDateAsString: &quot;2003-05-01&quot;, maturityDateAsString: &quot;2005-05-01&quot;, firstCouponDateAsString: &quot;2003-11-01&quot;, penultimateCouponDateAsString: &quot;2004-11-01&quot;, d1AsString: &quot;2003-11-01&quot;, d2AsString: &quot;2004-05-01&quot;, expectedYearFraction: 0.5)" classname="QLNet.Tests.T_DayCounters" time="0.0002379" status="Passed"/>
Expand All @@ -26,37 +26,77 @@
<testcase name="testActual365_Canadian" classname="QLNet.Tests.T_DayCounters" time="0.0004408" status="Passed"/>
<testcase name="testThirty360_BondBasis" classname="QLNet.Tests.T_DayCounters" time="0.0006832" status="Passed"/>
</testsuite>
<testsuite name="T_CapFlooredCoupon" tests="2" time="0.011" passed="2" failed="0" skipped="0">
<testsuite name="T_AsianOptions" tests="7" time="0.083" passed="5" failures="1" skipped="1">
<testcase name="testAnalyticContinuousGeometricAveragePriceGreeks" classname="TestSuite.T_AsianOptions" time="0.0261092" status="Passed"/>
<testcase name="testMCDiscreteGeometricAveragePrice" classname="TestSuite.T_AsianOptions" time="0.0010000" status="Skipped">
<system-out>
Incomplete
</system-out>
<skipped message="Incomplete"/>
</testcase>
<testcase name="testAnalyticDiscreteGeometricAveragePrice" classname="TestSuite.T_AsianOptions" time="0.0033230" status="Passed"/>
<testcase name="testIssue115" classname="TestSuite.T_AsianOptions" time="0.0116095" status="Passed"/>
<testcase name="testAnalyticDiscreteGeometricAveragePriceGreeks" classname="TestSuite.T_AsianOptions" time="0.0371806" status="Passed"/>
<testcase name="testAnalyticDiscreteGeometricAverageStrike" classname="TestSuite.T_AsianOptions" time="0.0013519" status="Passed"/>
<testcase name="testAnalyticContinuousGeometricAveragePrice" classname="TestSuite.T_AsianOptions" time="0.0023712" status="Failed">
<failure type="exception-type asfafgasg" message="QLNet.EuropeanExercise QLNet.EuropeanExercise Asian option with Geometric and QLNet.PlainVanillaPayoff payoff:
running variable:
past fixings:
future fixings: 0
underlying value: 80
strike: 85
dividend yield: -0.03
risk-free rate: 0.055
reference date: 27/09/2024
maturity: 26/12/2024
volatility: 0.2
expected value: 4.6922
calculated value: 4.64631729808559
error: 0.04588270191440991
tolerance: 0.0001
Expected: True
Actual: False
">
at TestSuite.QAssert.Fail(String message) in C:\projects\QLNet\tests\QLNet.Tests\Utilities.cs:line 187
at TestSuite.T_AsianOptions.REPORT_FAILURE(String greekName, Type averageType, Nullable`1 runningAccumulator, Nullable`1 pastFixings, List`1 fixingDates, StrikedTypePayoff payoff, Exercise exercise, Double s, Double q, Double r, Date today, Double v, Double expected, Double calculated, Double tolerance) in C:\projects\Dev\QLNet\tests\QLNet.Tests\T_AsianOptions.cs:line 39
at TestSuite.T_AsianOptions.testAnalyticContinuousGeometricAveragePrice() in C:\projects\QLNet\tests\QLNet.Tests\T_AsianOptions.cs:line 122
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
</failure>
</testcase>
</testsuite>
<testsuite name="T_CapFlooredCoupon" tests="2" time="0.011" passed="2" failures="0" skipped="0">
<testcase name="testDecomposition" classname="TestSuite.T_CapFlooredCoupon" time="0.0096121" status="Passed"/>
<testcase name="testLargeRates" classname="TestSuite.T_CapFlooredCoupon" time="0.0010359" status="Passed"/>
</testsuite>
<testsuite name="T_CashFlows" tests="4" time="0.002" passed="4" failed="0" skipped="0">
<testsuite name="T_CashFlows" tests="4" time="0.002" passed="4" failures="0" skipped="0">
<testcase name="testSettings" classname="TestSuite.T_CashFlows" time="0.0007010" status="Passed"/>
<testcase name="testDefaultSettlementDate" classname="TestSuite.T_CashFlows" time="0.0007084" status="Passed"/>
<testcase name="testAccessViolation" classname="TestSuite.T_CashFlows" time="0.0007278" status="Passed"/>
<testcase name="testNullFixingDays" classname="TestSuite.T_CashFlows" time="0.0001644" status="Passed"/>
</testsuite>
<testsuite name="T_CliquetOption" tests="3" time="0.437" passed="3" failed="0" skipped="0">
<testsuite name="T_CliquetOption" tests="3" time="0.437" passed="3" failures="0" skipped="0">
<testcase name="testPerformanceGreeks" classname="TestSuite.T_CliquetOption" time="0.2237890" status="Passed"/>
<testcase name="testGreeks" classname="TestSuite.T_CliquetOption" time="0.2124470" status="Passed"/>
<testcase name="testValues" classname="TestSuite.T_CliquetOption" time="0.0003781" status="Passed"/>
</testsuite>
<testsuite name="T_Cms" tests="3" time="0.544" passed="3" failed="0" skipped="0">
<testsuite name="T_Cms" tests="3" time="0.544" passed="3" failures="0" skipped="0">
<testcase name="testCmsSwap" classname="TestSuite.T_Cms" time="0.3218593" status="Passed"/>
<testcase name="testParity" classname="TestSuite.T_Cms" time="0.2175035" status="Passed"/>
<testcase name="testFairRate" classname="TestSuite.T_Cms" time="0.0048557" status="Passed"/>
</testsuite>
<testsuite name="T_ConvertibleBond" tests="3" time="0.427" passed="3" failed="0" skipped="0">
<testsuite name="T_ConvertibleBond" tests="3" time="0.427" passed="3" failures="0" skipped="0">
<testcase name="testBond" classname="TestSuite.T_ConvertibleBond" time="0.2946028" status="Passed"/>
<testcase name="testRegression" classname="TestSuite.T_ConvertibleBond" time="0.0111348" status="Passed"/>
<testcase name="testOption" classname="TestSuite.T_ConvertibleBond" time="0.1210658" status="Passed"/>
</testsuite>
<testsuite name="T_CPISwap" tests="3" time="0.025" passed="3" failed="0" skipped="0">
<testsuite name="T_CPISwap" tests="3" time="0.025" passed="3" failures="0" skipped="0">
<testcase name="cpibondconsistency" classname="TestSuite.T_CPISwap" time="0.0157648" status="Passed"/>
<testcase name="zciisconsistency" classname="TestSuite.T_CPISwap" time="0.0023891" status="Passed"/>
<testcase name="consistency" classname="TestSuite.T_CPISwap" time="0.0069347" status="Passed"/>
</testsuite>
<testsuite name="T_CreditDefaultSwap" tests="6" time="0.106" passed="6" failed="0" skipped="0">
<testsuite name="T_CreditDefaultSwap" tests="6" time="0.106" passed="6" failures="0" skipped="0">
<testcase name="testIsdaEngine" classname="TestSuite.T_CreditDefaultSwap" time="0.0415601" status="Passed"/>
<testcase name="testFairUpfront" classname="TestSuite.T_CreditDefaultSwap" time="0.0140779" status="Passed"/>
<testcase name="testCachedValue" classname="TestSuite.T_CreditDefaultSwap" time="0.0170727" status="Passed"/>
Expand Down
Loading

0 comments on commit 67248da

Please sign in to comment.