PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost.Specs/Views/for_View/when_getting_a_single_instance_of_object_without_id.cs

#
C# | 15 lines | 13 code | 2 blank | 0 comment | 0 complexity | 2293c8da6fbd2fd8cbb8fe38aff9a4ab MD5 | raw file
 1using System;
 2using Bifrost.Views;
 3using Machine.Specifications;
 4
 5namespace Bifrost.Specs.Views.for_View
 6{
 7    [Subject(Subjects.getting_single_instance)]
 8    public class when_getting_a_single_instance_of_object_without_id : given.a_view_for<SimpleObjectWithoutId>
 9    {
10        static Exception exception;
11        Because of = () => exception = Catch.Exception(() => Repository.Get(Guid.NewGuid()));
12
13        It should_throw_object_does_not_have_id_exception = () => exception.ShouldBeOfType<ObjectDoesNotHaveIdException>();
14    }
15}