PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms 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
 1using System;
 2using Bifrost.Execution;
 3using Machine.Specifications;
 4using It = Machine.Specifications.It;
 5
 6namespace Bifrost.Specs.Execution.for_ApplicationManager
 7{
 8    public class when_getting_an_application_and_there_are_multiple_defined : given.an_application_manager
 9    {
10        static Exception exception_thrown;
11
12        Establish context = () => type_discoverer_mock.Setup(t => t.FindSingle<IApplication>()).Throws<MultipleTypesFoundException>();
13
14        Because of = () => exception_thrown = Catch.Exception(() => application_manager.Get());
15
16        It should_throw_multiple_applications_defined_exception = () => exception_thrown.ShouldBeOfType<MultipleApplicationsFoundException>();
17    }
18}