using NUnit.Framework; namespace Chernobyl.Measures.Time { /// /// Tests for implementations of the type. /// public abstract class TimeTests { [Test, Description("")] public void ToSecondsTest() { ITime time = CreateTime(); Assert.AreEqual(ToSecondsValue, time.ToSeconds(), "The value returned by ITime.ToSeconds() is not the expected " + "value."); } /// /// The expected value of the return /// value on the instance returned by /// . /// protected static readonly Seconds ToSecondsValue = new Seconds(42); /// /// Creates the instance to be tested. The instance /// must be returned in a form such that the value /// returned by is equal to the value /// . /// /// protected abstract ITime CreateTime(); } }