Ejemplo n.º 1
0
        public void TestValueFieldsBuiltIn()
        {
            var builder = new RichPresenceBuilder();

            builder.DisableBuiltInMacros = false;
            builder.AddValueField(null, "Val", ValueFormat.Value);
            builder.AddValueField(null, "Score", ValueFormat.Score);
            builder.DisplayString = "@Val(0xH1234) @Score(0xH2345)";

            Assert.That(builder.ToString().Replace("\r\n", "\n"), Is.EqualTo(
                            "Format:Val\n" +
                            "FormatType=VALUE\n" +
                            "\n" +
                            "Display:\n" +
                            "@Val(0xH1234) @Score(0xH2345)\n"
                            ));
        }
Ejemplo n.º 2
0
        public void TestValueFields()
        {
            // explicitly initialize out of order
            var builder = new RichPresenceBuilder();

            builder.DisableBuiltInMacros = true;
            builder.AddValueField(null, "Val", ValueFormat.Value);
            builder.AddValueField(null, "Score", ValueFormat.Score);
            builder.DisplayString = "@Val(0xH1234) @Score(0xH2345)";

            Assert.That(builder.ToString().Replace("\r\n", "\n"), Is.EqualTo(
                            "Format:Val\n" +
                            "FormatType=VALUE\n" +
                            "\n" +
                            "Format:Score\n" +
                            "FormatType=SCORE\n" +
                            "\n" +
                            "Display:\n" +
                            "@Val(0xH1234) @Score(0xH2345)\n"
                            ));
        }