public MappingInfoViewModel(IEditResponseWindowFactory textAreaWindowFactory) { _textAreaWindowFactory = textAreaWindowFactory; EditResponseCommand = new RelayCommand(o => ExecuteEditResponse(), o => true, this); DeleteMappingCommand = new RelayCommand(o => ExecuteDeleteMapping(), o => true, this); ResponseHeaders = new Dictionary <string, string>(); }
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() { _editResponseWindowFactory = A.Fake <IEditResponseWindowFactory>(); _mappingInfoViewModel = new MappingInfoViewModel(_editResponseWindowFactory); }
public void SetUp() { _textAreaWindowFactory = new TextAreaWindowFactory(); }