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); }
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); }
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); }
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); }
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); }