public void TestAttributeSortingOptionHandling() { string testInput = MethodBase.GetCurrentMethod().Name + ".xaml"; var stylerOptions = new StylerOptions { AttributeOrderClass = "x:Class", AttributeOrderWpfNamespace = "xmlns, xmlns:x", AttributeOrderKey = "Key, x:Key", AttributeOrderName = "Name, x:Name, Title", AttributeOrderAttachedLayout = "Grid.Column, Grid.ColumnSpan, Grid.Row, Grid.RowSpan, Canvas.Right, Canvas.Bottom, Canvas.Left, Canvas.Top", AttributeOrderCoreLayout = "MinWidth, MinHeight, Width, Height, MaxWidth, MaxHeight, Margin", AttributeOrderAlignmentLayout = "Panel.ZIndex, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment", AttributeOrderOthers = "Offset, Color, TargetName, Property, Value, StartPoint, EndPoint, PageSource, PageIndex", AttributeOrderBlendRelated = "mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText" }; var styler = StylerService.CreateInstance(stylerOptions); DoTest(testInput, styler); }
public void TestxBindSplitting() { var stylerOptions = new StylerOptions { KeepxBindOnSameLine = true }; DoTest(stylerOptions); }
public void TestAttributeToleranceHandling() { var stylerOptions = new StylerOptions { AttributesTolerance = 3, RootElementLineBreakRule = LineBreakRule.Always, }; DoTest(stylerOptions); }
public void TestAttributeOrderRuleGroupsOnSeparateLinesHandling() { var stylerOptions = new StylerOptions { PutAttributeOrderRuleGroupsOnSeparateLines = true, MaxAttributesPerLine = 3, }; DoTest(stylerOptions); }
public void TestMarkupExtensionHandling() { string testInput = MethodBase.GetCurrentMethod().Name + ".xaml"; var stylerOptions = new StylerOptions { FormatMarkupExtension = true }; var styler = StylerService.CreateInstance(stylerOptions); DoTest(testInput, styler); }
public void TestAttributeThresholdHandling() { var stylerOptions = new StylerOptions { AttributesTolerance = 0, MaxAttributeCharatersPerLine = 80, MaxAttributesPerLine = 3, PutEndingBracketOnNewLine = true }; DoTest(stylerOptions); }
public void TestAttributeThresholdHandling() { string testInput = MethodBase.GetCurrentMethod().Name + ".xaml"; var stylerOptions = new StylerOptions { AttributesTolerance = 0, MaxAttributeCharatersPerLine = 80, MaxAttributesPerLine = 3, PutEndingBracketOnNewLine = true }; var styler = StylerService.CreateInstance(stylerOptions); DoTest(testInput, styler); }
private void DoTest(StylerOptions stylerOptions, [System.Runtime.CompilerServices.CallerMemberName] string callerMemberName = "") { // ReSharper disable once ExplicitCallerInfoArgument DoTest(StylerService.CreateInstance(stylerOptions), callerMemberName); }
public void TestReorderSetterByTargetNameThenPropertyHandling() { var stylerOptions = new StylerOptions { ReorderSetters = ReorderSettersBy.TargetNameThenProperty, }; DoTest(stylerOptions); }
public void TestMarkupExtensionHandling() { var stylerOptions = new StylerOptions { FormatMarkupExtension = true }; DoTest(stylerOptions); }
public void TestBindingSplitting() { var stylerOptions = new StylerOptions { KeepBindingsOnSameLine = true }; DoTest(stylerOptions); }
public void TestClosingElementHandling(int testNumber, bool spaceBeforeClosingSlash) { var stylerOptions = new StylerOptions { SpaceBeforeClosingSlash = spaceBeforeClosingSlash }; DoTest(stylerOptions, testNumber); }
public void TestReorderSetterHandling(int testNumber, ReorderSettersBy reorderSettersBy) { var stylerOptions = new StylerOptions { ReorderSetters = reorderSettersBy, }; DoTest(stylerOptions, testNumber); }
public void TestMarkupWithAttributeNotOnFirstLine() { var stylerOptions = new StylerOptions { KeepFirstAttributeOnSameLine = false, AttributesTolerance = 1 }; DoTest(stylerOptions); }