Ejemplo n.º 1
0
        public void Constructor_Parses_ClassStringInput()
        {
            var testType = new EnumTypeData(new TypeWrapper(typeof(PublicEnumWithAttributes)));
            var testString = testType.ToString();

            var SUT = new EnumTypeData(testString);

            Assert.NotNull(SUT);
            Assert.That(SUT.AccessLevel == AccessLevelEnum.Public);
            Assert.That(SUT.AttributeData.Count == testType.AttributeData.Count);
            Assert.That(SUT.AttributeData.Any(x => x.Name == typeof(TestAttributeAttribute).FullName));
            Assert.That(SUT.Type == testType.Type);
        }
Ejemplo n.º 2
0
 public void ToString_BuildsCorrectString_ForPublicEnum()
 {
     var SUT = new EnumTypeData(new TypeWrapper(typeof(PublicEnum)));
     var stringRepresentation = SUT.ToString();
     Assert.That(stringRepresentation.StartsWith("\tpublic enum Ntegrity.TestTargetAssembly.PublicEnum"));
 }