示例#1
0
 /// <summary>
 /// Sets the DSL's IDateTimeNowAdapter. This is the injection point for tests to provide their own adapter
 /// implementation.
 /// </summary>
 /// <param name="adapter"><see cref="IDateTimeNowAdapter"/> implementation.</param>
 internal static void SetDateTimeNowAdapter(IDateTimeNowAdapter adapter)
 {
     lock (_syncLock)
     {
         _nowAdapter = adapter;
     }
 }
示例#2
0
 /// <summary>
 /// Sets the DSL's IDateTimeNowAdapter. This is the injection point for tests to provide their own adapter
 /// implementation.
 /// </summary>
 /// <param name="adapter"><see cref="IDateTimeNowAdapter"/> implementation.</param>
 internal static void SetDateTimeNowAdapter(IDateTimeNowAdapter adapter)
 {
     lock (_syncLock) { _nowAdapter = adapter; }
 }
示例#3
0
 public void SetUpTest()
 {
     _nowAdapter = new TestDateTimeNowAdapter(new DateTime(2012, 1, 21, 23, 0, 0));
     DateTimeExtensions.SetDateTimeNowAdapter(_nowAdapter);
 }
示例#4
0
 public void SetUpTest()
 {
     _nowAdapter = new TestDateTimeNowAdapter(DateTime.Now);
     DateTimeComponentsConversionToDateTime.SetDateTimeNowAdapter(_nowAdapter);
 }
示例#5
0
 public void SetUpTest()
 {
     _nowAdapter = new TestDateTimeNowAdapter(new DateTime(2012, 1, 21, 23, 0, 0));
     DateTimeExtensions.SetDateTimeNowAdapter(_nowAdapter);
 }
示例#6
0
 public void SetUpTest()
 {
     _nowAdapter = new TestDateTimeNowAdapter(DateTime.Now);
     DateTimeComponentsConversionToDateTime.SetDateTimeNowAdapter(_nowAdapter);
 }