Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
0
        public void FormatTuple1()
        {
            var tuple     = ValueTuple.Create("1");
            var formatted = LabelsHelper.ToArray(tuple);

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

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

            Assert.Equal(new string[0], formatted);
        }
Beispiel #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));
        }
Beispiel #7
0
        public void ThrowOnEnumLabelName1()
        {
            var labels = ValueTuple.Create(MetricType.Untyped);

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

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

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