Exemple #1
0
        public void ThenISeeVendedPrefixIsFromTheAuto_VendRange()
        {
            var page         = new Pages.Confirmation(Setup.TestSetup.Driver);
            var vendedPrefix = page.GetVendedPrefix();
            var range        = Setup.TestSetup.UiisContext.Range2;

            vendedPrefix.StartsWith(range).ShouldBeTrue();
        }
        public void ThenISeeANewEntityGLNDisplayed()
        {
            var page      = new Pages.Confirmation(Setup.TestSetup.Driver);
            var prefix    = page.GetVendedPrefix();
            var entityGln = page.GetVendedEntityGLN();

            Console.WriteLine($"Vended Prefix = {prefix}; EntityGLN = {entityGln}");
            prefix.ShouldStartWith(prefix);
        }
        public void ThenICheckThatCategoryIsX(string category)
        {
            var page    = new Pages.Confirmation(Setup.TestSetup.Driver);
            var account = Setup.TestSetup.UiisContext.TestAccount;
            var names   = Setup.TestSetup.Imis.NamesByCoId(account.ID);
            var prefix  = page.GetVendedPrefix().TrimStart('0');

            Console.WriteLine($"Vended Prefix = {prefix}");
            names.Where(o => o.LAST_FIRST == prefix).First().CATEGORY.ShouldBe(category);
        }
        public void ThenICheckThatVendedIdentifierMatchesLastNameInNameTable()
        {
            var page    = new Pages.Confirmation(Setup.TestSetup.Driver);
            var account = Setup.TestSetup.UiisContext.TestAccount;
            var names   = Setup.TestSetup.Imis.NamesByCoId(account.ID);
            var prefix  = page.GetVendedPrefix().TrimStart('0');

            Console.WriteLine($"Vended Prefix = {prefix}");
            names.Where(o => o.LAST_NAME == prefix).ShouldNotBeEmpty();
        }
        public void ThenICheckThisPrefixInCompanyPrefixTable()
        {
            var page   = new Pages.Confirmation(Setup.TestSetup.Driver);
            var prefix = page.GetVendedPrefix();

            Console.WriteLine($"prefix = {prefix}");
            PollUtils.Poll(
                $"Querying prefix {prefix}", 60, 5,
                () => Setup.TestSetup.UiisDb.GetPrefixByValue(prefix),
                o => o.Count() > 0
                ).First().Value.ShouldBe(prefix);
        }
        public void ThenICheckThatVendedIdentifierMatchesMajorKeyInNameTable(string removeLeading0)
        {
            var page    = new Pages.Confirmation(Setup.TestSetup.Driver);
            var account = Setup.TestSetup.UiisContext.TestAccount;
            var prefix  = page.GetVendedPrefix();

            if (!String.IsNullOrEmpty(removeLeading0))
            {
                prefix = prefix.TrimStart('0');
            }
            Console.WriteLine($"Vended Prefix = {prefix}");
            var names = PollUtils.Poll(
                $"Querying account by ID {account.ID}", 60, 5,
                () => Setup.TestSetup.Imis.NamesByCoId(account.ID),
                xs => xs.Where(x => x.MAJOR_KEY == prefix).Count() > 0
                );

            names.Where(o => o.MAJOR_KEY == prefix).ShouldNotBeEmpty();
        }