public void SetUp()
 {
     testController = MockRepository.GenerateStub<ITestController>();
     var taskManager = new TestTaskManager();
     testTreeModel = MockRepository.GenerateStub<ITestTreeModel>();
     executionLogController = new ExecutionLogController(testController, testTreeModel, taskManager);
 }
 public void SetUp()
 {
     testController = MockRepository.GenerateStub<ITestController>();
     projectController = MockRepository.GenerateStub<IProjectController>();
     loadPackageCommand = new LoadPackageCommand(testController, projectController);
     progressMonitor = MockProgressMonitor.Instance;
 }
        public void Extend(ITestController testController, object suite)
        {
            var fields = suite.GetType().GetFields(MemberBindings.Instance).ToList();
              if (fields.Count == 0)
            return;

              testController.AddAction<SetupExtension>("<Reset_Instance_Fields>", x => fields.ForEach(f => f.SetValue(suite, f.FieldType.GetDefaultValue())));
        }
 public ShowReportCommand(ITestController testController, IReportController reportController, 
     IFileSystem fileSystem)
 {
     this.testController = testController;
     this.reportController = reportController;
     this.fileSystem = fileSystem;
     ReportFormat = string.Empty;
 }
Esempio n. 5
0
        public TestNode(ProjectFile projectFile, ITestController testController,
            ITestFileManager testFileManager)
        {
            this.projectFile = projectFile;
            this.testController = testController;
            this.testFileManager = testFileManager;

            DefaultCommand = new DelegateCommand(ExecuteDefaultCommand);
        }
Esempio n. 6
0
 public RunTestsCommand(ITestController testController, IProjectController projectController, 
     IOptionsController optionsController, IReportController reportController, 
     IFilterService filterService)
 {
     this.testController = testController;
     this.projectController = projectController;
     this.optionsController = optionsController;
     this.reportController = reportController;
     this.filterService = filterService;
 }
        private TaskCheckWindow()
        {
            this.InitializeComponent();

            this.indicators = new List<TestIndicator>();

            this.filesPanel = new TestingFilesPanel();
            this.filesPanel.SelectionChanged += this.FilesPanel_OnSelectionChanged;
            this.TestingFilesPanel.Children.Add(filesPanel);

            this.controller = CoreAccessor.GetTestController();
            this.controller.TestChanged += this.controller_TestChanged;
            this.controller.AllTestsFinished += this.controller_AllTestsFinished;
        }
Esempio n. 8
0
        public DebugView(ITestController mainController)
        {
            InitializeComponent();
            _listBoxAgnets = new ListBox[] { listBoxClient, listBoxLeader, listBoxScouts };

            testController = mainController;

            listBoxTestCases.DataSource = testController.TestCasesList;

            UpdateAll();

            addressTextBox.Text = Dns.GetHostEntry(Dns.GetHostName()).AddressList[0].ToString();
            portTextBox.Text = "4468";
        }
 public void SetUp()
 {
     optionsController = MockRepository.GenerateStub<IOptionsController>();
     fileSystem = MockRepository.GenerateStub<IFileSystem>();
     taskManager = MockRepository.GenerateStub<ITaskManager>();
     testController = MockRepository.GenerateStub<ITestController>();
     projectController = MockRepository.GenerateStub<IProjectController>();
     unhandledExceptionPolicy = MockRepository.GenerateStub<IUnhandledExceptionPolicy>();
     eventAggregator = MockRepository.GenerateStub<IEventAggregator>();
     commandFactory = MockRepository.GenerateStub<ICommandFactory>();
     applicationController = new ApplicationController(optionsController,fileSystem,taskManager,testController,
                         projectController,unhandledExceptionPolicy,eventAggregator,commandFactory);
     command = MockRepository.GenerateStub<ICommand>();
 }
Esempio n. 10
0
 public RecordingController(IRecordWindowFactory recordWindowFactory,
     IRecorderViewModelFactory recorderViewModelFactory,
     IRecorderFactory recorderFactory,
     ITestFileManager testFileManager,
     IProjectFileManager projectFileManager, 
     IAppController appController,
     ITestController testController,
     ITestItemController testItemController)
 {
     this.recordWindowFactory = recordWindowFactory;
     this.recorderViewModelFactory = recorderViewModelFactory;
     this.recorderFactory = recorderFactory;
     this.testFileManager = testFileManager;
     this.projectFileManager = projectFileManager;
     this.appController = appController;
     this.testController = testController;
     this.testItemController = testItemController;
 }
Esempio n. 11
0
        public MainWindow()
        {
            InitializeComponent();

            // Setup DispatchTimer Parameters
            _UpdateTimer.Interval = TimeSpan.FromSeconds(0.1);
            _UpdateTimer.Tick    += _uiUpdateTimer_Tick;

            // Event Handlers
            StartButton.Click    += StartButton_Click;
            SettingsButton.Click += SettingsButton_Click;

            _testManager                 = new TestManager();
            _testController              = new TestController(_testManager);
            _testController.NextWord    += _testController_NextWord;
            _testController.NewTest     += _testController_NewTest;
            _testController.TestEnd     += _testController_TestEnd;
            _testController.MistakeMade += _testController_MistakeMade;

            EntryBox.TextChanged += EntryBox_TextChanged;
        }
Esempio n. 12
0
        public void PerformSignInFlow(ITestController controller, LabUser user)
        {
            UserInformationFieldIds userInformationFieldIds = DetermineUserInformationFieldIds(user);

            //Acquire token flow
            controller.Tap(CoreUiTestConstants.AcquireTokenButtonId);
            try
            {
                //i0116 = UPN text field on AAD sign in endpoint
                controller.EnterText(CoreUiTestConstants.WebUPNInputId, 20, user.Upn, XamarinSelector.ByHtmlIdAttribute);
                //idSIButton9 = Sign in button
                controller.Tap(CoreUiTestConstants.WebSubmitId, XamarinSelector.ByHtmlIdAttribute);
                //i0118 = password text field
                controller.EnterText(userInformationFieldIds.GetPasswordInputId(), user.GetOrFetchPassword(), XamarinSelector.ByHtmlIdAttribute);
                controller.Tap(userInformationFieldIds.GetPasswordSignInButtonId(), XamarinSelector.ByHtmlIdAttribute);
            }
            catch
            {
                Console.WriteLine("Failed to find UPN input. Attempting to click on UPN from select account screen");
                controller.Tap(user.Upn, XamarinSelector.ByHtmlValue);
            }
        }
Esempio n. 13
0
        public void Extend(ITestController testController, object suite)
        {
            var suiteType           = suite.GetType();
            var fieldsWithAttribute = suiteType.GetFieldsWithAttribute <AutoDataAttribute>()
                                      .OrderBy(x => x.Item1.Name).ToList();

            if (fieldsWithAttribute.Count == 0)
            {
                return;
            }

            var seed          = GetSeed(suiteType);
            var random        = new DefaultRandom(seed);
            var configuration = GetAutoDataConfiguration(suiteType);

            var generator = TestDataGeneratorFactory.Create(x => configuration(x).UseRandom(random));

            // TODO: add seed to data
            testController.AddAction <SetupExtension>(
                $"<Create_AutoData><{seed}>",
                x => fieldsWithAttribute.ForEach(t => CreateAndAssignAuto(suite, generator, t.Item2, t.Item1)));
        }
        // FIXME: too many dependencies!
        public ApplicationController(IOptionsController optionsController, IFileSystem fileSystem,
                                     ITaskManager taskManager, ITestController testController, IProjectController projectController,
                                     IUnhandledExceptionPolicy unhandledExceptionPolicy, IEventAggregator eventAggregator,
                                     ICommandFactory commandFactory)
        {
            this.optionsController        = optionsController;
            this.fileSystem               = fileSystem;
            this.taskManager              = taskManager;
            this.unhandledExceptionPolicy = unhandledExceptionPolicy;
            this.eventAggregator          = eventAggregator;
            this.commandFactory           = commandFactory;

            optionsController.PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == "RecentProjects")
                {
                    OnPropertyChanged(new PropertyChangedEventArgs("RecentProjects"));
                }
            };

            CanRunTests = new Observable <bool>();
        }
Esempio n. 15
0
 public RemoveFileCommand(IProjectController projectController, ITestController testController)
 {
     this.projectController = projectController;
     this.testController = testController;
 }
 public RefreshTestTreeCommand(ITestController testController)
 {
     this.testController = testController;
 }
Esempio n. 17
0
 public DriveByAttackProxy(ITestController testController, ITrafficDataAccessor dataStore, string host = "127.0.0.1", int port = 9998)
     : this(testController, null, dataStore, host, port)
 {
 }
 public SourceCodeController(ITestController testController)
 {
     this.testController = testController;
 }
Esempio n. 19
0
 private void SetB2CInputDataForEditProfileAuthority(ITestController controller)
 {
     controller.Tap(_settingsPageId);
     // Select Edit Profile for Authority
     SetAuthority(controller, CoreUiTestConstants.B2CEditProfileAuthority);
 }
Esempio n. 20
0
 private void SetB2CInputData(ITestController controller)
 {
     // Select login.microsoftonline.com for authority
     SetAuthority(controller, CoreUiTestConstants.MicrosoftOnlineAuthority);
 }
Esempio n. 21
0
 public RemoveFileCommand(IProjectController projectController, ITestController testController)
 {
     this.projectController = projectController;
     this.testController    = testController;
 }
 public GenerateReportCommand(ITestController testController, IReportController reportController)
 {
     this.testController   = testController;
     this.reportController = reportController;
 }
Esempio n. 23
0
 public RunManager(ITestController testController, IRunBuilder runBuilder)
 {
     _testController = testController;
     _runBuilder     = runBuilder;
 }
Esempio n. 24
0
 public SequentialAttackProxy(ITestController testController, CustomTestsFile testFile, ITrafficDataAccessor dataStore, string host = "127.0.0.1", int port = 9998)
     : base(testController, testFile, dataStore, host, port)
 {
 }
Esempio n. 25
0
 public Tester(ITestController testController, CustomTestsFile testFile)
 {
     _testController = testController;
     _testFile       = testFile;
     _matchFiles     = new Dictionary <string, IEnumerable <string> >();
 }
 public void SetUp()
 {
     testController       = MockRepository.GenerateStub <ITestController>();
     sourceCodeController = new SourceCodeController(testController);
 }
 public SourceCodeController(ITestController testController)
 {
     this.testController = testController;
 }
 public SpecificSpecificationRunner(ITestController testController, Assembly assembly, IEnumerable <MemberInfo> members)
 {
     _testController = testController;
     _assembly       = assembly;
     _members        = members;
 }
Esempio n. 29
0
 public AssemblyRunner(ITestController testController, IEnumerable <Assembly> assemblies)
 {
     _testController = testController;
     _assemblies     = assemblies;
 }
Esempio n. 30
0
 private void SetB2CInputDataForB2CloginAuthority(ITestController controller)
 {
     // Select b2clogin.com for authority
     SetAuthority(controller, CoreUiTestConstants.B2CLoginAuthority);
 }
Esempio n. 31
0
 public void SetUp()
 {
     testController        = MockRepository.GenerateStub <ITestController>();
     optionsController     = MockRepository.GenerateStub <IOptionsController>();
     annotationsController = new AnnotationsController(testController, optionsController);
 }
Esempio n. 32
0
 private void SetB2CInputDataForROPC(ITestController controller)
 {
     controller.Tap(_settingsPageId);
     // Select ROPC for authority
     SetAuthority(controller, CoreUiTestConstants.ROPC);
 }
Esempio n. 33
0
 public ResetTestsCommand(ITestController testController)
 {
     this.testController = testController;
 }
Esempio n. 34
0
 public static void PerformSignInFlowWithoutUI(ITestController controller)
 {
     //Acquire token flow
     controller.Tap(CoreUiTestConstants.AcquireTokenButtonId);
 }
 public void SetUp()
 {
     testController = MockRepository.GenerateStub<ITestController>();
     optionsController = MockRepository.GenerateStub<IOptionsController>();
     annotationsController = new AnnotationsController(testController, optionsController);
 }
 public GenerateReportCommand(ITestController testController, IReportController reportController)
 {
     this.testController = testController;
     this.reportController = reportController;
 }
 public void SetUp()
 {
     testController = MockRepository.GenerateStub<ITestController>();
     sourceCodeController = new SourceCodeController(testController);
 }
Esempio n. 38
0
 public RunBuilder(ITestController testController)
 {
     _testController = testController;
 }
Esempio n. 39
0
 /// <summary>
 /// Runs through the B2C acquire token flow with Facebook Provider
 /// and Edit Policy authority
 /// </summary>
 public void B2CFacebookEditPolicyAcquireTokenInteractiveTestHelper(ITestController controller)
 {
     PerformB2CSignInEditProfileFlow(controller);
 }
        public void Extend(ITestController testController, object suite)
        {
            CreateFakes(testController, suite);

            SetupFakes(testController, suite);
        }
Esempio n. 41
0
 /// <summary>
 /// Runs through the B2C acquire token flow with Google Provider
 /// </summary>
 public void B2CGoogleAcquireTokenInteractiveTestHelper(ITestController controller, LabResponse labResponse, bool isB2CLoginAuthority)
 {
     PerformB2CSignInFlow(controller, labResponse.User, B2CIdentityProvider.Google, isB2CLoginAuthority);
 }
Esempio n. 42
0
 public virtual void ConfigureTestController(ITestController testController)
 {
     _testExtensions.ForEach(x => x.Extend(testController, _suite));
 }
Esempio n. 43
0
        /// <summary>
        /// Runs through the B2C acquire token silent flow with local account
        /// </summary>
        /// <param name="controller">The test framework that will execute the test interaction</param>
        public void B2CLocalAccountAcquireTokenSilentTest(ITestController controller, LabResponse labResponse, bool isB2CLoginAuthority)
        {
            B2CLocalAccountAcquireTokenInteractiveTestHelper(controller, labResponse, isB2CLoginAuthority);

            B2CSilentFlowHelper(controller);
        }
Esempio n. 44
0
 public LoadPackageCommand(ITestController testController,
                           IProjectController projectController)
 {
     this.testController    = testController;
     this.projectController = projectController;
 }
 public RefreshTestTreeCommand(ITestController testController)
 {
     this.testController = testController;
 }
Esempio n. 46
0
 public virtual void ConfigureTestController(ITestController testController)
 {
     _testExtensions.ForEach(x => x.Extend(testController, _suite));
 }
 public void SetAuthority(ITestController controller, string authority)
 {
     // Select authority
     controller.Tap(CoreUiTestConstants.AuthorityPickerId);
     controller.Tap(authority);
 }
Esempio n. 48
0
 public static TestContainer <TSubject, TResult, TVars, TSequence> Create <TSubject, TResult, TVars, TSequence> (
     ITestController <TSubject, TResult, TVars, TSequence> testController)
 {
     return(new TestContainer <TSubject, TResult, TVars, TSequence>(testController));
 }
Esempio n. 49
0
 public LoadPackageCommand(ITestController testController, 
     IProjectController projectController)
 {
     this.testController = testController;
     this.projectController = projectController;
 }