public void Can_Remove_all() { ActivityType type1 = new ActivityType { ActivityTypeId = Guid.NewGuid(), ActivityTypeTitle = "Один" }; ActivityType type2 = new ActivityType { ActivityTypeId = Guid.NewGuid(), ActivityTypeTitle = "Два" }; // Организация - создание нескольких тестовых игр Activity act1 = new Activity { ActivityId = Guid.NewGuid(), ActivityName = "Игра1", ActivityTypeCurrent = type1 }; Activity act2 = new Activity { ActivityId = Guid.NewGuid(), ActivityName = "Игра2", ActivityTypeCurrent = type1 }; // Организация - создание корзины SubList SubList = new SubList(); // Действие SubList.SubActivity(act1); SubList.SubActivity(act2); SubList.Clear(); List <Activity> results = SubList.Line.ToList(); // Утверждение Assert.AreEqual(results.Count(), SubList.ComputeTotalSubs()); }
private async Task CallListLoad() { SubList.Clear(); // Android "Amimations can only be run on looper threads" when the _isForegroundAwait/notThreaded parameter is true // Or it just hangs // await FakeStringService.LoadOneList(SubList, _listNum, _isForegroundAwait, (returnList) => await FakeStringService.LoadOneList(SubList, _listNum, false, (returnList) => { SubList = returnList; PopulationCompleted?.Invoke(); }).WithoutChangingContext(); }