public void TestOnVisible_FromNextStepSkipsToChoiceStep()
        {
            IStepContent <IPublishDialogStep> nextStepContent = null;

            _publishDialogMock.Setup(pd => pd.NavigateToStep(It.IsAny <IStepContent <IPublishDialogStep> >()))
            .Callback <IStepContent <IPublishDialogStep> >(stepContent => nextStepContent = stepContent);
            _objectUnderTest.ActionCommand.Execute(null);

            _objectUnderTest.OnVisible(nextStepContent.ViewModel);

            _publishDialogMock.Verify(pd => pd.PopStep());
        }
Пример #2
0
        public void TestPreviousCommand_UpdatesContent()
        {
            IStepContent <IPublishDialogStep> initalContent = _objectUnderTest.Content;

            _objectUnderTest.NavigateToStep(_stepContentMock.Object);
            _changedProperties.Clear();

            _objectUnderTest.PrevCommand.Execute(null);

            Assert.AreEqual(initalContent, _objectUnderTest.Content);
            CollectionAssert.Contains(_changedProperties, nameof(_objectUnderTest.Content));
        }
        public void TestOnVisible_FromGceStepDeletesChoiceProperty()
        {
            IStepContent <IPublishDialogStep> nextStepContent = null;

            _publishDialogMock.Setup(pd => pd.NavigateToStep(It.IsAny <IStepContent <IPublishDialogStep> >()))
            .Callback <IStepContent <IPublishDialogStep> >(stepContent => nextStepContent = stepContent);
            _objectUnderTest.ActionCommand.Execute(null);

            _objectUnderTest.OnVisible(nextStepContent.ViewModel);

            _propertyServiceMock.Verify(
                ps => ps.DeleteUserProperty(_dteProject, ChoiceStepViewModel.GoogleCloudPublishChoicePropertyName));
        }
Пример #4
0
 public int IndexOf(IStepContent item)
 {
     return PluginTrackables.IndexOf(item);
 }
Пример #5
0
 public void CopyTo(IStepContent[] array, int arrayIndex)
 {
     PluginTrackables.CopyTo(array, arrayIndex);
 }
Пример #6
0
 public bool Contains(IStepContent item)
 {
     return PluginTrackables.Contains(item);
 }
Пример #7
0
 public void Add(IStepContent item)
 {
     PluginTrackables.Add(item);
 }
Пример #8
0
 public bool Remove(IStepContent item)
 {
     return PluginTrackables.Remove(item);
 }
Пример #9
0
 public void Insert(int index, IStepContent item)
 {
     PluginTrackables.Insert(index, item);
 }