Exemple #1
0
 public void Defensive()
 {
     Assert.Equal(GoNamespaceExtensions.GetNamespaceImportSymbol((CodeNamespace)null), string.Empty);
     Assert.Equal(GoNamespaceExtensions.GetLastNamespaceSegment((string)null), string.Empty);
     Assert.Equal(GoNamespaceExtensions.GetInternalNamespaceImport((CodeNamespace)null), string.Empty);
 }
Exemple #2
0
        public void GetNamespaceImportSymbol()
        {
            var root = CodeNamespace.InitRootNamespace();
            var main = root.AddNamespace("github.com/something");

            Assert.Equal("i749ccebf37b522f21de9a46471b0aeb8823a49292ca8740fc820cf9bd340c846", GoNamespaceExtensions.GetNamespaceImportSymbol(main));
        }