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); }
public MainWindowViewModel(IDialogService dialogService, PhantomRunner phantomRunner, PhantomFactory phantomFactory) { _dialogService = dialogService; _phantomRunner = phantomRunner; _phantomFactory = phantomFactory; _connections = new ObservableCollection <PhantomInfo>(); TryAddConnectionCommand = new RelayCmd(TryAddConnection, OnException); }
public void ShouldCreatePhantomAgent() { // arrange var config = Substitute.For <ConfigManager>(); var factory = new PhantomFactory(config); // act var result = factory.Create(); // assert result.Should().NotBeNull(); }
public TestRunner(PhantomFactory agentFactory) { this.agentFactory = agentFactory; }