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")); }