-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor SimpleContainer tests and improve code quality #959
base: master
Are you sure you want to change the base?
Refactor SimpleContainer tests and improve code quality #959
Conversation
Refactored SimpleContainerTests.cs into multiple files for better modularity and readability. Updated SimpleContainer.cs for performance and readability improvements. Added new test files for various aspects of SimpleContainer functionality. Created new service files to support tests. These changes enhance the structure, readability, and maintainability of the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 26 changed files in this pull request and generated no comments.
Files not reviewed (15)
- src/Caliburn.Micro.Core.Tests/Services/EnumerableDependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/EnumerableDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Dependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Component.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/TestService.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Dependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SecondDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SingleIntConstructor.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IDependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/NonInterfaceDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IEnumerableDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SingleNonEmptyConstructorType.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/TestServiceWithDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/ITestService.cs: Evaluated as low risk
Comments suppressed due to low confidence (9)
src/Caliburn.Micro.Core.Tests/SimpleContainerCheckingForHandler.cs:9
- [nitpick] The method name 'HasHandler_returns_false_when_handler_does_not_exist' uses underscores to separate words. For consistency, consider using camelCase or PascalCase for method names.
public void HasHandler_returns_false_when_handler_does_not_exist()
src/Caliburn.Micro.Core.Tests/SimpleContainerCheckingForHandler.cs:16
- [nitpick] The method name 'HasHandler_returns_true_when_handler_exists' uses underscores to separate words. For consistency, consider using camelCase or PascalCase for method names.
public void HasHandler_returns_true_when_handler_exists()
src/Caliburn.Micro.Core.Tests/SimpleContainerCheckingForHandler.cs:26
- [nitpick] The method name 'GetInstance_ShouldReturnNullIfNoHandler' uses PascalCase and underscores. For consistency, consider using camelCase or PascalCase without underscores for method names.
public void GetInstance_ShouldReturnNullIfNoHandler()
src/Caliburn.Micro.Core.Tests/SimpleContainerCheckingForHandler.cs:36
- [nitpick] The method name 'HasHandler_ShouldReturnTrueIfHandlerExists' uses PascalCase and underscores. For consistency, consider using camelCase or PascalCase without underscores for method names.
public void HasHandler_ShouldReturnTrueIfHandlerExists()
src/Caliburn.Micro.Core.Tests/SimpleContainerCheckingForHandler.cs:49
- [nitpick] The method name 'HasHandler_ShouldReturnFalseIfHandlerDoesNotExist' uses PascalCase and underscores. For consistency, consider using camelCase or PascalCase without underscores for method names.
public void HasHandler_ShouldReturnFalseIfHandlerDoesNotExist()
src/Caliburn.Micro.Core.Tests/SimpleContainerCreatingAChildContainer.cs:7
- [nitpick] The method name 'Singleton_instances_are_the_same_across_parent_and_child' is verbose and not in camel case. Consider renaming it to 'SingletonInstancesAreTheSameAcrossParentAndChild'.
[Fact]
public void Singleton_instances_are_the_same_across_parent_and_child()
src/Caliburn.Micro.Core.Tests/SimpleContainerCreatingAChildContainer.cs:20
- [nitpick] The method name 'The_child_container_returned_contains_parent_entries' is verbose and not in camel case. Consider renaming it to 'ChildContainerContainsParentEntries'.
[Fact]
public void The_child_container_returned_contains_parent_entries()
src/Caliburn.Micro.Core.Tests/SimpleContainerCreatingAChildContainer.cs:30
- [nitpick] The method name 'The_child_container_returned_is_not_the_same_instance_as_its_parent' is verbose and not in camel case. Consider renaming it to 'ChildContainerIsNotSameInstanceAsParent'.
[Fact]
public void The_child_container_returned_is_not_the_same_instance_as_its_parent()
Renamed test methods in SimpleContainerCheckingForHandler.cs to follow a consistent naming convention. Removed underscores and converted names to camel case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 26 changed files in this pull request and generated 1 comment.
Files not reviewed (15)
- src/Caliburn.Micro.Core.Tests/Services/EnumerableDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/EnumerableDependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Dependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Dependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Component.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SingleIntConstructor.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SecondDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/TestServiceWithDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IDependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IEnumerableDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/TestService.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SingleNonEmptyConstructorType.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/NonInterfaceDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SingleEmptyConstructorType.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/Caliburn.Micro.Core.Tests/SimpleContainerCreatingAChildContainer.cs:21
- [nitpick] The method name 'The_child_container_returned_contains_parent_entries' is inconsistent with the naming convention used in other test methods. It should be 'ChildContainerContainsParentEntries'.
public void The_child_container_returned_contains_parent_entries()
src/Caliburn.Micro.Core.Tests/SimpleContainerCheckingForHandler.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 26 changed files in this pull request and generated no comments.
Files not reviewed (15)
- src/Caliburn.Micro.Core.Tests/Services/Component.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Dependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Dependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/EnumerableDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/EnumerableDependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IComponent.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IDependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/SimpleContainerCreatingAChildContainer.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/SimpleContainerCheckingForHandler.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/TwoConstructors.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/TestServiceWithDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/TestService.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SecondDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/NonInterfaceDependency.cs: Evaluated as low risk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 13 out of 28 changed files in this pull request and generated no comments.
Files not reviewed (15)
- src/Caliburn.Micro.Core.Tests/Services/IEnumerableDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SingleIntConstructor.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SingleEmptyConstructorType.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/SecondDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/NonInterfaceDependency.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/ITestService.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/IDependency2.cs: Evaluated as low risk
- .github/dependabot.yml: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/EnumerableDependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Component.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/EnumerableDependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Dependency2.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/Dependency1.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/Services/TestService.cs: Evaluated as low risk
Refactored SimpleContainerTests.cs into multiple files for better modularity and readability. Updated SimpleContainer.cs for performance and readability improvements. Added new test files for various aspects of SimpleContainer functionality. Created new service files to support tests. These changes enhance the structure, readability, and maintainability of the codebase.
Prevent caliburn.micro.platform.core from creating a nuget package
Update dependabot.yml to look at src directory
Closes #958