Commits

roundcrisis committed 0cc2a79

wasnt saved

  • Participants
  • Parent commits e2f5436

Comments (0)

Files changed (3)

File src/CodeShapes/CodeShapes.csproj

     <Compile Include="Shapes\IClassShape.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Shapes\MethodShape.cs" />
-    <Compile Include="Shapes\PrivateMethodShape.cs" />
-    <Compile Include="Shapes\PublicMethodShape.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

File src/CodeShapes/Shapes/MethodShape.cs

 {
 	public class MethodShape : ClassShape
 	{
-		public MethodShape(MethodBase methodBase, string methodName, MethodVisibility methodVisibility)
+		public MethodShape(MethodBase methodBase, string methodName, Visibility visibility)
 			: base(methodName)
 		{
 			MethodBase = methodBase;
 
 		public MethodBase MethodBase { get; private set; }
 
-		public MethodVisibility MethodVisibility { get; private set; }
+		public Visibility Visibility { get; private set; }
 	}
 
-	public enum MethodVisibility
+	public enum Visibility
 	{
-		PublicMethod,
-		NonPublicMethod,
+		Public,
+		NonPublic,
 		ProtectedMethod,
 		InternalMethod
 	}

File src/CodeShapesTests/ClassAnalizerTests.cs

 		{
 			var classShapes = _classAnalyzer.Analyze<SampleClass>();
 
-			Assert.True(classShapes.Any(x => x.GetType().Equals(typeof(MethodShape)) && ((MethodShape)x).MethodVisibility == MethodVisibility.PublicMethod));
+			Assert.True(classShapes.Any(x => x.GetType().Equals(typeof(MethodShape)) && ((MethodShape)x).Visibility == Visibility.Public));
 		}
 
 		[Fact]
 		{
 			var classShapes = _classAnalyzer.Analyze<SampleClass>();
 
-			Assert.True(classShapes.Any(x => x.GetType().Equals(typeof(MethodShape)) && ((MethodShape)x).MethodVisibility == MethodVisibility.NonPublicMethod));
+			Assert.True(classShapes.Any(x => x.GetType().Equals(typeof(MethodShape)) && ((MethodShape)x).Visibility == Visibility.NonPublic));
 		}
 
 		[Fact]