public void Constructor_IdentifiesStruct_NestedPublicAccessCorrectly()
 {
     var internalEnum = new TypeWrapper(typeof(PublicStruct).Assembly.DefinedTypes.Single(x => x.Name == "NestedPublicEnum"));
     var SUT = new EnumTypeData(internalEnum);
     Assert.That(SUT.AccessLevel == AccessLevelEnum.Public);
     Assert.That(SUT.Type == TypeEnum.Enum);
 }
        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);
        }
 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"));
 }
 public void Constructor_IdentifiesClass_PublicAccessCorrectly()
 {
     var SUT = new EnumTypeData(new TypeWrapper(typeof(PublicEnum)));
     Assert.That(SUT.AccessLevel == AccessLevelEnum.Public);
     Assert.That(SUT.Type == TypeEnum.Enum);
 }
 public void Constructor_IdentifiesClass_NestedPrivateAccessCorrectly()
 {
     var internalClass = new TypeWrapper(typeof(PublicStruct).Assembly.DefinedTypes.Single(x => x.Name == "NestedPrivateEnum"));
     var SUT = new EnumTypeData(internalClass);
     Assert.That(SUT.AccessLevel == AccessLevelEnum.Private);
 }