Tests: Use Assert.EnterMultipleScope instead of Assert.Multiple
Test / Run tests (push) Successful in 2m6s
Test / Run tests (push) Successful in 2m6s
This commit is contained in:
@@ -51,10 +51,10 @@ namespace Tests.UnitTests.HelperTests {
|
||||
"curves": []
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcOe(data, "GV", 73, 0.5m);
|
||||
TestCalcOe(data, "WRS", 74, 0.5m);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -76,7 +76,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
}]
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcOe(data, "GV", 70, 0.25m);
|
||||
TestCalcOe(data, "GV", 72, 0.25m);
|
||||
TestCalcOe(data, "GV", 73, 0.50m);
|
||||
@@ -89,7 +89,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
TestCalcOe(data, "GV", 80, 0.95m, geb: true);
|
||||
TestCalcOe(data, "GV", 83, 1.10m, geb: true);
|
||||
TestCalcOe(data, "GV", 90, 1.10m, geb: true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -113,7 +113,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
}]
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcKmw(data, "GV", 13.00, 0.10m);
|
||||
TestCalcKmw(data, "GV", 13.50, 0.10m);
|
||||
TestCalcKmw(data, "GV", 13.99, 0.10m);
|
||||
@@ -128,7 +128,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
TestCalcKmw(data, "GV", 17.50, 1.25m);
|
||||
TestCalcKmw(data, "GV", 18.00, 1.25m);
|
||||
TestCalcKmw(data, "GV", 18.50, 1.25m);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -147,7 +147,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
"curves": []
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcOe(data, "WR", 73, 0.10m);
|
||||
TestCalcOe(data, "WRS", 73, 0.15m);
|
||||
TestCalcOe(data, "GV", 73, 0.20m);
|
||||
@@ -158,7 +158,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
TestCalcOe(data, "ZW", 73, 0.25m);
|
||||
TestCalcOe(data, "ZWS", 73, 0.15m);
|
||||
TestCalcOe(data, "ZWZ", 73, 0.25m);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -175,7 +175,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
"curves": []
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcOe(data, "WR", 73, 0.10m);
|
||||
TestCalcOe(data, "WR-B", 73, 0.20m);
|
||||
TestCalcOe(data, "WRS", 73, 0.30m);
|
||||
@@ -191,7 +191,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
TestCalcOe(data, "ZW-B", 73, 0.20m);
|
||||
TestCalcOe(data, "ZWS", 73, 0.30m);
|
||||
TestCalcOe(data, "ZWZ", 73, 0.10m);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -211,7 +211,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
"curves": []
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcOe(data, "GV", 75, 0.30m, qualid: "WEI");
|
||||
TestCalcOe(data, "ZW", 76, 0.25m, qualid: "WEI");
|
||||
TestCalcOe(data, "GVS", 75, 0.20m, qualid: "WEI");
|
||||
@@ -222,7 +222,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
TestCalcOe(data, "GV", 73, 0.5m);
|
||||
TestCalcOe(data, "ZWS", 74, 0.5m);
|
||||
TestCalcOe(data, "GVK", 80, 0.5m);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -253,7 +253,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
}]
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcKmw(data, "GV", 15.0, 2.0m);
|
||||
TestCalcKmw(data, "GV", 15.5, 2.272727m);
|
||||
TestCalcKmw(data, "GV", 16.0, 2.454545m);
|
||||
@@ -264,7 +264,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
TestCalcKmw(data, "ZW", 16.0, 2.50m);
|
||||
TestCalcKmw(data, "ZW", 16.5, 2.75m);
|
||||
TestCalcKmw(data, "ZW", 17.0, 3.0m);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -313,7 +313,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
}]
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcKmw(data, "GV", 15.0, 0.75m);
|
||||
TestCalcKmw(data, "GVS", 15.0, 0.50m);
|
||||
TestCalcKmw(data, "GVS", 16.0, 0.55m);
|
||||
@@ -333,7 +333,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
TestCalcKmw(data, "WRS", 15.0, 0.80m, geb: true);
|
||||
TestCalcKmw(data, "WRS", 16.0, 0.875m, geb: true);
|
||||
TestCalcKmw(data, "WRS", 17.0, 0.95m, geb: true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -372,12 +372,12 @@ namespace Tests.UnitTests.HelperTests {
|
||||
}]
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -395,17 +395,17 @@ namespace Tests.UnitTests.HelperTests {
|
||||
"curves": []
|
||||
}
|
||||
""", Vaributes);
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
TestCalcOe(data, "GV", 73, 0.10m);
|
||||
TestCalcOe(data, "GVS", 73, 0.20m);
|
||||
TestCalcOe(data, "GV-B", 73, 0.30m);
|
||||
TestCalcOe(data, "GVS-B", 73, 0.40m);
|
||||
TestCalcOe(data, "ZWS-B", 73, 0.20m);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static List<Varibute> GetSelection(IEnumerable<string> attVars) {
|
||||
return attVars.Select(s => new Varibute(new RawVaribute(s))).ToList();
|
||||
return [.. attVars.Select(s => new Varibute(new RawVaribute(s)))];
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -1002,11 +1002,10 @@ namespace Tests.UnitTests.HelperTests {
|
||||
if (!TestedCurves.Add(str))
|
||||
return;
|
||||
var vaributes = curves.SelectMany(v => v).ToList();
|
||||
List<GraphEntry> entries = curves
|
||||
List<GraphEntry> entries = [.. curves
|
||||
.Select((l, n) => new GraphEntry(n, 4, new BillingData.Curve(BillingData.CurveMode.Oe, new() {
|
||||
[73] = n + 1,
|
||||
}, null), GetSelection(l.Select(v => v.ToString()))))
|
||||
.ToList();
|
||||
}, null), GetSelection(l.Select(v => v.ToString()))))];
|
||||
var data = BillingData.FromGraphEntries(entries);
|
||||
var test = PaymentBillingData.FromJson(data.ToJsonString(), vaributes);
|
||||
for (int i = 0; i < curves.Count; i++) {
|
||||
@@ -1027,12 +1026,12 @@ namespace Tests.UnitTests.HelperTests {
|
||||
[new("GV/-"), new("WR/-"), new("GV/-B"), new("WR/-B"), new("GV/-KIP"), new("WR/-KIP")],
|
||||
[new("GV/-"), new("GV/K-"), new("ZW/-"), new("ZW/K-"), new("GV/-B"), new("GV/K-B"), new("ZW/-B"), new("ZW/K-B")],
|
||||
];
|
||||
Assert.Multiple(() => {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
foreach (var config in configurations) {
|
||||
foreach (var c in GetCurves(config))
|
||||
TestCollapse(c);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user