I would like to compare an extracted date value from a txtbox or datepicker control. There are multiple places in the application that we would have to verify that the current date is displayed. So I would like to write this once and be able to reuse the function. Has anyone done this before or have any ideas on how to do this?
My initial thoughts would be to create a stand alone test with a coded step that compares an extracted date variable to 'DateTime.Now.ToString("M/dd/yyyy"). Then anytime I needed to compare dates I would always use the same extracted variable name. Is this something that would work anywhere in a project?
Thanks for your thoughts,