예제 #1
0
        public async Task It_Should_Create_Guide()
        {
            // arrange
            var guide = TestModel.CreateGuide();

            // act
            var result = await _persistence.CreateAsync(null, guide);

            // assert
            TestModel.AssertEqual(guide, result);
        }
예제 #2
0
        public async Task <GuideV1> CreateGuideAsync(string correlationId, GuideV1 guide)
        {
            guide.Id         = guide.Id ?? IdGenerator.NextLong();
            guide.CreateTime = DateTime.UtcNow;

            var newGuide = await _persistence.CreateAsync(correlationId, guide);

            await _attachmentsConnector.AddAttachmentsAsync(correlationId, newGuide);

            return(newGuide);
        }