/// <summary> /// Runs an asynchronous test and cleans up afterwards. /// </summary> /// <typeparam name="T">The type of the items in the sequence.</typeparam> /// <param name="observable">The asynchronous test.</param> /// <param name="presentationTest">The presentation test object.</param> public static void RunAsyncTest <T>(this IObservable <T> observable, PresentationTest presentationTest) { observable.Subscribe( _ => { presentationTest.TestPanel.Children.Clear(); presentationTest.EnqueueTestComplete(); }); }
public void AddTest(PresentationTest test) => _testDao.Add(new Test { Title = test.Title, QuestionsCount = test.QuestionsCount, Time = test.Time, Id = Guid.NewGuid().ToString() });
public void ChangeTest(PresentationTest test) => _testDao.Change(new Test { Title = test.Title, QuestionsCount = test.QuestionsCount, Time = test.Time, Id = test.Id });