Changed GetCurrentModel to return the model instead of the tuple
This commit is contained in:
@@ -35,14 +35,17 @@ public class ModelListTest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if current model can be correctly gotten as current via GetCurrentModel
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestGetCurrentModel()
|
||||
{
|
||||
System.Random random = new System.Random();
|
||||
ModelIndex value = (ModelIndex)random.Next(modelList.models.Count);
|
||||
modelList.SetCurrentModel(value);
|
||||
|
||||
Assert.AreEqual(value, modelList.GetCurrentModel().index);
|
||||
Assert.AreEqual(modelList.models[modelList.currentModelIndex].model, modelList.GetCurrentModel());
|
||||
|
||||
// Check if empty model fails gracefully (returns null)
|
||||
Assert.IsNull(ScriptableObject.CreateInstance<ModelList>().GetCurrentModel());
|
||||
|
||||
Reference in New Issue
Block a user