Exemple #1
0
        public void ValueNull()
        {
            var expression    = Utils.CreateEmptyExpression();
            var serialization = Utils.GetSerialization(expression);
            var listItem      = new ArrayItemEntity(expression, 1000, null);
            var result        = listItem.ToString();

            Assert.Equal("[1000]", result);
        }
Exemple #2
0
        public void Multidimensional()
        {
            var expression    = Utils.CreateEmptyExpression();
            var serialization = Utils.GetSerialization(expression);
            var listItem      = new ArrayItemEntity(expression, new int[] { 10, 10, 10 }, "value");
            var result        = listItem.ToString();

            Assert.Equal("[10,10,10]: value", result);
        }
Exemple #3
0
        public void Normal()
        {
            var expression    = Utils.CreateEmptyExpression();
            var serialization = Utils.GetSerialization(expression);
            var listItem      = new ArrayItemEntity(expression, 0, "value");
            var result        = listItem.ToString();

            Assert.Equal("[0]: value", result);
        }
Exemple #4
0
        public void ComplexValue()
        {
            var expression    = Utils.CreateEmptyExpression();
            var serialization = Utils.GetSerialization(expression);
            var value         = new ComplexItem();
            var listItem      = new ArrayItemEntity(expression, 0, value);
            var result        = listItem.ToString();

            Assert.Equal($"[0].{value.GetHashCode()}", result);
        }
Exemple #5
0
        public void ShowTypeOnlyName()
        {
            var expression    = Utils.CreateEmptyExpression();
            var serialization = Utils.GetSerialization(expression);

            serialization.ShowType = ShowTypeOptions.TypeName;
            var listItem = new ArrayItemEntity(expression, 1000, 100);
            var result   = listItem.ToString();

            Assert.Equal("Int32.[1000]: 100", result);
        }