Updated getter in ModelList and cleaned Assembly

This commit is contained in:
CoudronJerome
2023-03-28 08:52:02 +02:00
parent be7457236c
commit dfdb2ab10b
4 changed files with 8 additions and 25 deletions

View File

@@ -37,27 +37,10 @@ public class ModelListTest
}
/// <summary>
/// Check if getModelByIndex returns the NMModel or return null if there is no model
/// Check if all courses can be correctly gotten and set as current via SetCurrentCourse
/// </summary>
[Test]
public void TestGetModelByIndex()
{
foreach (var field in typeof(ModelIndex).GetFields())
{
if (field.IsLiteral)
{
ModelIndex value = (ModelIndex)field.GetValue(null);
string name = field.Name;
Assert.IsTrue(modelList.GetModelByIndex(value) is NNModel || modelList.GetModelByIndex(value) is null);
}
}
}
/// <summary>
/// Check if all courses can be correctly set as current via SetCurrentCourse
/// </summary>
[Test]
public void TestSetCurrentModel()
public void TestGetSetCurrentModel()
{
foreach (var field in typeof(ModelIndex).GetFields())
{
@@ -71,6 +54,7 @@ public class ModelListTest
ModelTuple m = modelList.models[modelList.currentModelIndex];
Assert.AreEqual(m.index, value);
Assert.IsTrue(m.model is NNModel || m.model is null);
}
}
}