Exemplo n.º 1
0
        public async Task Attendants_Test()
        {
            var meetupId      = Guid.NewGuid();
            var title         = "EventSourcing CQRS";
            var location      = "Seattle, Redmond, Microsoft";
            var numberOfSeats = 2;
            var jon           = Guid.NewGuid();
            var carla         = Guid.NewGuid();
            var susan         = Guid.NewGuid();

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

            await _client.UpdateSeats(meetupId, numberOfSeats);

            await _client.Publish(meetupId);

            await _client.AcceptRSVP(meetupId, jon, DateTime.UtcNow);

            await _client.AcceptRSVP(meetupId, carla, DateTime.UtcNow.AddSeconds(1));

            await _client.AcceptRSVP(meetupId, susan, DateTime.UtcNow.AddSeconds(1));

            var attendants = await _client.GetAttendants(meetupId);

            attendants.Going.AssertEqual(jon, carla);
            attendants.Waiting.AssertEqual(susan);
            Assert.Empty(attendants.NotGoing);
        }
Exemplo n.º 2
0
        public static async Task <HttpResponseMessage> Published(this MeetupClient @this)
        {
            await @this.Create();

            await @this.UpdateLocation();

            await @this.UpdateSeats();

            await @this.UpdateTime();

            return(await @this.Publish());
        }
Exemplo n.º 3
0
 public static Task <HttpResponseMessage> Publish(this MeetupClient @this) => @this.Publish(id);