29 references to StringToDateTime
Microsoft.AspNetCore.DataProtection.Tests (29)
KeyManagement\KeyRingProviderTests.cs (29)
30var now = StringToDateTime("2015-03-01 00:00:00Z");
68var now = StringToDateTime("2016-02-29 20:00:00Z");
97Assert.Equal(StringToDateTime("2016-03-01 00:00:00Z"), cacheableKeyRing.ExpirationTimeUtc);
112var now = StringToDateTime("2015-03-01 00:00:00Z");
160var now = (DateTimeOffset)StringToDateTime("2015-03-01 00:00:00Z");
203var now = StringToDateTime("2015-03-01 00:00:00Z");
249var now = StringToDateTime("2015-03-01 00:00:00Z");
285var now = StringToDateTime("2016-02-01 00:00:00Z");
334var now = StringToDateTime("2016-02-01 00:00:00Z");
372var now = StringToDateTime("2016-02-01 00:00:00Z");
435DateTimeOffset now = StringToDateTime("2016-02-01 00:00:00Z");
528DateTimeOffset now = StringToDateTime("2016-02-01 00:00:00Z");
582var now = StringToDateTime("2015-03-01 00:00:00Z");
589expirationTime: StringToDateTime("2015-03-02 00:00:00Z"),
608var now = StringToDateTime("2015-03-01 00:00:00Z");
616expirationTime: StringToDateTime("2015-03-01 00:30:00Z"), // expire in half an hour
622expirationTime: StringToDateTime("2015-03-01 00:30:00Z"), // expire in half an hour
628expirationTime: StringToDateTime("2015-03-02 00:00:00Z"),
649var now = StringToDateTime("2015-03-01 00:00:00Z");
657expirationTime: StringToDateTime("2015-03-01 00:30:00Z"), // expire in half an hour
663expirationTime: StringToDateTime("2015-03-02 00:00:00Z"),
682var now = StringToDateTime("2015-03-01 00:00:00Z");
708expirationTime: StringToDateTime("2015-03-02 00:00:00Z"),
736var originalKeyRingTime = StringToDateTime("2015-03-01 00:00:00Z");
738.Returns(new CacheableKeyRing(cts.Token, StringToDateTime("2015-03-02 00:00:00Z"), originalKeyRing));
739var throwKeyRingTime = StringToDateTime("2015-03-01 12:00:00Z");
742var updatedKeyRingTime = StringToDateTime("2015-03-01 12:02:00Z");
744.Returns(new CacheableKeyRing(CancellationToken.None, StringToDateTime("2015-03-02 00:00:00Z"), updatedKeyRing));
819var time1 = StringToDateTime("2015-03-01 00:00:00Z");