Beispiel #1
0
        public async Task can_get_activity_profile_with_dynamic_document()
        {
            // Arrange
            var request = new GetActivityProfileRequest()
            {
                ActivityId = new Uri(ACTIVITY_ID),
                ProfileId  = PROFILE_ID
            };

            this._mockHttp
            .When(HttpMethod.Get, this.GetApiUrl("activities/profile"))
            .WithQueryString("activityId", ACTIVITY_ID)
            .WithQueryString("profileId", PROFILE_ID)
            .Respond(this.GetActivityProfileResponseMessage());

            // Act
            ActivityProfileDocument activityProfile = await this._client.ActivityProfiles.Get(request);

            // Assert
            activityProfile.Should().NotBeNull();
            activityProfile.ETag.Should().Be(ETAG);
            activityProfile.LastModified.Should().Be(LAST_MODIFIED);
            string content = activityProfile.Content.ToObject <string>();

            content.Should().NotBeNullOrEmpty();
        }