Closed matteoventuri7 closed 2 years ago
Thanks for reporting. I will look into it but have a feeling is related to https://github.com/aliostad/CacheCow/issues/213 which is just fixed during .NET 5.0.
They tried to fix it twice they messed up twice. This will be the 3rd time.
OK, apologies for not being able to look into it.
There is no problem in .NET 5.0, one of the tests do not work which I am looking into.
As for your example your assert is wrong. It fails on first time round in fact, since you expect false while it is null. Change it so you can see:
[Fact]
public async Task Simple_Caching_Example_From_Issue263()
{
var client = ClientExtensions.CreateClient();
const string CacheableResource = "https://code.jquery.com/jquery-3.3.1.slim.min.js";
var response = await client.GetAsync(CacheableResource);
var responseFromCache = await client.GetAsync(CacheableResource);
Assert.Equal(true, response.Headers.GetCacheCowHeader().DidNotExist);
Assert.Equal(true, responseFromCache.Headers.GetCacheCowHeader().RetrievedFromCache);
}
This unit test fail on .NET 5.0