public void ShouldBeNotAbleToFindElementByIdWhenComparerIsSubClassOfStringComparer() { // GIVEN var endsWithComparer = new EndsWithComparer("myId"); var byID = Find.ById(endsWithComparer); // WHEN var hinter = IdHinter.GetIdHint(byID); // THEN Assert.That(hinter, Is.Null); }
public void ShouldBeAbleToFindElementByIdWhenComparerIsStringComparer() { // GIVEN var byID = Find.ById("myId"); Assert.That(byID.Comparer.GetType(), Is.EqualTo(typeof(Comparers.StringComparer)), "pre-condition failed"); // WHEN var hinter = IdHinter.GetIdHint(byID); // THEN Assert.That(hinter, Is.EqualTo("myId")); }