protected override void BeforeEach() { _gPlusDataSourceMock = new Mock <IGPlusDataSource>(); _mockedResourceManagerDataSource = null; _mockedGPlusDataSource = null; DataSourceFactoryMock.Setup(f => f.CreateResourceManagerDataSource()) .Returns(() => _mockedResourceManagerDataSource); DataSourceFactoryMock.Setup(f => f.CreatePlusDataSource()).Returns(() => _mockedGPlusDataSource); _mockedSelectionUtils = Mock.Of <ISelectionUtils>(); _objectUnderTest = new CloudExplorerViewModel(_mockedSelectionUtils); _propertiesChanged = new SynchronizedCollection <string>(); _objectUnderTest.PropertyChanged += (sender, args) => _propertiesChanged.Add(args.PropertyName); }
public void BeforeEach() { _currentProjectSource = new TaskCompletionSource <Project>(); _userProjectViewModelMock = new Mock <IGcpUserProjectViewModel> { DefaultValueProvider = DefaultValueProvider.Mock }; _userProjectViewModelMock.Setup(up => up.CurrentProjectAsync) .Returns(new AsyncProperty <Project>(_currentProjectSource.Task)); PackageMock.Setup(p => p.GetMefService <IGcpUserProjectViewModel>()) .Returns(_userProjectViewModelMock.Object); _mockedSelectionUtils = Mock.Of <ISelectionUtils>(); _objectUnderTest = new CloudExplorerViewModel(_mockedSelectionUtils); }
/// <summary> /// Initializes a new instance of the <see cref="CloudExplorerToolWindowControl"/> class. /// </summary> public CloudExplorerToolWindowControl(ISelectionUtils selectionUtils) { InitializeComponent(); _selectionUtils = selectionUtils; }