diff --git a/Examples/ApiExamples/ApiExamples/ExBookmarks.cs b/Examples/ApiExamples/ApiExamples/ExBookmarks.cs index 51756478..a1f2df30 100644 --- a/Examples/ApiExamples/ApiExamples/ExBookmarks.cs +++ b/Examples/ApiExamples/ApiExamples/ExBookmarks.cs @@ -170,8 +170,8 @@ public void TableColumnBookmarks() Console.WriteLine($"Bookmark: {bookmark.Name}{(bookmark.IsColumn ? " (Column)" : "")}"); if (bookmark.IsColumn) { - if (bookmark.BookmarkStart.GetAncestor(NodeType.Row) is Row row && - bookmark.FirstColumn < row.Cells.Count) + Row row = bookmark.BookmarkStart.GetAncestor(NodeType.Row) as Row; + if (row != null && bookmark.FirstColumn < row.Cells.Count) { // Print the contents of the first and last columns enclosed by the bookmark. Console.WriteLine(row.Cells[bookmark.FirstColumn].GetText().TrimEnd(ControlChar.CellChar)); diff --git a/Examples/ApiExamples/ApiExamples/ExCharts.cs b/Examples/ApiExamples/ApiExamples/ExCharts.cs index 39039473..19c98bbd 100644 --- a/Examples/ApiExamples/ApiExamples/ExCharts.cs +++ b/Examples/ApiExamples/ApiExamples/ExCharts.cs @@ -1622,7 +1622,7 @@ public void DataArraysWrongSize(double[] seriesValue, Type exception = null) seriesColl.Clear(); string[] categories = { "Word", null, "Excel", "GoogleDocs", "Note", null }; - if (exception is null) + if (exception == null) seriesColl.Add("AW Series", categories, seriesValue); else Assert.Throws(exception, () => seriesColl.Add("AW Series", categories, seriesValue)); diff --git a/Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs b/Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs index 0a7f257d..2fe2b3fa 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocumentBuilder.cs @@ -2670,6 +2670,7 @@ public FieldResultFormatter(string numberFormat, string dateFormat, string gener mNumberFormat = numberFormat; mDateFormat = dateFormat; mGeneralFormat = generalFormat; + FormatInvocations = new List(); } public string FormatNumeric(double value, string format) @@ -2730,9 +2731,9 @@ public void PrintFormatInvocations() private readonly string mNumberFormat; private readonly string mDateFormat; - private readonly string mGeneralFormat; - private List FormatInvocations { get; } = new List(); - + private readonly string mGeneralFormat; + private List FormatInvocations { get; } + private class FormatInvocation { public FormatInvocationType FormatInvocationType { get; } diff --git a/Examples/ApiExamples/ApiExamples/ExFont.cs b/Examples/ApiExamples/ApiExamples/ExFont.cs index 72373808..beb6f08f 100644 --- a/Examples/ApiExamples/ApiExamples/ExFont.cs +++ b/Examples/ApiExamples/ApiExamples/ExFont.cs @@ -1289,42 +1289,69 @@ private void TestRemoveHiddenContent(Document doc) foreach (Node node in doc.GetChildNodes(NodeType.Any, true)) { - switch (node) + FieldStart fieldStart = node as FieldStart; + if (fieldStart != null) { - case FieldStart fieldStart: - Assert.False(fieldStart.Font.Hidden); - break; - case FieldEnd fieldEnd: - Assert.False(fieldEnd.Font.Hidden); - break; - case FieldSeparator fieldSeparator: - Assert.False(fieldSeparator.Font.Hidden); - break; - case Run run: - Assert.False(run.Font.Hidden); - break; - case Paragraph paragraph: - Assert.False(paragraph.ParagraphBreakFont.Hidden); - break; - case FormField formField: - Assert.False(formField.Font.Hidden); - break; - case GroupShape groupShape: - Assert.False(groupShape.Font.Hidden); - break; - case Shape shape: - Assert.False(shape.Font.Hidden); - break; - case Comment comment: - Assert.False(comment.Font.Hidden); - break; - case Footnote footnote: - Assert.False(footnote.Font.Hidden); - break; - case SpecialChar specialChar: - Assert.False(specialChar.Font.Hidden); - break; + Assert.False(fieldStart.Font.Hidden); + continue; + } + FieldEnd fieldEnd = node as FieldEnd; + if (fieldEnd != null) + { + Assert.False(fieldEnd.Font.Hidden); + continue; + } + FieldSeparator fieldSeparator = node as FieldSeparator; + if (fieldSeparator != null) + { + Assert.False(fieldSeparator.Font.Hidden); + continue; + } + Run run = node as Run; + if (run != null) + { + Assert.False(run.Font.Hidden); + continue; + } + Paragraph paragraph = node as Paragraph; + if (paragraph != null) + { + Assert.False(paragraph.ParagraphBreakFont.Hidden); + continue; + } + FormField formField = node as FormField; + if (formField != null) + { + Assert.False(formField.Font.Hidden); + continue; + } + GroupShape groupShape = node as GroupShape; + if (groupShape != null) + { + Assert.False(groupShape.Font.Hidden); + continue; + } + Shape shape = node as Shape; + if (shape != null) + { + Assert.False(shape.Font.Hidden); + continue; + } + Comment comment = node as Comment; + if (comment != null) + { + Assert.False(comment.Font.Hidden); + continue; + } + Footnote footnote = node as Footnote; + if (footnote != null) + { + Assert.False(footnote.Font.Hidden); + continue; } + SpecialChar specialChar = node as SpecialChar; + if (specialChar != null) + Assert.False(specialChar.Font.Hidden); } } diff --git a/Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs b/Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs index e570d7b2..c117ccca 100644 --- a/Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs +++ b/Examples/ApiExamples/ApiExamples/ExHeaderFooter.cs @@ -292,7 +292,10 @@ public ReplaceAction Replacing(ReplacingArgs args) return ReplaceAction.Skip; } - internal string Text => mTextBuilder.ToString(); + internal string Text + { + get { return mTextBuilder.ToString(); } + } private readonly StringBuilder mTextBuilder = new StringBuilder(); } diff --git a/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs index f92fca42..ba49bfd7 100644 --- a/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExHtmlSaveOptions.cs @@ -1744,11 +1744,13 @@ public void ScaleImageToShapeSize(bool scaleImageToShapeSize) var testedImageLength = new FileInfo(ArtifactsDir + "HtmlSaveOptions.ScaleImageToShapeSize.001.png").Length; if (scaleImageToShapeSize) + { #if NET461_OR_GREATER || JAVA Assert.IsTrue(testedImageLength < 3000); #elif NET5_0_OR_GREATER Assert.IsTrue(testedImageLength < 6000); #endif + } else Assert.IsTrue(testedImageLength < 16000); diff --git a/Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs index 3f507267..809ce1d8 100644 --- a/Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExPdfSaveOptions.cs @@ -2121,7 +2121,10 @@ public void Warning(WarningInfo info) mWarnings.Add(info); } - public WarningInfo this[int i] => mWarnings[i]; + public WarningInfo this[int i] + { + get { return mWarnings[i]; } + } /// /// Clears warning collection. @@ -2131,7 +2134,10 @@ public void Clear() mWarnings.Clear(); } - public int Count => mWarnings.Count; + public int Count + { + get { return mWarnings.Count; } + } /// /// Returns true if a warning with the specified properties has been generated. diff --git a/Examples/ApiExamples/ApiExamples/ExRange.cs b/Examples/ApiExamples/ApiExamples/ExRange.cs index 3b2f3422..0771b0d0 100644 --- a/Examples/ApiExamples/ApiExamples/ExRange.cs +++ b/Examples/ApiExamples/ApiExamples/ExRange.cs @@ -616,13 +616,18 @@ public void UseLegacyOrder(bool useLegacyOrder) /// private class TextReplacementTracker : IReplacingCallback { + public TextReplacementTracker() + { + Matches = new List(); + } + ReplaceAction IReplacingCallback.Replacing(ReplacingArgs e) { Matches.Add(e.Match.Value); return ReplaceAction.Replace; } - public List Matches { get; } = new List(); + public List Matches { get; } } //ExEnd @@ -794,13 +799,18 @@ public void Direction(FindReplaceDirection findReplaceDirection) /// private class TextReplacementRecorder : IReplacingCallback { + public TextReplacementRecorder() + { + Matches = new List(); + } + ReplaceAction IReplacingCallback.Replacing(ReplacingArgs e) { Matches.Add(e.Match.Value); return ReplaceAction.Replace; } - public List Matches { get; } = new List(); + public List Matches { get; } } //ExEnd } diff --git a/Examples/ApiExamples/ApiExamples/ExTableColumn.cs b/Examples/ApiExamples/ApiExamples/ExTableColumn.cs index ec3b63a1..6847eb84 100644 --- a/Examples/ApiExamples/ApiExamples/ExTableColumn.cs +++ b/Examples/ApiExamples/ApiExamples/ExTableColumn.cs @@ -25,7 +25,10 @@ public class Column { private Column(Table table, int columnIndex) { - mTable = table ?? throw new ArgumentException("table"); + if (table == null) + throw new ArgumentException("table"); + mTable = table; + mColumnIndex = columnIndex; } diff --git a/Examples/ApiExamples/ApiExamples/TestData/Common.cs b/Examples/ApiExamples/ApiExamples/TestData/Common.cs index 9bf460a7..fb2b9839 100644 --- a/Examples/ApiExamples/ApiExamples/TestData/Common.cs +++ b/Examples/ApiExamples/ApiExamples/TestData/Common.cs @@ -10,13 +10,13 @@ public static class Common { public static IEnumerable GetManagers() { - ManagerTestClass manager = new ManagerTestClass + ManagerTestClass manager1 = new ManagerTestClass { Name = "John Smith", Age = 36 }; - manager.Contracts = new[] + manager1.Contracts = new[] { new ContractTestClass { @@ -26,7 +26,7 @@ public static IEnumerable GetManagers() Country = "Australia", LocalAddress = "219-241 Cleveland St STRAWBERRY HILLS NSW 1427" }, - Manager = manager, + Manager = manager1, Price = 1200000, Date = new DateTime(2017, 1, 1) }, @@ -38,7 +38,7 @@ public static IEnumerable GetManagers() Country = "Brazil", LocalAddress = "Avenida João Jorge, 112, ap. 31 Vila Industrial Campinas - SP 13035-680" }, - Manager = manager, + Manager = manager1, Price = 750000, Date = new DateTime(2017, 4, 1) }, @@ -50,21 +50,19 @@ public static IEnumerable GetManagers() Country = "Canada", LocalAddress = "101-3485 RUE DE LA MONTAGNE MONTRÉAL (QUÉBEC) H3G 2A6" }, - Manager = manager, + Manager = manager1, Price = 350000, Date = new DateTime(2017, 7, 1) } }; - yield return manager; - - manager = new ManagerTestClass + ManagerTestClass manager2 = new ManagerTestClass { Name = "Tony Anderson", Age = 37 }; - manager.Contracts = new[] + manager2.Contracts = new[] { new ContractTestClass { @@ -73,7 +71,7 @@ public static IEnumerable GetManagers() Name = "E Corp.", LocalAddress = "445 Mount Eden Road Mount Eden Auckland 1024" }, - Manager = manager, + Manager = manager2, Price = 650000, Date = new DateTime(2017, 2, 1) }, @@ -84,21 +82,19 @@ public static IEnumerable GetManagers() Name = "F & Partners", LocalAddress = "20 Greens Road Tuahiwi Kaiapoi 7691 " }, - Manager = manager, + Manager = manager2, Price = 550000, Date = new DateTime(2017, 8, 1) } }; - yield return manager; - - manager = new ManagerTestClass + ManagerTestClass manager3 = new ManagerTestClass { Name = "July James", Age = 38 }; - manager.Contracts = new[] + manager3.Contracts = new[] { new ContractTestClass { @@ -108,7 +104,7 @@ public static IEnumerable GetManagers() Country = "Greece", LocalAddress = "Karkisias 6 GR-111 42 ATHINA GRÉCE" }, - Manager = manager, + Manager = manager3, Price = 350000, Date = new DateTime(2017, 2, 1) }, @@ -120,7 +116,7 @@ public static IEnumerable GetManagers() Country = "Hungary", LocalAddress = "Budapest Fiktív utca 82., IV. em./28.2806" }, - Manager = manager, + Manager = manager3, Price = 250000, Date = new DateTime(2017, 5, 1) }, @@ -131,7 +127,7 @@ public static IEnumerable GetManagers() Name = "I & Sons", LocalAddress = "43 Vogel Street Roslyn Palmerston North 4414" }, - Manager = manager, + Manager = manager3, Price = 100000, Date = new DateTime(2017, 7, 1) }, @@ -143,13 +139,13 @@ public static IEnumerable GetManagers() Country = "Japan", LocalAddress = "Hakusan 4-Chōme 3-2 Bunkyō-ku, TŌKYŌ 112-0001 Japan" }, - Manager = manager, + Manager = manager3, Price = 100000, Date = new DateTime(2017, 8, 1) } }; - yield return manager; + return new ManagerTestClass[]{manager1, manager2, manager3}; } public static IEnumerable GetEmptyManagers() @@ -159,20 +155,24 @@ public static IEnumerable GetEmptyManagers() public static IEnumerable GetClients() { + IList clients = new List(); foreach (ManagerTestClass manager in GetManagers()) { foreach (ContractTestClass contract in manager.Contracts) - yield return contract.Client; + clients.Add(contract.Client); } + return clients; } public static IEnumerable GetContracts() { + IList contracts = new List(); foreach (ManagerTestClass manager in GetManagers()) { foreach (ContractTestClass contract in manager.Contracts) - yield return contract; + contracts.Add(contract); } + return contracts; } public static ShareTestClass[] GetShares() diff --git a/Examples/ApiExamples/ApiExamples/TestUtil.cs b/Examples/ApiExamples/ApiExamples/TestUtil.cs index f435228a..bd3f2790 100644 --- a/Examples/ApiExamples/ApiExamples/TestUtil.cs +++ b/Examples/ApiExamples/ApiExamples/TestUtil.cs @@ -41,11 +41,8 @@ internal static void VerifyImage(int expectedWidth, int expectedHeight, string f { using (Image image = Image.FromFile(filename)) { - Assert.Multiple(() => - { - Assert.AreEqual(expectedWidth, image.Width, 1); - Assert.AreEqual(expectedHeight, image.Height, 1); - }); + Assert.AreEqual(expectedWidth, image.Width, 1); + Assert.AreEqual(expectedHeight, image.Height, 1); } } @@ -156,18 +153,21 @@ internal static void MailMergeMatchesQueryResult(string dbFilename, string sqlQu string[] row = new string[reader.FieldCount]; for (int i = 0; i < reader.FieldCount; i++) - switch (reader[i]) + { + if (reader[i] is decimal) + { + decimal d = (decimal)reader[i]; + row[i] = d.ToString("G29"); + continue; + } + if (reader[i] is string) { - case decimal d: - row[i] = d.ToString("G29"); - break; - case string s: - row[i] = s.Trim().Replace("\n", string.Empty); - break; - default: - row[i] = string.Empty; - break; + string s = (string)reader[i]; + row[i] = s.Trim().Replace("\n", string.Empty); + continue; } + row[i] = string.Empty; + } expectedStrings.Add(row); } @@ -324,12 +324,9 @@ private static void StreamContainsString(string expected, Stream stream) /// The field that's being tested. internal static void VerifyField(FieldType expectedType, string expectedFieldCode, string expectedResult, Field field) { - Assert.Multiple(() => - { - Assert.AreEqual(expectedType, field.Type); - Assert.AreEqual(expectedFieldCode, field.GetFieldCode(true)); - Assert.AreEqual(expectedResult, field.Result); - }); + Assert.AreEqual(expectedType, field.Type); + Assert.AreEqual(expectedFieldCode, field.GetFieldCode(true)); + Assert.AreEqual(expectedResult, field.Result); } /// @@ -346,25 +343,22 @@ internal static void VerifyField(FieldType expectedType, string expectedFieldCod /// Margin of error for expectedResult. internal static void VerifyField(FieldType expectedType, string expectedFieldCode, DateTime expectedResult, Field field, TimeSpan delta) { - Assert.Multiple(() => + Assert.AreEqual(expectedType, field.Type); + Assert.AreEqual(expectedFieldCode, field.GetFieldCode(true)); + DateTime actual = DateTime.Now; + try { - Assert.AreEqual(expectedType, field.Type); - Assert.AreEqual(expectedFieldCode, field.GetFieldCode(true)); - DateTime actual = DateTime.Now; - try - { - actual = DateTime.Parse(field.Result); - } - catch (Exception) - { - Assert.Fail(); - } + actual = DateTime.Parse(field.Result); + } + catch (Exception) + { + Assert.Fail(); + } - if (field.Type == FieldType.FieldTime) - VerifyDate(expectedResult, actual, delta); - else - VerifyDate(expectedResult.Date, actual, delta); - }); + if (field.Type == FieldType.FieldTime) + VerifyDate(expectedResult, actual, delta); + else + VerifyDate(expectedResult.Date, actual, delta); } /// @@ -410,13 +404,10 @@ internal static void FieldsAreNested(Field innerField, Field outerField) /// Shape that contains the image. internal static void VerifyImageInShape(int expectedWidth, int expectedHeight, ImageType expectedImageType, Shape imageShape) { - Assert.Multiple(() => - { - Assert.True(imageShape.HasImage); - Assert.AreEqual(expectedImageType, imageShape.ImageData.ImageType); - Assert.AreEqual(expectedWidth, imageShape.ImageData.ImageSize.WidthPixels); - Assert.AreEqual(expectedHeight, imageShape.ImageData.ImageSize.HeightPixels); - }); + Assert.True(imageShape.HasImage); + Assert.AreEqual(expectedImageType, imageShape.ImageData.ImageType); + Assert.AreEqual(expectedWidth, imageShape.ImageData.ImageSize.WidthPixels); + Assert.AreEqual(expectedHeight, imageShape.ImageData.ImageSize.HeightPixels); } /// @@ -429,13 +420,10 @@ internal static void VerifyImageInShape(int expectedWidth, int expectedHeight, I /// Footnote node in question. internal static void VerifyFootnote(FootnoteType expectedFootnoteType, bool expectedIsAuto, string expectedReferenceMark, string expectedContents, Footnote footnote) { - Assert.Multiple(() => - { - Assert.AreEqual(expectedFootnoteType, footnote.FootnoteType); - Assert.AreEqual(expectedIsAuto, footnote.IsAuto); - Assert.AreEqual(expectedReferenceMark, footnote.ReferenceMark); - Assert.AreEqual(expectedContents, footnote.ToString(SaveFormat.Text).Trim()); - }); + Assert.AreEqual(expectedFootnoteType, footnote.FootnoteType); + Assert.AreEqual(expectedIsAuto, footnote.IsAuto); + Assert.AreEqual(expectedReferenceMark, footnote.ReferenceMark); + Assert.AreEqual(expectedContents, footnote.ToString(SaveFormat.Text).Trim()); } /// @@ -450,12 +438,9 @@ internal static void VerifyFootnote(FootnoteType expectedFootnoteType, bool expe /// List level in question. internal static void VerifyListLevel(string expectedListFormat, double expectedNumberPosition, NumberStyle expectedNumberStyle, ListLevel listLevel) { - Assert.Multiple(() => - { - Assert.AreEqual(expectedListFormat, listLevel.NumberFormat); - Assert.AreEqual(expectedNumberPosition, listLevel.NumberPosition); - Assert.AreEqual(expectedNumberStyle, listLevel.NumberStyle); - }); + Assert.AreEqual(expectedListFormat, listLevel.NumberFormat); + Assert.AreEqual(expectedNumberPosition, listLevel.NumberPosition); + Assert.AreEqual(expectedNumberStyle, listLevel.NumberStyle); } /// @@ -509,13 +494,10 @@ public static string DumpArray(byte[] data, int start, int count) /// Tab stop that's being tested. internal static void VerifyTabStop(double expectedPosition, TabAlignment expectedTabAlignment, TabLeader expectedTabLeader, bool isClear, TabStop tabStop) { - Assert.Multiple(() => - { - Assert.AreEqual(expectedPosition, tabStop.Position); - Assert.AreEqual(expectedTabAlignment, tabStop.Alignment); - Assert.AreEqual(expectedTabLeader, tabStop.Leader); - Assert.AreEqual(isClear, tabStop.IsClear); - }); + Assert.AreEqual(expectedPosition, tabStop.Position); + Assert.AreEqual(expectedTabAlignment, tabStop.Alignment); + Assert.AreEqual(expectedTabLeader, tabStop.Leader); + Assert.AreEqual(isClear, tabStop.IsClear); } /// @@ -526,15 +508,12 @@ internal static void VerifyTabStop(double expectedPosition, TabAlignment expecte /// internal static void VerifyShape(ShapeType expectedShapeType, string expectedName, double expectedWidth, double expectedHeight, double expectedTop, double expectedLeft, Shape shape) { - Assert.Multiple(() => - { - Assert.AreEqual(expectedShapeType, shape.ShapeType); - Assert.AreEqual(expectedName, shape.Name); - Assert.AreEqual(expectedWidth, shape.Width); - Assert.AreEqual(expectedHeight, shape.Height); - Assert.AreEqual(expectedTop, shape.Top); - Assert.AreEqual(expectedLeft, shape.Left); - }); + Assert.AreEqual(expectedShapeType, shape.ShapeType); + Assert.AreEqual(expectedName, shape.Name); + Assert.AreEqual(expectedWidth, shape.Width); + Assert.AreEqual(expectedHeight, shape.Height); + Assert.AreEqual(expectedTop, shape.Top); + Assert.AreEqual(expectedLeft, shape.Left); } /// @@ -545,16 +524,13 @@ internal static void VerifyShape(ShapeType expectedShapeType, string expectedNam /// internal static void VerifyTextBox(LayoutFlow expectedLayoutFlow, bool expectedFitShapeToText, TextBoxWrapMode expectedTextBoxWrapMode, double marginTop, double marginBottom, double marginLeft, double marginRight, TextBox textBox) { - Assert.Multiple(() => - { - Assert.AreEqual(expectedLayoutFlow, textBox.LayoutFlow); - Assert.AreEqual(expectedFitShapeToText, textBox.FitShapeToText); - Assert.AreEqual(expectedTextBoxWrapMode, textBox.TextBoxWrapMode); - Assert.AreEqual(marginTop, textBox.InternalMarginTop); - Assert.AreEqual(marginBottom, textBox.InternalMarginBottom); - Assert.AreEqual(marginLeft, textBox.InternalMarginLeft); - Assert.AreEqual(marginRight, textBox.InternalMarginRight); - }); + Assert.AreEqual(expectedLayoutFlow, textBox.LayoutFlow); + Assert.AreEqual(expectedFitShapeToText, textBox.FitShapeToText); + Assert.AreEqual(expectedTextBoxWrapMode, textBox.TextBoxWrapMode); + Assert.AreEqual(marginTop, textBox.InternalMarginTop); + Assert.AreEqual(marginBottom, textBox.InternalMarginBottom); + Assert.AreEqual(marginLeft, textBox.InternalMarginLeft); + Assert.AreEqual(marginRight, textBox.InternalMarginRight); } /// @@ -562,12 +538,9 @@ internal static void VerifyTextBox(LayoutFlow expectedLayoutFlow, bool expectedF /// internal static void VerifyEditableRange(int expectedId, string expectedEditorUser, EditorType expectedEditorGroup, EditableRange editableRange) { - Assert.Multiple(() => - { - Assert.AreEqual(expectedId, editableRange.Id); - Assert.AreEqual(expectedEditorUser, editableRange.SingleUser); - Assert.AreEqual(expectedEditorGroup, editableRange.EditorGroup); - }); + Assert.AreEqual(expectedId, editableRange.Id); + Assert.AreEqual(expectedEditorUser, editableRange.SingleUser); + Assert.AreEqual(expectedEditorGroup, editableRange.EditorGroup); } ///