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());
        }
Esempio n. 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));
        }
Esempio n. 4
0
 public int IndexOf(IStepContent item)
 {
     return PluginTrackables.IndexOf(item);
 }
Esempio n. 5
0
 public void CopyTo(IStepContent[] array, int arrayIndex)
 {
     PluginTrackables.CopyTo(array, arrayIndex);
 }
Esempio n. 6
0
 public bool Contains(IStepContent item)
 {
     return PluginTrackables.Contains(item);
 }
Esempio n. 7
0
 public void Add(IStepContent item)
 {
     PluginTrackables.Add(item);
 }
Esempio n. 8
0
 public bool Remove(IStepContent item)
 {
     return PluginTrackables.Remove(item);
 }
Esempio n. 9
0
 public void Insert(int index, IStepContent item)
 {
     PluginTrackables.Insert(index, item);
 }