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); }
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); }