using NUnit.Framework; namespace Chernobyl.ComponentModel { [TestFixture, Description("Tests for the Task type.")] public class TaskImplementationTests : TaskTests { protected override ITask CreateIncompleteTask() { return new TestingTask(); } protected override ITask CreateCompleteTask() { TestingTask task = new TestingTask(); task.SetProgressPercentage(100); return task; } protected override void MakeProgress(ITask task) { ((TestingTask)task).SetProgressPercentage(50); } } /// /// Since we can't set the types /// property, we'll derive from /// it and set it from the child class. /// class TestingTask : Task { public void SetProgressPercentage(int progress) { ProgressPercentage = progress; } } }