public void T5() { // Arrange var directions = SelectableFactory.GetEnumList <TradeDirection>(); var viewModel = new TradeFiltererViewModel(); // Act var actual = viewModel.TradeDirections; // Assert Assert.True(AreEnumCollectionsEqual(directions, actual)); }
public void T3() { // Arrange var days = SelectableFactory.GetDays(); var viewModel = new TradeFiltererViewModel(); // Act var actual = viewModel.DaysOfWeek; // Assert Assert.True(AreSelectableCollectionsEqual(days, actual)); }
public void T4() { // Arrange var statuses = SelectableFactory.GetEnumList <TradeStatus>(); var viewModel = new TradeFiltererViewModel(); // Act var actual = viewModel.TradeStatuses; // Assert Assert.True(AreEnumCollectionsEqual(statuses, actual)); }
public void T2() { // Arrange var assetTypes = SelectableFactory.GetAssetTypes(); var viewModel = new TradeFiltererViewModel(); // Act var actual = viewModel.AssetTypes; // Assert Assert.True(AreSelectableCollectionsEqual(assetTypes, actual)); }
public void T8() { // Arrange var viewModel = new TradeFiltererViewModel(); viewModel.SelectedTradeStatus = TradeStatus.Open; // Act viewModel.ClearFiltersCommand.Execute(null !); // Assert Assert.Equal(TradeStatus.Both, viewModel.SelectedTradeStatus); }
public void T10() { // Arrange var viewModel = new TradeFiltererViewModel(); viewModel.SelectedTradeDirection = TradeDirection.Short; // Act var actual = viewModel.GetFilters(); // Assert Assert.Equal(TradeDirection.Short, actual.Direction); }
public void T11() { // Arrange var viewModel = new TradeFiltererViewModel(); viewModel.SelectedTradeStatus = TradeStatus.Open; // Act var actual = viewModel.GetFilters(); // Assert Assert.Equal(TradeStatus.Open, actual.Status); }
public void T9() { // Arrange var viewModel = new TradeFiltererViewModel(); viewModel.SelectedTradeDirection = TradeDirection.Long; // Act viewModel.ClearFiltersCommand.Execute(null !); // Assert Assert.Equal(TradeDirection.Both, viewModel.SelectedTradeDirection); }
public void T2() { // Arrange var viewModel = new TradeFiltererViewModel(); viewModel.Strategies[0].IsSelected = false; viewModel.Strategies[1].IsSelected = false; // Act viewModel.ClearFiltersCommand.Execute(null !); // Assert Assert.True(IsAllSelected(viewModel.Strategies)); }
public void T7() { // Arrange var viewModel = new TradeFiltererViewModel(); var testTime = new DateTime(2011, 11, 11, 12, 34, 56); viewModel.FilterEndTime = testTime; // Act var actual = viewModel.GetFilters(); // Assert Assert.Equal(testTime, actual.EndTime); }
public void T9() { // Arrange var viewModel = new TradeFiltererViewModel(); const double testRrr = 3.4; viewModel.MaxRiskRewardRatio = testRrr; // Act var actual = viewModel.GetFilters(); // Assert Assert.Equal(testRrr, actual.MaxRiskRewardRatio); }
public void T4() { // Arrange var viewModel = new TradeFiltererViewModel(); var testDate = new DateTime(2011, 11, 11); viewModel.FilterStartDate = testDate; // Act var actual = viewModel.GetFilters(); // Assert Assert.Equal(testDate, actual.StartDate); }
public void T4() { // Arrange var viewModel = new TradeFiltererViewModel(); viewModel.DaysOfWeek[3].IsSelected = false; viewModel.DaysOfWeek[6].IsSelected = false; // Act viewModel.ClearFiltersCommand.Execute(null !); // Assert Assert.True(IsAllSelected(viewModel.DaysOfWeek)); }
public void T3() { // Arrange var viewModel = new TradeFiltererViewModel(); viewModel.AssetTypes[3].IsSelected = false; viewModel.AssetTypes[4].IsSelected = false; // Act viewModel.ClearFiltersCommand.Execute(null !); // Assert Assert.True(IsAllSelected(viewModel.AssetTypes)); }
public void T0() { // Arrange var viewModel = new TradeFiltererViewModel(); var startDate = new DateTime(2021, 1, 1); var endDate = new DateTime(2021, 1, 22); // Act viewModel.UpdateDates((startDate, endDate)); // Assert Assert.Equal(startDate, viewModel.TradesStartDate); Assert.Equal(startDate, viewModel.FilterStartDate); Assert.Equal(endDate, viewModel.TradesEndDate); Assert.Equal(endDate, viewModel.FilterEndDate); }
public void T5() { // Arrange var viewModel = new TradeFiltererViewModel(); var startDate = new DateTime(2021, 1, 1); var endDate = new DateTime(2021, 1, 22); viewModel.TradesStartDate = startDate; viewModel.TradesEndDate = endDate; // Act viewModel.ClearFiltersCommand.Execute(null !); // Assert Assert.Equal(startDate, viewModel.FilterStartDate); Assert.Equal(endDate, viewModel.FilterEndDate); }
public void T6() { // Arrange var viewModel = new TradeFiltererViewModel(); var startTime = viewModel.FilterStartTime; var endTime = viewModel.FilterEndTime; viewModel.FilterStartTime = new DateTime(2021, 1, 1, 11, 11, 00); viewModel.FilterEndTime = new DateTime(2021, 1, 1, 11, 16, 00); // Act viewModel.ClearFiltersCommand.Execute(null !); // Assert Assert.Equal(startTime, viewModel.FilterStartTime); Assert.Equal(endTime, viewModel.FilterEndTime); }
public void T7() { // Arrange var viewModel = new TradeFiltererViewModel(); var min = viewModel.MinRiskRewardRatio; var max = viewModel.MaxRiskRewardRatio; viewModel.MinRiskRewardRatio = 5.00; viewModel.MaxRiskRewardRatio = 15.00; // Act viewModel.ClearFiltersCommand.Execute(null !); // Assert Assert.Equal(min, viewModel.MinRiskRewardRatio); Assert.Equal(max, viewModel.MaxRiskRewardRatio); }
public void T3() { // Arrange var viewModel = new TradeFiltererViewModel(); var expected = viewModel.DaysOfWeek[0].Name; for (var i = 1; i < viewModel.DaysOfWeek.Count; i++) { viewModel.DaysOfWeek[i].IsSelected = false; } // Act var actual = viewModel.GetFilters(); // Assert Assert.Single(actual.Days); Assert.Equal(expected, actual.Days[0].Name); }