public void DateTimeOffset_Selector_Injects_All_DateTime_Values() { var timeSelector = new DateTimeOffsetSelector(); var dateTimeTestClass = new DateTimeOffsetTestClass(); //Iterate over all of the properties in the fullNameClass object... foreach (var property in dateTimeTestClass.GetType().GetProperties()) { //Inject the value into the property timeSelector.Generate(dateTimeTestClass, property); } //Iterate over all of the properties again foreach (var property in dateTimeTestClass.GetType().GetProperties()) { var fieldValue = (DateTimeOffset)property.GetValue(dateTimeTestClass, null); Assert.IsAssignableFrom <DateTimeOffset>(fieldValue, "Should be type of DateTime..."); Assert.AreNotEqual(fieldValue, default(DateTimeOffset)); } }
public void DateTimeOffset_Selector_Injects_All_DateTime_Values() { var timeSelector = new DateTimeOffsetSelector(); var dateTimeTestClass = new DateTimeOffsetTestClass(); //Iterate over all of the properties in the fullNameClass object... foreach (var property in dateTimeTestClass.GetType().GetProperties()) { //Inject the value into the property timeSelector.Generate(dateTimeTestClass, property); } //Iterate over all of the properties again foreach (var property in dateTimeTestClass.GetType().GetProperties()) { var fieldValue = (DateTimeOffset)property.GetValue(dateTimeTestClass, null); Assert.IsAssignableFrom<DateTimeOffset>(fieldValue, "Should be type of DateTime..."); Assert.AreNotEqual(fieldValue, default(DateTimeOffset)); } }