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())));
        }
Exemplo n.º 4
0
 public ShowReportCommand(ITestController testController, IReportController reportController, 
     IFileSystem fileSystem)
 {
     this.testController = testController;
     this.reportController = reportController;
     this.fileSystem = fileSystem;
     ReportFormat = string.Empty;
 }
Exemplo n.º 5
0
        public TestNode(ProjectFile projectFile, ITestController testController,
            ITestFileManager testFileManager)
        {
            this.projectFile = projectFile;
            this.testController = testController;
            this.testFileManager = testFileManager;

            DefaultCommand = new DelegateCommand(ExecuteDefaultCommand);
        }
Exemplo 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;
        }
Exemplo 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>();
 }
Exemplo 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;
 }
Exemplo 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;
        }
Exemplo 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);
            }
        }
Exemplo 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)));
        }
Exemplo n.º 14
0
        // 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>();
        }
Exemplo n.º 15
0
 public RemoveFileCommand(IProjectController projectController, ITestController testController)
 {
     this.projectController = projectController;
     this.testController = testController;
 }
 public RefreshTestTreeCommand(ITestController testController)
 {
     this.testController = testController;
 }
Exemplo n.º 17
0
 public DriveByAttackProxy(ITestController testController, ITrafficDataAccessor dataStore, string host = "127.0.0.1", int port = 9998)
     : this(testController, null, dataStore, host, port)
 {
 }
Exemplo n.º 18
0
 public SourceCodeController(ITestController testController)
 {
     this.testController = testController;
 }
Exemplo n.º 19
0
 private void SetB2CInputDataForEditProfileAuthority(ITestController controller)
 {
     controller.Tap(_settingsPageId);
     // Select Edit Profile for Authority
     SetAuthority(controller, CoreUiTestConstants.B2CEditProfileAuthority);
 }
Exemplo n.º 20
0
 private void SetB2CInputData(ITestController controller)
 {
     // Select login.microsoftonline.com for authority
     SetAuthority(controller, CoreUiTestConstants.MicrosoftOnlineAuthority);
 }
Exemplo n.º 21
0
 public RemoveFileCommand(IProjectController projectController, ITestController testController)
 {
     this.projectController = projectController;
     this.testController    = testController;
 }
Exemplo n.º 22
0
 public GenerateReportCommand(ITestController testController, IReportController reportController)
 {
     this.testController   = testController;
     this.reportController = reportController;
 }
Exemplo n.º 23
0
 public RunManager(ITestController testController, IRunBuilder runBuilder)
 {
     _testController = testController;
     _runBuilder     = runBuilder;
 }
Exemplo 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)
 {
 }
Exemplo 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);
 }
Exemplo n.º 27
0
 public SourceCodeController(ITestController testController)
 {
     this.testController = testController;
 }
 public SpecificSpecificationRunner(ITestController testController, Assembly assembly, IEnumerable <MemberInfo> members)
 {
     _testController = testController;
     _assembly       = assembly;
     _members        = members;
 }
Exemplo n.º 29
0
 public AssemblyRunner(ITestController testController, IEnumerable <Assembly> assemblies)
 {
     _testController = testController;
     _assemblies     = assemblies;
 }
Exemplo n.º 30
0
 private void SetB2CInputDataForB2CloginAuthority(ITestController controller)
 {
     // Select b2clogin.com for authority
     SetAuthority(controller, CoreUiTestConstants.B2CLoginAuthority);
 }
Exemplo n.º 31
0
 public void SetUp()
 {
     testController        = MockRepository.GenerateStub <ITestController>();
     optionsController     = MockRepository.GenerateStub <IOptionsController>();
     annotationsController = new AnnotationsController(testController, optionsController);
 }
Exemplo n.º 32
0
 private void SetB2CInputDataForROPC(ITestController controller)
 {
     controller.Tap(_settingsPageId);
     // Select ROPC for authority
     SetAuthority(controller, CoreUiTestConstants.ROPC);
 }
Exemplo n.º 33
0
 public ResetTestsCommand(ITestController testController)
 {
     this.testController = testController;
 }
Exemplo 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);
 }
Exemplo n.º 36
0
 public GenerateReportCommand(ITestController testController, IReportController reportController)
 {
     this.testController = testController;
     this.reportController = reportController;
 }
 public void SetUp()
 {
     testController = MockRepository.GenerateStub<ITestController>();
     sourceCodeController = new SourceCodeController(testController);
 }
Exemplo n.º 38
0
 public RunBuilder(ITestController testController)
 {
     _testController = testController;
 }
Exemplo 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);
 }
Exemplo n.º 40
0
        public void Extend(ITestController testController, object suite)
        {
            CreateFakes(testController, suite);

            SetupFakes(testController, suite);
        }
Exemplo 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);
 }
Exemplo n.º 42
0
 public virtual void ConfigureTestController(ITestController testController)
 {
     _testExtensions.ForEach(x => x.Extend(testController, _suite));
 }
Exemplo 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);
        }
Exemplo n.º 44
0
 public LoadPackageCommand(ITestController testController,
                           IProjectController projectController)
 {
     this.testController    = testController;
     this.projectController = projectController;
 }
 public RefreshTestTreeCommand(ITestController testController)
 {
     this.testController = testController;
 }
Exemplo 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);
 }
Exemplo 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));
 }
Exemplo n.º 49
0
 public LoadPackageCommand(ITestController testController, 
     IProjectController projectController)
 {
     this.testController = testController;
     this.projectController = projectController;
 }