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

/Source/Bifrost.Specs/Sagas/for_SagaConverter/when_converting_to_saga_holder_with_one_chapter_and_it_is_current.cs

#
C# | 21 lines | 19 code | 2 blank | 0 comment | 0 complexity | 72db753d24d133e54267912e53735c9e MD5 | raw file
 1using System.Collections.Generic;
 2using Bifrost.Events;
 3using Bifrost.Fakes.Sagas;
 4using Bifrost.Sagas;
 5using Bifrost.Serialization;
 6using Machine.Specifications;
 7
 8namespace Bifrost.Specs.Sagas.for_SagaConverter
 9{
10	public class when_converting_to_saga_holder_with_one_chapter_and_it_is_current : given.a_saga_converter_and_a_saga_with_one_chapter_and_it_is_current
11	{
12		static SagaHolder saga_holder;
13		Because of = () => saga_holder = saga_converter.ToSagaHolder(saga);
14		
15		It should_set_current_chapter_type = () => saga_holder.CurrentChapterType.ShouldEqual(typeof (SimpleChapter).AssemblyQualifiedName);
16		It should_set_the_id = () => saga_holder.Id.ShouldEqual(saga.Id);
17		It should_set_the_type = () => saga_holder.Type = typeof (SagaWithOneChapterProperty).AssemblyQualifiedName;
18		It should_serialize_saga = () => serializer_mock.Verify(s=>s.ToJson(saga, Moq.It.IsAny<SerializationOptions>()));
19		It should_convert_uncommitted_events = () => event_converter_mock.Setup(e => e.ToEventHolders(Moq.It.IsAny<IEnumerable<IEvent>>()));
20	}
21}