Skip to content

Commit

Permalink
NR test: improve OpenSettingsView test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbe2277 committed Dec 19, 2023
1 parent 6c97b75 commit 610e8c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ public void OpenSettingsView()
{
StartApp();
var feed = Context.WaitForNotNull(Shell.View.GetCurrentViewOrNull<MockFeedView, FeedViewModel>);
Assert.Equal(FeedsController.FeedManager.Feeds.Single(), feed.ViewModel.Feed);
var feed1 = FeedsController.FeedManager.Feeds.Single();
Assert.Equal(feed1, feed.ViewModel.Feed);
Assert.Equal(feed1, Shell.ViewModel.SelectedFeed);
Assert.Null(Shell.ViewModel.SelectedFooterMenu);

Shell.ViewModel.SelectedFooterMenu = Shell.ViewModel.FooterMenu[1];
var settings = Shell.View.GetCurrentView<MockSettingsView, SettingsViewModel>();
Assert.NotNull(settings.View);
Assert.Null(Shell.ViewModel.SelectedFeed);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class MockDataService : IDataService

public Stream GetReadStream() => throw new NotImplementedException();

public T? Load<T>(Stream? dataStream = null) where T : class => throw new NotImplementedException();
public T? Load<T>(Stream? dataStream = null) where T : class => null;

public void Save(object data) => throw new NotImplementedException();
}

0 comments on commit 610e8c3

Please sign in to comment.