BillingData: Implement WG Master parsing

This commit is contained in:
2024-01-08 19:31:13 +01:00
parent f894c3b212
commit 09e55264bb
3 changed files with 90 additions and 79 deletions

View File

@ -301,5 +301,49 @@ namespace Tests.Helpers {
TestCalcKmw(data, "WRS", 17.0, 0.95m, geb: true);
});
}
[Test]
public void Test_08_WgMaster() {
var data = BillingData.FromJson("""
{
"mode": "wgmaster",
"Grundbetrag": 0.033,
"GBZS": 0.0,
"Ausgabefaktor": 1.0,
"Rebelzuschlag": 0.0,
"AufschlagVolllieferanten": 0.0,
"AuszahlungSorten": {
"BL/": 0.097,
"BP/": 0.097,
"GV/K": "curve:1",
"SL/": 0.097,
"ZW/": 0.097,
"default": "curve:0"
},
"AuszahlungSortenQualitätsstufe": {
"WEI": 0.005
},
"Kurven": [{
"id": 0,
"mode": "oe",
"data": 0.033,
"geb": 0
}, {
"id": 1,
"mode": "oe",
"data": {
"88oe": 0.032,
"89oe": 0.065
}
}]
}
""", AttributeVariants);
Assert.Multiple(() => {
TestCalcOe(data, "GVK", 73, 0.032m);
TestCalcOe(data, "ZWS", 74, 0.033m);
TestCalcOe(data, "GV", 75, 0.005m, qualid: "WEI");
TestCalcOe(data, "GVK", 115, 0.065m);
});
}
}
}