Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Commit

Permalink
Updates after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
JunTaoLuo committed Aug 29, 2016
1 parent 85a36fb commit 2c1b708
Showing 1 changed file with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -689,15 +689,7 @@ public async void ServesCachedContent_IfIfModifiedSince_NotSatisfied()
client.DefaultRequestHeaders.IfUnmodifiedSince = DateTimeOffset.MinValue;
var subsequentResponse = await client.GetAsync("");

initialResponse.EnsureSuccessStatusCode();
subsequentResponse.EnsureSuccessStatusCode();

foreach (var header in initialResponse.Headers)
{
Assert.Equal(initialResponse.Headers.GetValues(header.Key), subsequentResponse.Headers.GetValues(header.Key));
}
Assert.True(subsequentResponse.Headers.Contains(HeaderNames.Age));
Assert.Equal(await initialResponse.Content.ReadAsStringAsync(), await subsequentResponse.Content.ReadAsStringAsync());
await AssertResponseCachedAsync(initialResponse, subsequentResponse);
}
}

Expand Down Expand Up @@ -756,15 +748,7 @@ public async void ServesCachedContent_IfIfNoneMatch_NotSatisfied()
client.DefaultRequestHeaders.IfNoneMatch.Add(new System.Net.Http.Headers.EntityTagHeaderValue("\"E2\""));
var subsequentResponse = await client.GetAsync("");

initialResponse.EnsureSuccessStatusCode();
subsequentResponse.EnsureSuccessStatusCode();

foreach (var header in initialResponse.Headers)
{
Assert.Equal(initialResponse.Headers.GetValues(header.Key), subsequentResponse.Headers.GetValues(header.Key));
}
Assert.True(subsequentResponse.Headers.Contains(HeaderNames.Age));
Assert.Equal(await initialResponse.Content.ReadAsStringAsync(), await subsequentResponse.Content.ReadAsStringAsync());
await AssertResponseCachedAsync(initialResponse, subsequentResponse);
}
}

Expand Down

0 comments on commit 2c1b708

Please sign in to comment.