PeanutButter
Loading...
Searching...
No Matches
PeanutButter.TestUtils.Generic.DateTimeAssert Class Reference

Provides assertions against DateTime values. More...

Static Public Member Functions

static void IsInRange (DateTime test, DateTime min, DateTime max)
 Tests if a DateTime value is within a provided range.
static void IsInRange (DateTime test, int minYear, int minMonth, int minDay, int maxYear, int maxMonth, int maxDay)
 Tests if a DateTime value is within the provided range by parts.
static void IsInTimeRange (DateTime test, DateTime min, DateTime max)
 Tests if a given DateTime value has the TIME component within the provided range.

Detailed Description

Provides assertions against DateTime values.

Member Function Documentation

◆ IsInRange() [1/2]

void PeanutButter.TestUtils.Generic.DateTimeAssert.IsInRange ( DateTime test,
DateTime min,
DateTime max )
static

Tests if a DateTime value is within a provided range.

Parameters
testValue to test
minMinimum value required
maxMaximum value required

◆ IsInRange() [2/2]

void PeanutButter.TestUtils.Generic.DateTimeAssert.IsInRange ( DateTime test,
int minYear,
int minMonth,
int minDay,
int maxYear,
int maxMonth,
int maxDay )
static

Tests if a DateTime value is within the provided range by parts.

Parameters
testValue to test
minYearMinimum year to test against
minMonthMinimum mont to test against
minDayMinimum day to test against
maxYearMaximum year to test against
maxMonthMaximum month to test against
maxDayMaximum day to test against

◆ IsInTimeRange()

void PeanutButter.TestUtils.Generic.DateTimeAssert.IsInTimeRange ( DateTime test,
DateTime min,
DateTime max )
static

Tests if a given DateTime value has the TIME component within the provided range.

Parameters
testDateTime value to test
minDateTime with minimum time to test with. Date part is ignored.
maxDateTIme with maximum time to test with. Date part is ignored.

The documentation for this class was generated from the following file:
  • source/TestUtils/PeanutButter.TestUtils.Generic/DateTimeAssert.cs