public void DataTypeVisitor_Generic_Simple() { var v = new GenericVisitor(); Assert.IsNull(v.Visit(type: null)); foreach (var t in new[] { typeof(int), typeof(int[]), typeof(Func <int, int>), }) { var d = DataType.FromType(t); var r = v.Visit(d); Assert.AreEqual(t, r, t.ToString()); } var c = new MyDataType(); Assert.AreSame(c.UnderlyingType, v.Visit(c)); v.Test(); }