public static void MyClassInitialize(TestContext testContext) { mvm = new MainViewModel(); var qw = new QwestsViewModel(); all = new ucAllTasksViewModel(); // Сообщения Messenger.Default.Send <Pers>(mvm.Pers); Messenger.Default.Send <ObservableCollection <AbilitiModel> >(mvm.Pers.Abilitis); Messenger.Default.Send <ObservableCollection <Aim> >(mvm.Pers.Aims); Messenger.Default.Send <ObservableCollection <Sample.Model.Task> >(mvm.Pers.Tasks); Messenger.Default.Send <ObservableCollection <Characteristic> >(mvm.Pers.Characteristics); Messenger.Default.Send <Visibility>(Visibility.Collapsed); Messenger.Default.Send <Aim>( new Func <ObservableCollection <Aim>, Aim>( aims => aims.Where( n => n.IsDoneProperty == false && n.MinLevelProperty <= MainViewModel.GetLevel(MainViewModel.GetExp(aims))) .OrderBy(n => n.ExpProperty) .ThenBy(q => q.MinLevelProperty) .ThenBy(n => n.AimNameProperty) .FirstOrDefault()).Invoke(mvm.Pers.Aims)); Messenger.Default.Send <QwestsViewModel>(qw); }
public void AdNewTaskCommandTest() { allTasksViewModel = new ucAllTasksViewModel(); // Добавляем квест }