コード例 #1
0
        public static async Task TestCase(
            this MeetupClient @this,
            Func <MeetupClient, Task <HttpResponseMessage> > command,
            Action <HttpResponseMessage> assertResponse = null,
            Action <Meetup> assert = null)
        {
            assert = assert ?? (_ => { });
            var response = await command(@this);

            assertResponse(response);
            await @this.Get(id);
        }
コード例 #2
0
ファイル: MeetupTests.cs プロジェクト: paulopez78/meetup-ddd
        public async Task Meetup_Create_Test()
        {
            var meetupId = Guid.NewGuid();
            var title    = "EventSourcing CQRS";
            var location = "Seattle, Redmond, Microsoft";

            await _client.Create(meetupId, title, location);

            var meetup = await _client.Get(meetupId);

            Assert.Equal(meetupId, meetup.MeetupId);
            Assert.Equal(location, meetup.Location);
            Assert.Equal(title, meetup.Title);
            Assert.Equal(Meetup.MeetupState.Created, meetup.State);
        }
コード例 #3
0
 public static async Task <Meetup> Get(this MeetupClient @this) => await @this.Get(id);