public void ParseParameterTypeOpt_should_handle_assembly_name(string text) { var s = new SignatureParser(text); s.MoveNext(); var t = s.ParseParameterTypeOpt(); Assert.NotNull(t.Assembly); Assert.Equal("mscorlib", t.Assembly.Name); }
public void ParseParameterTypeOpt_should_handle_generics(string text) { var s = new SignatureParser(text); s.MoveNext(); var data = s.ParseParameterTypeOpt(); Assert.NotNull(data); Assert.Equal(TypeName.Parse(text), data); }
public void ParseParameterTypeOpt_should_handle_arrays(string text, int dimensions) { var s = new SignatureParser(text); s.MoveNext(); var data = s.ParseParameterTypeOpt(); Assert.NotNull(data); Assert.True(data.IsArray); Assert.Equal(dimensions, ((ArrayTypeName)data).Dimensions.Count); }
public void ParseParameterTypeOpt_should_handle_nested(string text) { var s = new SignatureParser(text); s.MoveNext(); var data = s.ParseParameterTypeOpt(); Assert.NotNull(data); Assert.Equal("N.T+U", data.FullName); Assert.Equal("N", data.Namespace); Assert.Equal("U", data.Name); Assert.Equal("T", data.DeclaringType.Name); }