示例#1
0
        public void PassingTypeStringReturnsFirstSegmentAndTrimsSpaces()
        {
            TypeNodeNameFormatter nameFormatter = new TypeNodeNameFormatter();

            string name = nameFormatter.CreateName("   a   , b, c, d");
            Assert.IsNotNull(name);
            Assert.AreEqual("a", name);
        }
示例#2
0
        public void PassingRegularStringReturnsRegularString()
        {
            TypeNodeNameFormatter nameFormatter = new TypeNodeNameFormatter();

            string name = nameFormatter.CreateName("Some arbitrary string");
            Assert.IsNotNull(name);
            Assert.AreEqual("Some arbitrary string", name);
        }
示例#3
0
        public void PassingTypeReturnsTypeName()
        {
            TypeNodeNameFormatter nameFormatter = new TypeNodeNameFormatter();

            string name = nameFormatter.CreateName(typeof(Exception).AssemblyQualifiedName);
            Assert.IsNotNull(name);
            Assert.AreEqual(typeof(Exception).Name, name);
        }