コード例 #1
0
        public void AddBuyerToClosingFile()
        {
            var workFlowPage  = new WorkFlowPageNavigation(Driver);
            var buyerPage     = new BuyerPage(Driver);
            var appMembersRep = new AppMemberRepository(DbConn);

            HelperSet.HelperMethodAddWorkflow();

            var firstName = Configuration.GetSection("BuyerFirstName").Value;
            var lastName  = Configuration.GetSection("BuyerLastName").Value;

            workFlowPage
            .GoToAppropriateClosingFile()
            .ClickBuyerMenuItem();

            buyerPage
            .ClickAddBuyerButton()
            .SelectBuyerType()
            .TypeFirstName(firstName)
            .TypeLastName(lastName)
            .SelectGender()
            .SelectMaritalStatus()
            .SelectTenancy(Configuration.GetSection("BuyerFirstName").Value);

            Assert.AreEqual(lastName, appMembersRep.GetSellerLastName(firstName), "Buyer Was created");
        }
コード例 #2
0
        public void AddBuyerAddressTest()
        {
            Console.WriteLine("AddBuyerAddressTest");

            var userRep        = new UserRepository(DbConn);
            var closingFileRep = new ClosingFilesRepository(DbConn);
            var workFlowPage   = new WorkFlowPageNavigation(Driver);
            var buyerPage      = new BuyerPage(Driver);
            var memberRep      = new UserRepository(DbConn);
            var appMemberRep   = new AppMemberRepository(DbConn);

            var fName = $"fname{new Random().Next(1000, 50000)}";
            var lName = $"lname{new Random().Next(1000, 50000)}";

            appMemberRep.AddNewAppMember(fName, lName);

            var closingFileId = closingFileRep.GetClosingFileId(ClosingFileNumber);

            HelperSet.HelperMethodAddWorkflow();

            closingFileRep.AddSellerBuyerToClosingFile(closingFileId, UserId);
            var closingFile       = closingFileRep.SelectClosingFileWithBuyer(ClosingFileNumber, UserId);
            var closingFileNumber = closingFile.ClosingNumber;
            var buyerFName        = closingFile.FirstName;
            var buyerLName        = closingFile.LastName;

            Driver.Manage().Window.Maximize();
            workFlowPage
            .GoToAppropriateClosingFile()
            .ClickBuyerMenuItem()
            .ClickOnBuyer($"{buyerFName}  {buyerLName}");
            buyerPage
            .ClickAddressMenuItem()
            .TypeAddress1Field("500 Southeast 8th Avenue, Portland, OR, US");
            Thread.Sleep(1000);

            Assert.IsTrue(closingFileRep.GetAddressId().Contains(closingFileRep.GetAddressIdForBuyer(buyerFName)));
        }