Closed kevinXYX closed 7 years ago
Your assertion doesn't do what you'd like it to do, because there is no implication there. What you want is:
[AssertThat(@"nationality == 'FILIPINO' ? txtValue1 == txtValue2 : true")]
public string txtValue1 { get; set; }
If you'd like to choose the other way around, without conditional operator, make your statement more complete, i.e.:
[AssertThat(@"(nationality == 'FILIPINO' && (txtValue1 == txtValue2))
|| (nationality != 'FILIPINO')")]
public string txtValue1 { get; set; }
Thank you! and thank you for the awesome library.
I want to Assert That depending on another condition for example
if Nationality is Filipino then txtValue1 must be equal to txtValue2 how do i do that?
[AssertThat("nationality == 'FILIPINO' && (txtValue1 == txtValue2)", ErrorMessage = "The selected nationality is Filipino the textValue1 must be equal to textValue2")]
doesn't work.