Updated getter in ModelList and cleaned Assembly
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user