public void SetUp() { _mockServer = A.Fake <IMockServer>(); _mappingsProvider = A.Fake <IMappingsProvider>(); _mainWindowViewModel = new MainWindowViewModel(_mockServer, _mappingsProvider); ExecuteClearCommand(); }
public MainWindowViewModel(IMockServer mockServer, IMappingsProvider mappingsProvider) { _mockServer = mockServer; _mockServer.OnNewRequest += OnNewRequest; _mockServer.OnServerStatusChange += OnServerStatusChange; _mappingsProvider = mappingsProvider; _logger = new Logger <MainWindowViewModel>(new NLogLoggerFactory()); _textAreaWindowFactory = new TextAreaWindowFactory(); StartServerCommand = new RelayCommand(o => ExecuteStartServerCommand(), o => true, this); StopServerCommand = new RelayCommand(o => ExecuteStopServerCommand(), o => true, this); AddCommand = new RelayCommand(o => ExecuteAddCommand(), o => true, this); ApplyCommand = new RelayCommand(o => ExecuteApplyCommand(), o => true, this); ClearCommand = new RelayCommand(o => ExecuteClearCommand(), o => true, this); InitMappings(); _serverUrl = _mockServer.Url; _isServerStarted = true; }
public void SetUp() { MockServer = new WireMockWrapper(); }