PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/Source/Bifrost.Specs/Execution/for_ApplicationManager/when_getting_an_application_and_there_are_multiple_defined.cs

#
C# | 18 lines | 14 code | 4 blank | 0 comment | 0 complexity | f115261092dd3b154da99999288426c8 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using Bifrost.Execution;
  3. using Machine.Specifications;
  4. using It = Machine.Specifications.It;
  5. namespace Bifrost.Specs.Execution.for_ApplicationManager
  6. {
  7. public class when_getting_an_application_and_there_are_multiple_defined : given.an_application_manager
  8. {
  9. static Exception exception_thrown;
  10. Establish context = () => type_discoverer_mock.Setup(t => t.FindSingle<IApplication>()).Throws<MultipleTypesFoundException>();
  11. Because of = () => exception_thrown = Catch.Exception(() => application_manager.Get());
  12. It should_throw_multiple_applications_defined_exception = () => exception_thrown.ShouldBeOfType<MultipleApplicationsFoundException>();
  13. }
  14. }