Exemple #1
0
    public static void CreateWithNoData()
    {
        var data  = new BooleanData();
        var style = new CSharpStyleVarWhenTypeIsApparentStyle(data);

        Assert.That(style.Data, Is.SameAs(data), nameof(style.Data));
        Assert.That(style.GetSetting(), Is.EqualTo(string.Empty), nameof(style.GetSetting));
    }
Exemple #2
0
    public static void CreateWithMoreTrueData()
    {
        var data  = new BooleanData(1u, 1u, 0u);
        var style = new CSharpStyleVarWhenTypeIsApparentStyle(data);

        Assert.That(style.Data, Is.SameAs(data), nameof(style.Data));
        Assert.That(style.GetSetting(), Is.EqualTo(
                        $"{CSharpStyleVarWhenTypeIsApparentStyle.Setting} = true:{style.Severity.GetDescription()}"), nameof(style.GetSetting));
    }