public void LoadCategory() { var ds = new dummyScreen(); var t = new OpenURLControlViewModel(ds); object newPage = null; ds.Router.Navigate.Subscribe(o => newPage = o); t.MeetingAddress = "https://indico.cern.ch/export/categ/1l12.ics?from=-7d"; t.SwitchPages.Execute(null); Assert.IsNotNull(newPage); Assert.IsInstanceOfType(newPage, typeof(CategoryPageViewModel)); }
public void LoadNormalMeeting() { var ds = new dummyScreen(); var t = new OpenURLControlViewModel(ds); object newPage = null; ds.Router.Navigate.Subscribe(o => newPage = o); t.MeetingAddress = "https://indico.cern.ch/event/377091/"; t.SwitchPages.Execute(null); Assert.IsNotNull(newPage); Assert.IsInstanceOfType(newPage, typeof(MeetingPageViewModel)); }