public void T5()
        {
            // Arrange
            var validator = new TradeDetailsValidator();
            var catcher   = Catcher.For(validator);

            // Act
            validator.LowHasError = true;

            // Assert
            catcher.CaughtPropertyChanged(validator, nameof(validator.LowHasError));
        }
예제 #2
0
        public void T12()
        {
            // Arrange
            var tradeManager = new TradeManager();
            var catcher      = Catcher.For(tradeManager);

            // Act
            tradeManager.FilterTrades(TestFilters);

            // Assert
            catcher.CaughtPropertyChanged(tradeManager, nameof(tradeManager.Trades));
        }
예제 #3
0
        public void T1()
        {
            // Arrange
            var validator = new TradeDetailsValidator();
            var catcher   = Catcher.For(validator);

            // Act
            validator.VerifyDates(new DateTime(2020, 11, 12, 20, 20, 00), new DateTime(2020, 11, 11, 12, 34, 00));

            // Assert
            catcher.CaughtPropertyChanged(validator, nameof(validator.DatesHaveError));
        }
예제 #4
0
        public void T1()
        {
            // Arrange
            var viewModel = new MainWindowViewModel(SubRunner, new TradeManager(), TestTradeDetailsViewModel, SubPlot);
            var catcher   = Catcher.For(viewModel);

            // Act
            viewModel.TradeManager.FilterTrades(TestFilters);

            // Assert
            catcher.CaughtPropertyChanged(viewModel, nameof(viewModel.Statistics));
        }
예제 #5
0
        public void T2()
        {
            // Arrange
            var day     = new Day(DayOfWeek.Friday);
            var catcher = Catcher.For(day);

            // Act
            day.IsSelected = false;

            // Assert
            catcher.CaughtPropertyChanged(day, nameof(day.IsSelected));
        }
예제 #6
0
        public void T3()
        {
            // Arrange
            var market  = new Market(string.Empty, AssetClass.Shares, PipDivisor.One);
            var catcher = Catcher.For(market);

            // Act
            market.IsSelected = true;

            // Assert
            catcher.CaughtPropertyChanged(market, nameof(market.IsSelected));
        }
예제 #7
0
        public void T1()
        {
            // Arrange
            var tradeManager = new TradeManager();
            var catcher      = Catcher.For(tradeManager);

            // Act
            tradeManager.ClearAll();

            // Assert
            catcher.CaughtPropertyChanged(tradeManager, nameof(tradeManager.Trades));
        }
예제 #8
0
        public void T2()
        {
            // Arrange
            var assetType = new AssetType(AssetClass.Indices);
            var catcher   = Catcher.For(assetType);

            // Act
            assetType.IsSelected = true;

            // Assert
            catcher.CaughtPropertyChanged(assetType, nameof(assetType.IsSelected));
        }
예제 #9
0
        public void T2()
        {
            // Arrange
            var strategy = new Strategy(string.Empty);
            var catcher  = Catcher.For(strategy);

            // Act
            strategy.IsSelected = false;

            // Assert
            catcher.CaughtPropertyChanged(strategy, nameof(strategy.IsSelected));
        }
예제 #10
0
        public void T1()
        {
            // Arrange
            var validator = new TradeDetailsValidator();

            validator.EntryHasError = true;
            var catcher = Catcher.For(validator);

            // Act
            validator.EntryHasError = false;

            // Assert
            catcher.CaughtPropertyChanged(validator, nameof(validator.IsTradeValid));
        }
예제 #11
0
        public void T1()
        {
            // Arrange
            var tradeManager = new TradeManager();

            tradeManager.SelectedTrade = TestOpenTrade;
            var catcher = Catcher.For(tradeManager);

            // Act
            tradeManager.RemoveTrade();

            // Assert
            catcher.CaughtPropertyChanged(tradeManager, nameof(tradeManager.Trades));
        }