public void When_ChildBlock1_Then_cousin_is_findable() { var environment = Substitute.For <IDriverEnvironment>(); var session = Substitute.For <Session>(environment); var @by = Substitute.For <By>(); var page = new AncestryPage(session, @by); var block = page.Grandparent; var result = block.ParentBlockA.ChildBlock1.FindRelated <ChildBlock2>(); result.Should().NotBeNull(); }
public void When_TestBlock_with_parent_Then_child_is_returned() { var environment = Substitute.For <IDriverEnvironment>(); var session = Substitute.For <Session>(environment); var @by = Substitute.For <By>(); var page = new AncestryPage(session, @by); var block = page.Grandparent; var result = block.FindRelated <GrandparentBlock>(); result.InstanceId .Should().Be(block.InstanceId); }