Beispiel #1
0
 public void SetUp()
 {
     _mockServer          = A.Fake <IMockServer>();
     _mappingsProvider    = A.Fake <IMappingsProvider>();
     _mainWindowViewModel = new MainWindowViewModel(_mockServer, _mappingsProvider);
     ExecuteClearCommand();
 }
Beispiel #2
0
        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;
        }
Beispiel #3
0
 public void SetUp()
 {
     MockServer = new WireMockWrapper();
 }