/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
- using System;
- using Bifrost.Views;
- using Machine.Specifications;
-
- namespace Bifrost.Specs.Views.for_View
- {
- [Subject(Subjects.getting_single_instance)]
- public class when_getting_a_single_instance_of_object_without_id : given.a_view_for<SimpleObjectWithoutId>
- {
- static Exception exception;
- Because of = () => exception = Catch.Exception(() => Repository.Get(Guid.NewGuid()));
-
- It should_throw_object_does_not_have_id_exception = () => exception.ShouldBeOfType<ObjectDoesNotHaveIdException>();
- }
- }