using NUnit.Framework;
using System.Collections.Generic;
using UnityEngine;
///
/// Test the Theme class
///
[TestFixture]
public class ThemeTests
{
///
/// Reference to the current theme, for quick access
///
private Theme theme;
///
/// The names of custom learnables for a custom theme
///
private List names = new List() { "appel", "peer", "banaan" };
///
/// Setup a theme with some learnables in it
///
[SetUp]
public void Setup()
{
theme = ScriptableObject.CreateInstance();
foreach (string name in names)
{
Learnable learnable = new Learnable();
learnable.name = name;
theme.learnables.Add(learnable);
}
}
///
/// Test if all the learnables are stored in the theme
///
[Test]
public void TestThemeLearnables()
{
// Check if each of the learnables is kept
foreach (Learnable learnable in theme.learnables)
{
names.Remove(learnable.name);
}
// Assert that all items have been checked
Assert.IsTrue(names.Count == 0);
}
}