public void TimeStamp_Selector_Matches_Valid_Names() { var timeStampSelector = new TimeStampSelector(); var timeStampTestClass = new TimeStampTestClass(); //Iterate over all of the properties in the EmailTestClass object... foreach (var property in timeStampTestClass.GetType().GetProperties()) { var canBind = timeStampSelector.CanBind(property); Assert.IsTrue(canBind, string.Format("{0} should have been a valid match", property.Name)); } }
public void TimeStamp_Selector_Injects_All_TimeStamp_Values() { var timeStampSelector = new TimeStampSelector(); var timeStampTestClass = new TimeStampTestClass(); //Iterate over all of the properties in the fullNameClass object... foreach (var property in timeStampTestClass.GetType().GetProperties()) { //Inject the value into the property timeStampSelector.Generate(timeStampTestClass, property); } //Iterate over all of the properties again foreach (var property in timeStampTestClass.GetType().GetProperties()) { var fieldValue = (long)property.GetValue(timeStampTestClass, null); Assert.IsAssignableFrom <long>(fieldValue, "Should be type of long..."); Assert.AreNotEqual(fieldValue, default(long)); } }
public void TimeStamp_Selector_Injects_All_TimeStamp_Values() { var timeStampSelector = new TimeStampSelector(); var timeStampTestClass = new TimeStampTestClass(); //Iterate over all of the properties in the fullNameClass object... foreach (var property in timeStampTestClass.GetType().GetProperties()) { //Inject the value into the property timeStampSelector.Generate(timeStampTestClass, property); } //Iterate over all of the properties again foreach (var property in timeStampTestClass.GetType().GetProperties()) { var fieldValue = (long)property.GetValue(timeStampTestClass, null); Assert.IsAssignableFrom<long>(fieldValue, "Should be type of long..."); Assert.AreNotEqual(fieldValue, default(long)); } }