public void GetFooterText_DefaultNoPath_Test() { var documentUtilityMock = new Mock <IDocumentUtility>(); var appSettingsMock = new Mock <IAppSettingsUtility>(); appSettingsMock.Setup(_ => _.CustomFooterText).Returns(""); appSettingsMock.Setup(_ => _.UseCustomFooterText).Returns(false); appSettingsMock.Setup(_ => _.DefaultFooterText).Returns("footer text"); appSettingsMock.Setup(_ => _.AppendFilePathToFooterText).Returns(false); var folderUtility = new FolderUtility(documentUtilityMock.Object, documentUtilityMock.Object, appSettingsMock.Object); var headerText = folderUtility.GetFooterText("c:\\folder"); Assert.Equal("footer text", headerText); }
public void GetFooterText_NullEmptyCustomWithOrWithoutPath_Test(string customFooterText, bool appendPath, string expected) { var documentUtilityMock = new Mock <IDocumentUtility>(); var appSettingsMock = new Mock <IAppSettingsUtility>(); appSettingsMock.Setup(_ => _.CustomFooterText).Returns(customFooterText); appSettingsMock.Setup(_ => _.UseCustomFooterText).Returns(true); appSettingsMock.Setup(_ => _.DefaultFooterText).Returns("footer text"); appSettingsMock.Setup(_ => _.AppendFilePathToFooterText).Returns(appendPath); var folderUtility = new FolderUtility(documentUtilityMock.Object, documentUtilityMock.Object, appSettingsMock.Object); var headerText = folderUtility.GetFooterText("c:\\folder"); Assert.Equal(expected, headerText); }