public static void CreateWithMoreTypeCastsFalseData()
    {
        var data  = new ParenthesesSpaceData(1u, 0u, 0u, 0u, 0u, 1u, 0u);
        var style = new CSharpSpaceBetweenParenthesesStyle(data);

        Assert.That(style.Data, Is.SameAs(data), nameof(style.Data));
        Assert.That(style.GetSetting(), Is.EqualTo(string.Empty), nameof(style.GetSetting));
    }
 public override CSharpSpaceBetweenParenthesesStyle Add(CSharpSpaceBetweenParenthesesStyle style)
 {
     if (style is null)
     {
         throw new ArgumentNullException(nameof(style));
     }
     return(new CSharpSpaceBetweenParenthesesStyle(this.Data.Add(style.Data)));
 }
    public static void CreateWithMoreExpressionsTrueData()
    {
        var data  = new ParenthesesSpaceData(1u, 0u, 0u, 0u, 1u, 0u, 0u);
        var style = new CSharpSpaceBetweenParenthesesStyle(data);

        Assert.That(style.Data, Is.SameAs(data), nameof(style.Data));
        Assert.That(style.GetSetting(), Is.EqualTo(
                        $"{CSharpSpaceBetweenParenthesesStyle.Setting} = {CSharpSpaceBetweenParenthesesStyle.Expressions}"), nameof(style.GetSetting));
    }
    public static void Add()
    {
        var style1 = new CSharpSpaceBetweenParenthesesStyle(new ParenthesesSpaceData(21u, 1u, 2u, 3u, 4u, 5u, 6u));
        var style2 = new CSharpSpaceBetweenParenthesesStyle(new ParenthesesSpaceData(210u, 10u, 20u, 30u, 40u, 50u, 60u));
        var style3 = style1.Add(style2);

        var data = style3.Data;

        Assert.That(data.TotalOccurences, Is.EqualTo(231u), nameof(data.TotalOccurences));
        Assert.That(data.ControlFlowNoSpaceOccurences, Is.EqualTo(11u), nameof(data.ControlFlowNoSpaceOccurences));
        Assert.That(data.ControlFlowSpaceOccurences, Is.EqualTo(22u), nameof(data.ControlFlowSpaceOccurences));
        Assert.That(data.ExpressionsNoSpaceOccurences, Is.EqualTo(33u), nameof(data.ExpressionsNoSpaceOccurences));
        Assert.That(data.ExpressionsSpaceOccurences, Is.EqualTo(44u), nameof(data.ExpressionsSpaceOccurences));
        Assert.That(data.TypeCastsNoSpaceOccurences, Is.EqualTo(55u), nameof(data.TypeCastsNoSpaceOccurences));
        Assert.That(data.TypeCastsSpaceOccurences, Is.EqualTo(66u), nameof(data.TypeCastsSpaceOccurences));
    }
    public static void AddWithNull()
    {
        var style = new CSharpSpaceBetweenParenthesesStyle(new ParenthesesSpaceData());

        Assert.That(() => style.Add(null !), Throws.TypeOf <ArgumentNullException>());
    }