Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

No verification exception on validation when Singelton depends on PerLifetime scope #166

Closed
i4004 opened this issue Jul 10, 2019 · 1 comment
Assignees
Labels

Comments

@i4004
Copy link
Owner

i4004 commented Jul 10, 2019

		[Test]
		public void Verify_LifetimeScopeMismatchSingletonUsesPerLifetimeScope_ExceptionThrown()
		{
			// Assign

			_provider.Register<IBar1>(r => new Bar1());
			_provider.Register(r => new Foo2(r.Resolve<IBar1>()), LifetimeType.Singleton);

			_provider.Verify();

			// Act && Assert
			Assert.Throws<DiagnosticVerificationException>(() => _provider.Verify());
		}
@i4004 i4004 self-assigned this Jul 10, 2019
@i4004 i4004 added area-di Simplify.DI related bug need research labels Jul 10, 2019
i4004 added a commit that referenced this issue Jul 10, 2019
@i4004
Copy link
Owner Author

i4004 commented Aug 22, 2019

Notes and alternative behavior checks added, because this king of behavior checks are not available.

@i4004 i4004 closed this as completed Aug 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant