public void Value_Null() { var expression = Utils.CreateEmptyExpression(); var serialization = Utils.GetSerialization(expression); var complex = new ComplexEntity(expression, null); var result = complex.ToString(); Assert.Equal("", result); }
public void Normal_ShowTypeOnlyRoot() { var expression = Utils.CreateEmptyExpression(); var serialization = Utils.GetSerialization(expression); var complex = new ComplexEntity(expression, this); var result = complex.ToString(); Assert.Equal($"{this.GetType().Name}.{this.GetHashCode()}", result); }
public void ShowTypeOnlyName() { var expression = Utils.CreateEmptyExpression(); var serialization = Utils.GetSerialization(expression); serialization.ShowType = ShowTypeOptions.TypeName; var complex = new ComplexEntity(expression, this); var result = complex.ToString(); Assert.Equal($"SerializationComplexEntityTest.{this.GetHashCode()}", result); }
public void NotShowTypeInRoot() { var expression = Utils.CreateEmptyExpression(); var serialization = Utils.GetSerialization(expression); serialization.ShowType = ShowTypeOptions.None; var complex = new ComplexEntity(expression, this); var result = complex.ToString(); Assert.Equal($"{this.GetHashCode()}", result); }