Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            globals.expRpt = new ExtentReporter();
            globals.expRpt.setupExtentReport("Automation Framework", "Non-Pocket framwork");

            LoginTest logint = new LoginTest();

            logint.loginSucessfully();
            logint.loginNotsucessfully();

            AddCompanyTest addComp = new AddCompanyTest();

            addComp.addCompany();

            EditCompanyTest editComp = new EditCompanyTest();

            editComp.editCompany();

            ViewPaymentTerminalGroupTest viewPayTerm = new ViewPaymentTerminalGroupTest();

            viewPayTerm.viewPaymentTerminalGroup();

            CreatePaymentTerminalGroupTest createPayTerm = new CreatePaymentTerminalGroupTest();

            createPayTerm.createPaymentTerminalGroup();

            DiagnosticinMaintenanceTest diagMain = new DiagnosticinMaintenanceTest();

            diagMain.serilNoinUsed();
            diagMain.serilNoNotUsed();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            LoadingPageTest loadingPageTest = new LoadingPageTest();
            LoginTest       loginTest       = new LoginTest();
            Orders          orders          = new Orders();

            loadingPageTest.LoadPage("https://www.saucedemo.com/"); //load page test

            loginTest.SuccesfulLogIn();                             //succesful login test

            loginTest.UnsuccesfulLogIn();                           //unsuccesful login test

            loginTest.LockedUserLogIn();                            //locked user login test

            loginTest.LogInWithoutTypingLogin();                    //login without login test

            loginTest.LogInWithoutTypingPassword();                 //login without password test

            orders.AddThreeItemsToCart();                           //adding 3 items to cart test

            orders.RemovingItemFromCart();                          //removing item from cart test

            orders.CheckoutAttempt();                               //checkout attempt test

            orders.CheckoutAttemptWithInvalidPostalCode();          //checkout with invalid postal code test

            orders.MakeAnOrder();                                   //making an order test

            orders.CheckIfCorrectItemsAreInCart();                  //checking of correct items test

            orders.CheckIfThereIsCorrectPrice();                    //checking of correct price
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            LoginTest Exe = new LoginTest();

            Exe.Login();
            OrdersPage Op = new OrdersPage();

            Op.CatalogOrderAddToCart();
        }
Ejemplo n.º 4
0
        public void OnAuthenticate_True_Deny_Unrestricted()
        {
            LoginTest unit = new LoginTest();

            try {
                unit.OnAuthenticate_True();
            }
            catch (TypeInitializationException) {
                // ms 2.0 - depending on the test run-order the HttpRuntime may throw
            }
        }
Ejemplo n.º 5
0
        public void PermitOnly_ControlPrincipal()
        {
            LoginTest unit = new LoginTest();

            try {
                unit.OnBubbleEvent();
                unit.OnAuthenticate_False();
            }
            catch (TypeInitializationException) {
                // ms 2.0 - depending on the test run-order the HttpRuntime may throw
            }
        }
Ejemplo n.º 6
0
        public Task <bool> CheckLogin(string _userName, string _password)
        {
            //Get the list of matching Login data From Franco
            // var x = dataAcces.getlogindata(_username);
            //Check if it contains the username -- if return null or zero entries > wrong username
            //Test code
            var q           = GetAllLogins();
            var logintoTest = new LoginTest {
                Name = _userName, Password = _password
            };

            return(Task.FromResult(Utilities.CheckIfContains(q, logintoTest)));
        }
Ejemplo n.º 7
0
        public ActionResult Delete(string id, LoginTest userToDelete)
        {
            try
            {
                _userService.Remove(id);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
Ejemplo n.º 8
0
        public bool Login(LoginTest userToLogIn, out string id)
        {
            var pass = HashPass(userToLogIn.password);

            id = _loginTest.Find(u => u.userName == userToLogIn.userName && u.password == pass).FirstOrDefault().userID;

            if (string.IsNullOrEmpty(id))
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 9
0
        public void Login_Click_Test()
        {
            LoginTest obj = new LoginTest();

            var loginUserName = obj.UserName;
            var loginPassword = obj.Password;

            if (loginUserName == "" || loginPassword == "")
            {
                Assert.Fail();
            }
            else
            {
                if (loginUserName != "TestUserName" || loginPassword != "TestPassword")
                {
                    Assert.Fail();
                }
            }
        }
Ejemplo n.º 10
0
        static void RunTests(Simulator sim)
        {
            try {
                ss = 1;
                Console.WriteLine("Running {0}", sim.Name);
                var app = ConfigureApp.Debug().iOS.EnableLocalScreenshots()
                          .AppBundle("../../../../MusicPlayer.iOS/bin/iPhoneSimulator/Debug/MusicPlayeriOS.app")
                          .DeviceIdentifier(sim.UDID).StartApp();
                if (sim.Name.Contains("iPad"))
                {
                    app.SetOrientationLandscape();
                }
                AppInitializer.App = app;
                //PlayMusicTest.PlaySong (app);
                LoginTest.CheckLogin();
                MenuTests.GotoArtist(app);
                sim.TakeScreenshot(app);
                Console.WriteLine("Took Screenshot {0} - {1}", sim.Name, "Artist");

                MenuTests.GotoAlbums(app);
                sim.TakeScreenshot(app);
                Console.WriteLine("Took Screenshot {0} - {1}", sim.Name, "Albums");

                MenuTests.GotoGenres(app);
                sim.TakeScreenshot(app);
                Console.WriteLine("Took Screenshot {0} - {1}", sim.Name, "Genres");

                MenuTests.GotoSongs(app);
                sim.TakeScreenshot(app);
                Console.WriteLine("Took Screenshot {0} - {1}", sim.Name, "Songs");

                MenuTests.GotoPlaylists(app);
                sim.TakeScreenshot(app);
                Console.WriteLine("Took Screenshot {0} - {1}", sim.Name, "Playlists");

                MenuTests.GotoEqualizer(app);
                sim.TakeScreenshot(app);
                Console.WriteLine("Took Screenshot {0} - {1}", sim.Name, "Equalizer");
            } catch (Exception ex) {
                Console.WriteLine(ex);
            }
        }
        public void Deny_Unrestricted()
        {
            LoginTest unit = new LoginTest();

            unit.ReadOnlyFields();
            unit.DefaultProperties();
            unit.AssignToDefaultProperties();
            unit.NullProperties();
            unit.BorderPadding();
            unit.FailureAction_All();
            unit.LoginButtonType_All();
            unit.Orientation_All();
            unit.TextLayout_All();
            unit.SaveViewState();
            unit.OnBubbleEvent_Cancel_OnLoggingIn();
            unit.OnLoggingIn_False();
            unit.OnLoggingIn_True();
            unit.OnLoginError();
            unit.OnLoggedIn();
        }
Ejemplo n.º 12
0
        private async Task AcceptClick(object sender, EventArgs e)
        {
            if (NetworkCheck.IsInternet())
            {
                if (string.IsNullOrEmpty(NameEntry.Text) || string.IsNullOrEmpty(PwEntry.Text))
                {
                    await DisplayAlert("Missing information", "Please type in both username and password", "OK");
                }
                else
                {
                    activitySpinner.IsVisible = true;

                    //Save to secure storage

                    CrossSecureStorage.Current.SetValue("username", NameEntry.Text);
                    CrossSecureStorage.Current.SetValue("password", PwEntry.Text);

                    var instrumetns = ApiClientO2AuthExampleSingleton.Instance.GetUserInstruments(CrossSecureStorage.Current.GetValue("username"));
                    //List<InstrumentDetails> instrumetns = null;

                    LoginTest tester = new LoginTest();

                    NetworkCheck.getLogged();
                    if (NetworkCheck.getLogged() == true)
                    {
                        CrossSecureStorage.Current.SetValue("username", NameEntry.Text);
                        CrossSecureStorage.Current.SetValue("password", PwEntry.Text);
                        CrossSecureStorage.Current.SetValue("token", "1");
                        activitySpinner.IsVisible    = false;
                        Application.Current.MainPage = new NavigationPage(new Front());

                        await Navigation.PopToRootAsync(true);
                    }
                }
            }
            else
            {
                await DisplayAlert("Internet", "No internet available", "OK");
            }
        }
Ejemplo n.º 13
0
        public void Register_Click_Test()
        {
            LoginTest obj              = new LoginTest();
            var       firstName        = obj.RegisterFirstName;
            var       lastName         = obj.RegisterLastName;
            var       email            = obj.RegisterEmail;
            var       phone            = obj.RegisterPhone;
            var       registerUserName = obj.RegisterUserName;
            var       registerPassword = obj.RegisterPassword;

            if (firstName == "" || lastName == "" || email == "" || registerUserName == "" || registerPassword == "")
            {
                Assert.Fail();
            }
            else
            {
                if (phone.Length > 0 && phone.Length != 9)
                {
                    Assert.Fail();
                }
            }
        }
        public void OnAuthenticate_False_Deny_ControlPrincipal()
        {
            LoginTest unit = new LoginTest();

            unit.OnAuthenticate_False();
        }
        public void OnBubbleEvent_Deny_ControlPrincipal()
        {
            LoginTest unit = new LoginTest();

            unit.OnBubbleEvent();
        }
Ejemplo n.º 16
0
 public void Remove(LoginTest LoginTestIn)
 {
     _loginTest.DeleteOne(LoginTest => LoginTest.userID == LoginTestIn.userID);
 }
Ejemplo n.º 17
0
 public void Update(LoginTest LoginTestIn)
 {
     LoginTestIn.password = HashPass(LoginTestIn.password);
     _loginTest.ReplaceOne(l => l.userID == LoginTestIn.userID, LoginTestIn);
 }
Ejemplo n.º 18
0
 public LoginTest Create(LoginTest LoginTestIn)
 {
     LoginTestIn.password = HashPass(LoginTestIn.password);
     _loginTest.InsertOne(LoginTestIn);
     return(LoginTestIn);
 }
Ejemplo n.º 19
0
        public void Configuration()
        {
            LoginTest Exe = new LoginTest();

            Exe.Login();
        }