• Home
  • API Documentation
Show / Hide Table of Contents
  • TimeyWimey
    • DateTimeExtensions
      • ChangeKind
      • IsFuture
      • IsPast
      • TruncateToHours
      • TruncateToMinutes
      • TruncateToSeconds
    • DateTimeOffsetExtensions
      • IsFuture
      • IsPast
      • TruncateToHours
      • TruncateToMinutes
      • TruncateToSeconds
    • DateTimeRange
      • CompareTo
      • Contains
      • Create
      • DateTimeRange
      • End
      • EndAt
      • Equality
      • Equals
      • GetHashCode
      • GreaterThan
      • Inequality
      • Length
      • LessThan
      • Overlaps
      • Start
      • StartAt
    • NumberToTimespanExtensions
      • Days
      • Hours
      • Milliseconds
      • Minutes
      • Seconds
    • TimeSpans
      • EightHours
      • EightMilliseconds
      • FifteenMilliseconds
      • FifteenMinutes
      • FifteenSeconds
      • FiveDays
      • FiveHours
      • FiveHundredMilliseconds
      • FiveMilliseconds
      • FiveMinutes
      • FiveSeconds
      • FortyFiveMinutes
      • FortyFiveSeconds
      • FourteenDays
      • NinetyDays
      • OneDay
      • OneHour
      • OneHundredAndTwentyDays
      • OneHundredMilliseconds
      • OneMillisecond
      • OneMinute
      • OneSecond
      • SevenDays
      • SixteenMilliseconds
      • SixtyDays
      • TenHours
      • TenMilliseconds
      • TenMinutes
      • TenSeconds
      • ThirtyDays
      • ThirtyMinutes
      • ThirtyOneDays
      • ThirtySeconds
      • ThreeDays
      • ThreeHours
      • ThreeHundredAndSixtyFiveDays
      • ThreeMinutes
      • ThreeSeconds
      • TwelveHours
      • TwentyFourHours
      • TwentyMilliseconds
      • TwentyMinutes
      • TwentySeconds
      • TwoDays
      • TwoHours
      • TwoHundredAndFiftyMilliseconds
      • TwoMinutes
      • TwoSeconds
    • UnixTime
      • ToDateTime
      • ToDateTimeOffset
      • ToUnixTimestamp
      • UnixEpoch
      • UnixEpochDateTimeOffset
  • TimeyWimey.Abstractions
    • CachingClock
      • CachingClock
      • Dispose
      • Now
    • ClockBase
      • Adjusted
      • Now
      • OnAdjusted
    • IClock
      • Adjusted
      • Now
    • MockClock
      • Now
      • SetTime
    • SystemClock
      • Now
  • TimeyWimey.Tests
    • NumberToTimespanExtensions
      • DoubleToDays_InitialisesTimeSpanCorrectly
      • DoubleToHours_InitialisesTimeSpanCorrectly
      • DoubleToMilliseconds_InitialisesTimeSpanCorrectly
      • DoubleToMinutes_InitialisesTimeSpanCorrectly
      • DoubleToSeconds_InitialisesTimeSpanCorrectly
      • FloatToDays_InitialisesTimeSpanCorrectly
      • FloatToHours_InitialisesTimeSpanCorrectly
      • FloatToMilliseconds_InitialisesTimeSpanCorrectly
      • FloatToMinutes_InitialisesTimeSpanCorrectly
      • FloatToSeconds_InitialisesTimeSpanCorrectly
      • IntegerToDays_InitialisesTimeSpanCorrectly
      • IntegerToHours_InitialisesTimeSpanCorrectly
      • IntegerToMilliseconds_InitialisesTimeSpanCorrectly
      • IntegerToMinutes_InitialisesTimeSpanCorrectly
      • IntegerToSeconds_InitialisesTimeSpanCorrectly
      • LongToDays_InitialisesTimeSpanCorrectly
      • LongToHours_InitialisesTimeSpanCorrectly
      • LongToMilliseconds_InitialisesTimeSpanCorrectly
      • LongToMinutes_InitialisesTimeSpanCorrectly
      • LongToSeconds_InitialisesTimeSpanCorrectly

Class MockClock

A IClock implementation whose time is provided externally, allowing the returned time to be controlled during automated testing.

Inheritance
System.Object
ClockBase
MockClock
Implements
IClock
Inherited Members
ClockBase.Adjusted
ClockBase.OnAdjusted()
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: TimeyWimey.Abstractions
Assembly: cs.temp.dll.dll
Syntax
public class MockClock : ClockBase, IClock

Properties

Name Description
Now

Returns the time last provided via SetTime(DateTimeOffset, Boolean).

Methods

Name Description
SetTime(DateTimeOffset, Boolean)

Sets the

See Also

IClock
Back to top Copyright (c) 2017 Troy Willmot