示例#1
0
        public void ThenTheAddressDetailsWillBeSavedAsEntered()
        {
            Assert.IsTrue(YourAddresses.AddressOneHeading.Displayed, TestErrorHelper.ExpectedItemNotDisplayed("heading", "Default"));

            var actualDisplayedAddress = _addressActions.GetCustomerAddressOne();

            Assert.IsNotNull(actualDisplayedAddress);

            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.DefaultAddressDetails().Address), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.DefaultAddressDetails().Address));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.DefaultAddressDetails().Apartment), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.DefaultAddressDetails().Apartment));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.DefaultAddressDetails().City), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.DefaultAddressDetails().City));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.DefaultAddressDetails().Company), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.DefaultAddressDetails().Company));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.DefaultAddressDetails().Country), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.DefaultAddressDetails().Country));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.DefaultAddressDetails().FirstName), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.DefaultAddressDetails().FirstName));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.DefaultAddressDetails().Postcode), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.DefaultAddressDetails().Postcode));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.DefaultAddressDetails().Surname), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.DefaultAddressDetails().Surname));

            Console.WriteLine($"The actual address was {actualDisplayedAddress}");
        }
示例#2
0
        public void ThenTheSecondAddedAddressWillBeSavedAsEntered()
        {
            var actualDisplayedAddress = _addressActions.GetCustomerAddressTwo();

            Assert.IsNotNull(actualDisplayedAddress);

            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.FurtherAddressDetails().Address), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.FurtherAddressDetails().Address));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.FurtherAddressDetails().Apartment), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.FurtherAddressDetails().Apartment));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.FurtherAddressDetails().City), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.FurtherAddressDetails().City));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.FurtherAddressDetails().Company), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.FurtherAddressDetails().Company));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.FurtherAddressDetails().Country), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.FurtherAddressDetails().Country));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.FurtherAddressDetails().FirstName), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.FurtherAddressDetails().FirstName));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.FurtherAddressDetails().Postcode), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.FurtherAddressDetails().Postcode));
            Assert.IsTrue(actualDisplayedAddress.Contains(_expectedAddress.FurtherAddressDetails().Surname), TestErrorHelper.ExpectedAddressNotDisplayed(_expectedAddress.FurtherAddressDetails().Surname));

            Console.WriteLine($"The actual address was {actualDisplayedAddress}");
        }