/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/powerdisplay/PowerDisplay.Lib.UnitTests/SystemClockTests.cs
27 строк
779 B
moooyo
[PowerDisplay] Stable monitor Id + survive transient discovery failures (#47712)
08 май 2026, 10:25
Не верифицирован
08 май 2026, 10:25
95b7055
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using PowerDisplay.Common.Services; namespace PowerDisplay.UnitTests; [TestClass] public class SystemClockTests { [TestMethod] public void UtcNow_ReturnsValueCloseToDateTimeUtcNow() { ISystemClock clock = new SystemClock(); var before = DateTime.UtcNow; var actual = clock.UtcNow; var after = DateTime.UtcNow; Assert.IsTrue( actual >= before && actual <= after, $"Expected clock.UtcNow ({actual:o}) to be between {before:o} and {after:o}"); } }