예제 #1
0
        public TestRunnerTest()
        {
            var config = Substitute.For <ConfigManager>();

            this.agent   = Substitute.For <PhantomAgent>(config);
            this.factory = Substitute.For <PhantomFactory>(config);
            this.factory.Create().Returns(this.agent);
            this.testRunner = new TestRunner(this.factory);
        }
예제 #2
0
        public MainWindowViewModel(IDialogService dialogService, PhantomRunner phantomRunner, PhantomFactory phantomFactory)
        {
            _dialogService  = dialogService;
            _phantomRunner  = phantomRunner;
            _phantomFactory = phantomFactory;

            _connections = new ObservableCollection <PhantomInfo>();

            TryAddConnectionCommand = new RelayCmd(TryAddConnection, OnException);
        }
예제 #3
0
        public void ShouldCreatePhantomAgent()
        {
            // arrange
            var config  = Substitute.For <ConfigManager>();
            var factory = new PhantomFactory(config);

            // act
            var result = factory.Create();

            // assert
            result.Should().NotBeNull();
        }
예제 #4
0
 public TestRunner(PhantomFactory agentFactory)
 {
     this.agentFactory = agentFactory;
 }