public void ErrorStatus_HorizontalMarginsTooBig() { m_div.NumColumns = 2; m_dlg = new DummyTePageSetupDlg(m_pgl, m_pub, m_div, false, m_pubPageInfo); m_dlg.PubSizeComboIndex = kFullPage; m_dlg.IsAllowNonStandardChecked = true; // Set paper size to A5 which is too small to fit a Large Bible m_dlg.PaperSizeName = m_dlg.GetPaperSize("A4").PaperName; // Set left and right margins too big // Left and Right margins are set to half the height plus 1/2" m_dlg.MarginLeft = (m_dlg.GetPaperSize("A4").Width *DummyTePageSetupDlg.kCentiInchToMilliPoints) / 2; m_dlg.MarginRight = (m_dlg.GetPaperSize("A4").Width *DummyTePageSetupDlg.kCentiInchToMilliPoints) / 2; Assert.AreEqual(PageSetupErrorType.HorizontalMarginsTooBig, m_dlg.CallValidateDialogSettings()); m_dlg.MarginLeft = (m_dlg.GetPaperSize("A4").Width *DummyTePageSetupDlg.kCentiInchToMilliPoints); m_dlg.MarginRight = DummyTePageSetupDlg.kCentiInchToMilliPoints; Assert.AreEqual(PageSetupErrorType.HorizontalMarginsTooBig, m_dlg.CallValidateDialogSettings()); }
public void ErrorStatus_PubPageTooBig() { m_div.NumColumns = 2; m_dlg = new DummyTePageSetupDlg(m_pgl, m_pub, m_div, false, m_pubPageInfo); m_dlg.PubSizeComboIndex = kLargeBible; m_dlg.IsAllowNonStandardChecked = true; // Set paper size to A5 which is too small to fit a "Large" Bible m_dlg.PaperSizeName = m_dlg.GetPaperSize("A5").PaperName; Assert.AreEqual(PageSetupErrorType.PubPageTooBig, m_dlg.CallValidateDialogSettings()); }
public void ErrorStatus_VerticalMarginsTooBig() { m_div.NumColumns = 2; m_dlg = new DummyTePageSetupDlg(m_wsUser, m_pgl, m_pub, m_div, MsrSysType.Point, false, m_pubPageInfo); m_dlg.PubSizeComboIndex = kFullPage; m_dlg.IsAllowNonStandardChecked = true; // Set paper size to A5 which is too small to fit a Large Bible m_dlg.PaperSizeName = m_dlg.GetPaperSize("A4").PaperName; // Set left and right margins to legal size m_dlg.MarginLeft = 50 * DummyTePageSetupDlg.kCentiInchToMilliPoints; // 1/2 inch m_dlg.MarginRight = 50 * DummyTePageSetupDlg.kCentiInchToMilliPoints; // 1/2 inch Assert.AreEqual(PageSetupErrorType.NoError, m_dlg.CallValidateDialogSettings()); // Set top and bottom margins too big // Left and Right margins are set to half the height plus 1/2" m_dlg.MarginTop = (m_dlg.GetPaperSize("A4").Height *DummyTePageSetupDlg.kCentiInchToMilliPoints) / 2; m_dlg.MarginBottom = (m_dlg.GetPaperSize("A4").Height *DummyTePageSetupDlg.kCentiInchToMilliPoints) / 2; Assert.AreEqual(PageSetupErrorType.VerticalMarginsTooBig, m_dlg.CallValidateDialogSettings()); }
public void ErrorStatus_VerticalMarginsTooBig() { m_div.NumColumns = 2; m_dlg = new DummyTePageSetupDlg( m_pgl, m_pub, m_div, false, m_pubPageInfo); m_dlg.PubSizeComboIndex = kFullPage; m_dlg.IsAllowNonStandardChecked = true; // Set paper size to A5 which is too small to fit a Large Bible m_dlg.PaperSizeName = m_dlg.GetPaperSize("A4").PaperName; // Set left and right margins to legal size m_dlg.MarginLeft = 50 * DummyTePageSetupDlg.kCentiInchToMilliPoints; // 1/2 inch m_dlg.MarginRight = 50 * DummyTePageSetupDlg.kCentiInchToMilliPoints; // 1/2 inch Assert.AreEqual(PageSetupErrorType.NoError, m_dlg.CallValidateDialogSettings()); // Set top and bottom margins too big // Left and Right margins are set to half the height plus 1/2" m_dlg.MarginTop = (m_dlg.GetPaperSize("A4").Height * DummyTePageSetupDlg.kCentiInchToMilliPoints) / 2; m_dlg.MarginBottom = (m_dlg.GetPaperSize("A4").Height * DummyTePageSetupDlg.kCentiInchToMilliPoints) / 2; Assert.AreEqual(PageSetupErrorType.VerticalMarginsTooBig, m_dlg.CallValidateDialogSettings()); }
public void ErrorStatus_PubPageTooBig() { m_div.NumColumns = 2; m_dlg = new DummyTePageSetupDlg( m_pgl, m_pub, m_div, false, m_pubPageInfo); m_dlg.PubSizeComboIndex = kLargeBible; m_dlg.IsAllowNonStandardChecked = true; // Set paper size to A5 which is too small to fit a "Large" Bible m_dlg.PaperSizeName = m_dlg.GetPaperSize("A5").PaperName; Assert.AreEqual(PageSetupErrorType.PubPageTooBig, m_dlg.CallValidateDialogSettings()); }
public void ErrorStatus_HorizontalMarginsTooBig() { m_div.NumColumns = 2; m_dlg = new DummyTePageSetupDlg(m_wsUser, m_pgl, m_pub, m_div, MsrSysType.Point, false, m_pubPageInfo); m_dlg.PubSizeComboIndex = kFullPage; m_dlg.IsAllowNonStandardChecked = true; // Set paper size to A5 which is too small to fit a Large Bible m_dlg.PaperSizeName = m_dlg.GetPaperSize("A4").PaperName; // Set left and right margins too big // Left and Right margins are set to half the height plus 1/2" m_dlg.MarginLeft = (m_dlg.GetPaperSize("A4").Width * DummyTePageSetupDlg.kCentiInchToMilliPoints) / 2; m_dlg.MarginRight = (m_dlg.GetPaperSize("A4").Width * DummyTePageSetupDlg.kCentiInchToMilliPoints) / 2; Assert.AreEqual(PageSetupErrorType.HorizontalMarginsTooBig, m_dlg.CallValidateDialogSettings()); m_dlg.MarginLeft = (m_dlg.GetPaperSize("A4").Width * DummyTePageSetupDlg.kCentiInchToMilliPoints); m_dlg.MarginRight = DummyTePageSetupDlg.kCentiInchToMilliPoints; Assert.AreEqual(PageSetupErrorType.HorizontalMarginsTooBig, m_dlg.CallValidateDialogSettings()); }