public void ThenTheAndShouldBeValid_(string textItem1, string textItem2, string textItem3) { try { Assert.True(_viewerPage.FindTextinViewer(textItem1)); Assert.True(_viewerPage.FindTextinViewer(textItem2)); Assert.True(_viewerPage.FindTextinViewer(textItem3)); _viewerPage.CloseViewer(); _viewerPage.SwitchToParent(); } catch (Exception exception) { Console.Write(@"Either of {0},{1} or {2} were not found in the viewer.", textItem1, textItem2, textItem3); throw new Exception("Exception raised:" + exception); } }
public void ThenTheAndShouldBeValid_(string expectedTime, string expectedRecipient, string expectedMessage) { try { Assert.True(_viewerPage.FindTextinViewer(expectedMessage)); Assert.True(_viewerPage.FindTextinViewer(expectedTime)); Assert.True(_viewerPage.FindTextinViewer(expectedRecipient)); _viewerPage.CloseViewer(); _viewerPage.SwitchToParent(); } catch (Exception exception) { Console.Write(@"Either of {0},{1} or {2} were not found in the viewer.", expectedMessage, expectedRecipient, expectedTime); throw new Exception("Exception raised:" + exception); } }