public void TestConstructor_SetsPublishCommand() { var objectUnderTest = new PublishDialogWindowViewModel(_mockedParsedProject, _mockedCloseWindowAction); Assert.AreEqual( ((ChoiceStepContent)objectUnderTest.Content).ViewModel.PublishCommand, objectUnderTest.PublishCommand); }
public void TestConstructor_NavigatesToPreviousChoice() { PackageMock.Setup( p => p.GetMefService <IVsProjectPropertyService>() .GetUserProperty(It.IsAny <Project>(), ChoiceStepViewModel.GoogleCloudPublishChoicePropertyName)) .Returns(ChoiceType.Gke.ToString); var objectUnderTest = new PublishDialogWindowViewModel(_mockedParsedProject, _mockedCloseWindowAction); Assert.IsInstanceOfType(objectUnderTest.Content, typeof(GkeStepContent)); }
protected override void BeforeEach() { _mockedCloseWindowAction = Mock.Of <Action>(); _mockedParsedProject = Mock.Of <IParsedDteProject>(p => p.Project == Mock.Of <Project>()); _changedProperties = new List <string>(); _propertyServiceMock = new Mock <IVsProjectPropertyService>(); PackageMock.Setup(p => p.GetMefService <IVsProjectPropertyService>()).Returns(_propertyServiceMock.Object); _objectUnderTest = new PublishDialogWindowViewModel(_mockedParsedProject, _mockedCloseWindowAction); _objectUnderTest.PropertyChanged += (sender, args) => _changedProperties.Add(args.PropertyName); _stepContentMock = new Mock <FrameworkElement>().As <IStepContent <IPublishDialogStep> >(); _stepContentMock.DefaultValueProvider = DefaultValueProvider.Mock; }
public void BeforeEach() { _stepContentMock = new Mock <IStepContent <IPublishDialogStep> > { DefaultValueProvider = DefaultValueProvider.Mock }; _mockedCloseWindowAction = Mock.Of <Action>(); _mockedParsedProject = Mock.Of <IParsedDteProject>(p => p.Project == Mock.Of <Project>()); _objectUnderTest = new PublishDialogWindowViewModel(_mockedParsedProject, _mockedCloseWindowAction); _changedProperties = new List <string>(); _objectUnderTest.PropertyChanged += (sender, args) => _changedProperties.Add(args.PropertyName); }
public void TestConstructor_SetsContent() { var objectUnderTest = new PublishDialogWindowViewModel(_mockedParsedProject, _mockedCloseWindowAction); Assert.IsInstanceOfType(objectUnderTest.Content, typeof(ChoiceStepContent)); }
public void TestConstructor_SetsPreviousCommand() { var objectUnderTest = new PublishDialogWindowViewModel(_mockedParsedProject, _mockedCloseWindowAction); Assert.IsFalse(objectUnderTest.PrevCommand.CanExecuteCommand); }
public void TestConstructor_SetsProject() { var objectUnderTest = new PublishDialogWindowViewModel(_mockedParsedProject, _mockedCloseWindowAction); Assert.AreEqual(_mockedParsedProject, objectUnderTest.Project); }