Added a comment giving some instructions on how to get internal method visible to this assembly

This commit is contained in:
Tracy Pearson
2022-09-01 09:59:39 -04:00
parent f19d390b78
commit 4bcfdb56b5

View File

@@ -70,6 +70,10 @@ namespace WpfViewModelFirst.Tests
Assert.IsType<Part2ViewModel>(main.CurrentViewModel); Assert.IsType<Part2ViewModel>(main.CurrentViewModel);
Assert.Single(main.Strings); Assert.Single(main.Strings);
} }
// This method requires the Part1Action method to be internal not private
// The MainWindowViewModel class also needs to have an attribute allowing
// this assembly to see the internals
// [assembly:System.Runtime.CompilerServices.InternalsVisibleTo("WpfViewModelFirst.Tests")]
[Fact] [Fact]
public async Task Part1ActionWillSetCurrentViewModel() public async Task Part1ActionWillSetCurrentViewModel()
{ {