示例#1
0
        public void FormatTuple8()
        {
            var tuple     = ("1", "2", "3", "4", "5", "6", "7", "8");
            var formatted = LabelsHelper.ToArray(tuple);

            Assert.Equal(new[] { "1", "2", "3", "4", "5", "6", "7", "8" }, formatted);
        }
示例#2
0
        public void FormatTuple16()
        {
            var tuple     = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16");
            var formatted = LabelsHelper.ToArray(tuple);

            Assert.Equal(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16" }, formatted);
        }
示例#3
0
        public void FormatTuple1()
        {
            var tuple     = ValueTuple.Create("1");
            var formatted = LabelsHelper.ToArray(tuple);

            Assert.Equal(new[] { "1" }, formatted);
        }
示例#4
0
        public void FormatTuple2()
        {
            var tuple     = ("1", "2");
            var formatted = LabelsHelper.ToArray(tuple);

            Assert.Equal(new[] { "1", "2" }, formatted);
        }
示例#5
0
        public void FormatTuple0()
        {
            var tuple     = ValueTuple.Create();
            var formatted = LabelsHelper.ToArray(tuple);

            Assert.Equal(new string[0], formatted);
        }
示例#6
0
        public void ThrowOnEnumLabelName16()
        {
            var labels = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", MetricType.Untyped);

            Assert.Throws <NotSupportedException>(() => LabelsHelper.ToArray(labels));
        }
示例#7
0
        public void ThrowOnEnumLabelName1()
        {
            var labels = ValueTuple.Create(MetricType.Untyped);

            Assert.Throws <NotSupportedException>(() => LabelsHelper.ToArray(labels));
        }
示例#8
0
        public void ThrowOnIntLabelName8()
        {
            var labels = ("1", "2", "3", "4", "5", "6", "7", 8);

            Assert.Throws <NotSupportedException>(() => LabelsHelper.ToArray(labels));
        }
示例#9
0
        public void ThrowOnIntLabelName1()
        {
            var labels = ValueTuple.Create(1);

            Assert.Throws <NotSupportedException>(() => LabelsHelper.ToArray(labels));
        }