Skip to content

Conversation

@ymh199478
Copy link
Contributor

@ymh199478 ymh199478 commented Jan 16, 2020

When the Inject tag is incorrectly used or the constructor is incorrectly declared, a clear prompt message will be given

Create CatLib.Tests.Fixture.Quux faild, service name is quux.
This issue may be caused because your constructor is not public.

While building stack [quux].
InnerException message stack: [System.MissingMethodException: No parameterless constructor defined for type 'CatLib.Tests.Fixture.Quux'.
   at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type)
   at CatLib.Container.Container.CreateInstance(Type makeServiceType, Object[] userParams) in D:\Private\CatLib.Core\src\CatLib.Core\Container\Container.cs:line 1665
   at CatLib.Container.Container.CreateInstance(Bindable makeServiceBindData, Type makeServiceType, Object[] userParams) in D:\Private\CatLib.Core\src\CatLib.Core\Container\Container.cs:line 1648]

The addition of this mechanism detected a test case writing error : )

@ymh199478
Copy link
Contributor Author

resolved #254

@codecov-io
Copy link

codecov-io commented Jan 16, 2020

Codecov Report

Merging #284 into 2.1 will increase coverage by <.01%.
The diff coverage is 95.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##              2.1     #284      +/-   ##
==========================================
+ Coverage   89.11%   89.12%   +<.01%     
==========================================
  Files          34       34              
  Lines        2371     2382      +11     
==========================================
+ Hits         2113     2123      +10     
- Misses        258      259       +1
Impacted Files Coverage Δ
src/CatLib.Core/Container/Container.cs 95.97% <95.83%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ebbbb18...225befa. Read the comment docs.

@ymh199478 ymh199478 merged commit 14c3cff into 2.1 Jan 19, 2020
@ymh199478 ymh199478 deleted the enhanced-debug-info branch January 19, 2020 02:51
@ymh199478 ymh199478 modified the milestone: 2.1 Jan 19, 2020
ymh199478 added a commit that referenced this pull request Sep 10, 2020
* code optimization. (#271)

* Changed event system api. (#273)

* code optimization.

* event system api changed.

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Fixed incorrect comment content. (#274)

* Cleaned up the code and adjusted the directory file (#275)

* Cleaned up the code and adjusted the directory file
structure.

* event namespace changed.

* clean unless file.

* change log update. (#276)

* Update CHANGELOG.md

* Update CHANGELOG.md

* IApplication can get event dispatcher. (#277)

* Accord with design guidelines. (#278)

* rename Dispatch to Raise
* accord with design guidelines.

* Upgrade 3rd library (#279)

* upgrade 3rd & clean code.

* restore flag

* add 2.0 version

* upgrade framework

* ci update

* CI bug fixed.

* Implement test method return matched value. (#280)

* implement test method return matched value.
* CHANGELOG update`

* Create bucket.json

* Update bucket.json

* Update bucket.json

* Update README.md

* Update README.md

* Release 2.0 (#282)

* Update bucket.json

* Adjusting the structure of distributed files to best practices.

* Enhanced debug information for create instance and inject property. (#284)

* Enhanced debug information for create instance and inject property.
* remove debug code.

* Enhance ExpectedExceptionAndMessageAttribute to support asterisk wildcard. (#287)

* Add github action configuration. (#288)

* Add github action configuration.
* add github action badge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants