public void TestConstructor_SetsTitle() { const string expectedName = "ExpectedName"; _objectUnderTest = new CoreGceWarningStepViewModel(Mock.Of <IPublishDialog>(pd => pd.Project.Name == expectedName)); StringAssert.Contains(_objectUnderTest.Title, expectedName); }
public void BeforeEach() { _dteProject = Mock.Of <Project>(); _publishDialogMock = new Mock <IPublishDialog>(); _publishDialogMock.Setup(pd => pd.Project.Name).Returns(VisualStudioProjectName); _publishDialogMock.Setup(pd => pd.Project.ProjectType).Returns(KnownProjectTypes.NetCoreWebApplication); _publishDialogMock.Setup(pd => pd.Project.Project).Returns(_dteProject); _propertyServiceMock = new Mock <IVsProjectPropertyService>(); _browserServiceMock = new Mock <IBrowserService>(); PackageMock.Setup(p => p.GetMefService <IVsProjectPropertyService>()).Returns(_propertyServiceMock.Object); PackageMock.Setup(p => p.GetMefServiceLazy <IBrowserService>()).Returns(_browserServiceMock.ToLazy()); _objectUnderTest = new CoreGceWarningStepViewModel(_publishDialogMock.Object); }
public void TestConstructor_SetsPublishCaption() { _objectUnderTest = new CoreGceWarningStepViewModel(_publishDialogMock.Object); Assert.AreEqual(Resources.PublishDialogNextButtonCaption, _objectUnderTest.ActionCaption); }