PercentPaymentColumn
This commit is contained in:
parent
1979239cdd
commit
b745a7b307
@ -40,6 +40,7 @@
|
||||
<e p="Columns" t="Include">
|
||||
<e p="DateColumn.cs" t="Include" />
|
||||
<e p="DateTempColumn.cs" t="Include" />
|
||||
<e p="PercentPaymentColumn.cs" t="Include" />
|
||||
</e>
|
||||
<e p="EvoCalculator.Core.Calculation.csproj" t="IncludeRecursive" />
|
||||
<e p="FinanceFormulas" t="Include">
|
||||
@ -107,6 +108,7 @@
|
||||
<e p="Columns" t="Include">
|
||||
<e p="DateColumnTests.cs" t="Include" />
|
||||
<e p="DateTempTests.cs" t="Include" />
|
||||
<e p="PercentPaymentTests.cs" t="Include" />
|
||||
</e>
|
||||
<e p="FinanceFormulasTests.cs" t="Include" />
|
||||
</e>
|
||||
|
||||
124
.idea/.idea.EvoCalculator.Core/.idea/workspace.xml
generated
124
.idea/.idea.EvoCalculator.Core/.idea/workspace.xml
generated
@ -14,10 +14,11 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="2c3b0650-5589-43d4-b4b7-2979612bb30f" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateTempColumn.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateTempTests.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/PercentPaymentColumn.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/PercentPaymentTests.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/contentModel.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.EvoCalculator.Core/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedPayments.cs" beforeDir="false" afterPath="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedPayments.cs" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -62,20 +63,22 @@
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/FinanceFormulasTests.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/PreparedParams.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/PreparedPayments.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedPayments.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/ComputableColumn.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedParams.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Constants.cs" />
|
||||
<option value="$PROJECT_DIR$/Constants/Class1.cs" />
|
||||
<option value="$PROJECT_DIR$/Constants/Calculation/Constants.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Constants/Calculation/Constants.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Interfaces/IColumn.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/ColumnsTests.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateColumn.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateColumnTests.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Constants/Calculation.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/DateTempTests.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/DateTempColumn.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Models/Prepared/PreparedPayments.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Models/Calculation/Interfaces/IColumn.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/PercentPaymentTests.cs" />
|
||||
<option value="$PROJECT_DIR$/EvoCalculator.Core.Calculation/Columns/PercentPaymentColumn.cs" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@ -140,7 +143,7 @@
|
||||
<workItem from="1602504354370" duration="6573000" />
|
||||
<workItem from="1602584653395" duration="12605000" />
|
||||
<workItem from="1602678304213" duration="9304000" />
|
||||
<workItem from="1602754684591" duration="2094000" />
|
||||
<workItem from="1602754684591" duration="4318000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="rename: flow">
|
||||
<created>1602593830686</created>
|
||||
@ -184,98 +187,98 @@
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state x="734" y="355" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602508288549" />
|
||||
<state width="454" height="464" key="DebuggerActiveHint" timestamp="1602687556127">
|
||||
<state width="472" height="464" key="DebuggerActiveHint" timestamp="1602758863728">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="454" height="464" key="DebuggerActiveHint/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602687556127" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.bottom" timestamp="1602755691464">
|
||||
<state width="472" height="464" key="DebuggerActiveHint/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602758863728" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.bottom" timestamp="1602759019652">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691464" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.center" timestamp="1602755691462">
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019652" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.center" timestamp="1602759019651">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691462" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.left" timestamp="1602755691462">
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019651" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.left" timestamp="1602759019651">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691462" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.right" timestamp="1602755691463">
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019651" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.right" timestamp="1602759019651">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691463" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.bottom" timestamp="1602755691467">
|
||||
<state width="2517" height="464" key="GridCell.Tab.0.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019651" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.bottom" timestamp="1602759019653">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691467" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.center" timestamp="1602755691466">
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.center" timestamp="1602759019652">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691466" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.left" timestamp="1602755691465">
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019652" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.left" timestamp="1602759019652">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691465" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.right" timestamp="1602755691467">
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019652" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.right" timestamp="1602759019652">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691467" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.bottom" timestamp="1602755691469">
|
||||
<state width="2517" height="464" key="GridCell.Tab.1.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019652" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.bottom" timestamp="1602759019653">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691469" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.center" timestamp="1602755691468">
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.center" timestamp="1602759019653">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691468" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.left" timestamp="1602755691468">
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.left" timestamp="1602759019653">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691468" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.right" timestamp="1602755691468">
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.right" timestamp="1602759019653">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691468" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.bottom" timestamp="1602755691472">
|
||||
<state width="2517" height="464" key="GridCell.Tab.2.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019653" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.bottom" timestamp="1602759019655">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691472" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.center" timestamp="1602755691470">
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.center" timestamp="1602759019654">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691470" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.left" timestamp="1602755691469">
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019654" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.left" timestamp="1602759019654">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691469" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.right" timestamp="1602755691471">
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019654" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.right" timestamp="1602759019655">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691471" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.bottom" timestamp="1602755691475">
|
||||
<state width="2517" height="464" key="GridCell.Tab.3.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.bottom" timestamp="1602759019655">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691475" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.center" timestamp="1602755691473">
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.bottom/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.center" timestamp="1602759019655">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691473" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.left" timestamp="1602755691472">
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.center/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.left" timestamp="1602759019655">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691472" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.right" timestamp="1602755691475">
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.left/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.right" timestamp="1602759019655">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755691475" />
|
||||
<state width="2517" height="464" key="GridCell.Tab.4.right/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602759019655" />
|
||||
<state x="872" y="432" key="Rider.ProjectTemplateDialog.Size" timestamp="1602683469535">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state x="872" y="432" key="Rider.ProjectTemplateDialog.Size/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602683469535" />
|
||||
<state x="1108" y="385" key="RiderGenerateDialog" timestamp="1602755875981">
|
||||
<state x="1108" y="385" key="RiderGenerateDialog" timestamp="1602757068236">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state x="1108" y="385" key="RiderGenerateDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602755875981" />
|
||||
<state x="1108" y="385" key="RiderGenerateDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602757068236" />
|
||||
<state x="1078" y="410" key="RollbackChangesDialog" timestamp="1602585122733">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
@ -288,10 +291,10 @@
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state width="498" height="446" key="SwitcherDM/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602684835910" />
|
||||
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog" timestamp="1602678875251">
|
||||
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog" timestamp="1602758396155">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602678875251" />
|
||||
<state x="92" y="92" width="2376" height="1216" key="VCS.FileHistoryDialog/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602758396155" />
|
||||
<state x="872" y="433" key="Vcs.Push.Dialog.v2" timestamp="1602755745888">
|
||||
<screen x="0" y="0" width="2560" height="1400" />
|
||||
</state>
|
||||
@ -305,4 +308,23 @@
|
||||
</state>
|
||||
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup/0.0.2560.1400/2560.0.1920.1040@0.0.2560.1400" timestamp="1602684080977" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/EvoCalculator.Core.Tests/Calculation/Suite/Columns/PercentPaymentTests.cs</url>
|
||||
<line>152</line>
|
||||
<properties documentPath="C:\Users\Chika\Projects\EvoCalculator.Core\EvoCalculator.Core.Tests\Calculation\Suite\Columns\PercentPaymentTests.cs" initialLine="152">
|
||||
<startOffsets>
|
||||
<option value="4506" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="4534" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="12" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,30 @@
|
||||
using System.Linq;
|
||||
using EvoCalculator.Core.Models.Calculation.Interfaces;
|
||||
using EvoCalculator.Core.Models.Calculation.Models.Prepared;
|
||||
|
||||
namespace EvoCalculator.Core.Calculation.Columns
|
||||
{
|
||||
public class PercentPaymentColumn : IColumn<double>
|
||||
{
|
||||
public double[] Values { get; set; }
|
||||
|
||||
public PercentPaymentColumn(int count)
|
||||
{
|
||||
Values = new double[count];
|
||||
}
|
||||
|
||||
public void ComputeValues(PreparedValues preparedValues, PreparedPayments preparedPayments,
|
||||
Constants.Calculation constants,
|
||||
params IColumn<double>[] columns)
|
||||
{
|
||||
Values[0] = 0;
|
||||
Values[1] = 0;
|
||||
for (var i = 2; i < Values.Length - 1; i++)
|
||||
{
|
||||
Values[i] = preparedPayments.Rows[i - 1].PercentPayment;
|
||||
}
|
||||
|
||||
Values[^1] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
namespace EvoCalculator.Core.Models.Calculation.Models.Prepared
|
||||
{
|
||||
public abstract class PaymentRow
|
||||
public class PaymentRow
|
||||
{
|
||||
public int NumberPayment { get; set; }
|
||||
public double PercentPayment { get; set; }
|
||||
|
||||
@ -0,0 +1,362 @@
|
||||
using System;
|
||||
using EvoCalculator.Core.Calculation.Columns;
|
||||
using EvoCalculator.Core.Models.Calculation.Models.Prepared;
|
||||
using Xunit;
|
||||
|
||||
namespace EvoCalculator.Core.Tests.Calculation.Suite.Columns
|
||||
{
|
||||
public class PercentPaymentTests
|
||||
{
|
||||
[Fact]
|
||||
public void DateTempTest1()
|
||||
{
|
||||
var preparedPayments = new PreparedPayments
|
||||
{
|
||||
Rows = new[]
|
||||
{
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 25.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 1.00,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var percentPaymentColumn = new PercentPaymentColumn(preparedPayments.Rows.Length + 1);
|
||||
percentPaymentColumn.ComputeValues(
|
||||
null
|
||||
, preparedPayments
|
||||
, new Constants.Calculation()
|
||||
, null);
|
||||
|
||||
var expected = new double[]
|
||||
{
|
||||
0,
|
||||
0,
|
||||
100.00,
|
||||
100.00,
|
||||
100.00,
|
||||
100.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
100.00,
|
||||
100.00,
|
||||
100.00,
|
||||
100.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
50.00,
|
||||
50.00,
|
||||
0
|
||||
};
|
||||
|
||||
var res = percentPaymentColumn.Values;
|
||||
Assert.Equal(expected, res);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DateTempTest2()
|
||||
{
|
||||
var preparedPayments = new PreparedPayments
|
||||
{
|
||||
Rows = new[]
|
||||
{
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 35
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 100.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 75.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 50.00,
|
||||
},
|
||||
new PaymentRow
|
||||
{
|
||||
PercentPayment = 1.00,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
var percentPaymentColumn = new PercentPaymentColumn(preparedPayments.Rows.Length + 1);
|
||||
percentPaymentColumn.ComputeValues(
|
||||
null
|
||||
, preparedPayments
|
||||
, new Constants.Calculation()
|
||||
, null);
|
||||
|
||||
var expected = new double[]
|
||||
{
|
||||
0.00,
|
||||
0.00,
|
||||
100.00,
|
||||
100.00,
|
||||
100.00,
|
||||
100.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
75.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
50.00,
|
||||
0.00,
|
||||
};
|
||||
|
||||
var res = percentPaymentColumn.Values;
|
||||
Assert.Equal(expected, res);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user