Headless.UnitTests.BrowserExtensionsTests.GoToStaticWithStatusNavigatesToPageLocationTest C# (CSharp) Method

GoToStaticWithStatusNavigatesToPageLocationTest() private method

private GoToStaticWithStatusNavigatesToPageLocationTest ( ) : void
return void
        public void GoToStaticWithStatusNavigatesToPageLocationTest()
        {
            var expected = new TextPageWrapper();

            var target = Substitute.For<IBrowser>();

            target.Execute<TextPageWrapper>(
                Arg.Is<HttpRequestMessage>(x => x.RequestUri == expected.TargetLocation && x.Method == HttpMethod.Get),
                HttpStatusCode.NotFound,
                Arg.Any<IPageFactory>()).Returns(expected);

            var actual = target.GoTo<TextPageWrapper>(HttpStatusCode.NotFound);

            actual.Should().BeSameAs(expected);
        }