public void CorrectInitializationAndNonNull() { AssertInit(Names.General("x"), typeof(GeneralName)); AssertInit(Names.Alias("x"), typeof(AliasName)); AssertInit(Names.Event("x"), typeof(EventName)); AssertInit(Names.Field("x"), typeof(FieldName)); AssertInit(Names.Lambda("x"), typeof(LambdaName)); AssertInit(Names.LocalVariable("x"), typeof(LocalVariableName)); AssertInit(Names.Method("[?] [?].M()"), typeof(MethodName)); AssertInit(Names.Parameter("[?] p"), typeof(ParameterName)); AssertInit(Names.Property("get [?] [?].P()"), typeof(PropertyName)); AssertInit(Names.CommandBarControl("x"), typeof(CommandBarControlName)); AssertInit(Names.Command("x"), typeof(CommandName)); AssertInit(Names.Document("x y"), typeof(DocumentName)); AssertInit(Names.ProjectItem("x y"), typeof(ProjectItemName)); AssertInit(Names.Project("x y"), typeof(ProjectName)); AssertInit(Names.Solution("x"), typeof(SolutionName)); AssertInit(Names.Window("x y"), typeof(WindowName)); AssertInit(Names.ReSharperLiveTemplate("x:y"), typeof(ReSharperLiveTemplateName)); AssertInit(Names.Assembly("x"), typeof(AssemblyName)); AssertInit(Names.AssemblyVersion("1.2.3.4"), typeof(AssemblyVersion)); AssertInit(Names.Namespace("x"), typeof(NamespaceName)); AssertInit(Names.Type("T,P"), typeof(TypeName)); AssertInit(Names.Type("T"), typeof(TypeParameterName)); AssertInit(Names.Type("T[],P"), typeof(ArrayTypeName)); AssertInit(Names.Type("d:[?] [?].()"), typeof(DelegateTypeName)); AssertInit(Names.Type("p:int"), typeof(PredefinedTypeName)); }
public void ShouldSerializeAssemblyVersion() { var name = Names.AssemblyVersion("1.3.3.7"); JsonAssert.SerializationPreservesReferenceIdentity(name); }