public void Create() { var time = DateTimeOffset.Now; Func <DateTimeOffset> getTime = () => time; var storage = new SystemInformationStorage() { StartupTime = time.AddMinutes(-1) }; Func <ISystemInformationStorage> getStorage = () => storage; var information = new SystemInformation(getTime, getStorage); Assert.AreEqual(typeof(SystemInformation).Assembly.GetName().Version, information.CoreVersion); Assert.AreEqual(storage.StartupTime, information.StartupTime); }
public void Create() { var time = DateTimeOffset.Now; Func<DateTimeOffset> getTime = () => time; var storage = new SystemInformationStorage() { StartupTime = time.AddMinutes(-1) }; Func<ISystemInformationStorage> getStorage = () => storage; var information = new SystemInformation(getTime, getStorage); Assert.AreEqual(typeof(SystemInformation).Assembly.GetName().Version, information.CoreVersion); Assert.AreEqual(storage.StartupTime, information.StartupTime); }
public void CoreVersion() { var storage = new SystemInformationStorage(); Assert.AreEqual(typeof(SystemInformationStorage).Assembly.GetName().Version, storage.CoreVersion); }
public void CoreVersion() { var storage = new SystemInformationStorage(); Assert.AreEqual(typeof(SystemInformationStorage).Assembly.GetName().Version, storage.CoreVersion); }