LiveMap API
Loading...
Searching...
No Matches
LiveMap.Tests.WebServerCacheTest Class Reference

Tests for the WebServer file cache implementation. Tests cache behavior including CachedResource functionality and content type detection. More...

Inheritance diagram for LiveMap.Tests.WebServerCacheTest:
Collaboration diagram for LiveMap.Tests.WebServerCacheTest:

Public Member Functions

 WebServerCacheTest ()
void Dispose ()
void GetContentType_Html_ReturnsTextHtml ()
void GetContentType_Htm_ReturnsTextHtml ()
void GetContentType_Js_ReturnsApplicationJavascript ()
void GetContentType_Css_ReturnsTextCss ()
void GetContentType_Png_ReturnsImagePng ()
void GetContentType_Jpg_ReturnsImageJpeg ()
void GetContentType_Jpeg_ReturnsImageJpeg ()
void GetContentType_Gif_ReturnsImageGif ()
void GetContentType_Json_ReturnsApplicationJson ()
void GetContentType_Ico_ReturnsImageXIcon ()
void GetContentType_Svg_ReturnsImageSvgXml ()
void GetContentType_Woff_ReturnsFontWoff ()
void GetContentType_Woff2_ReturnsFontWoff2 ()
void GetContentType_Txt_ReturnsTextPlain ()
void GetContentType_Xml_ReturnsApplicationXml ()
void GetContentType_Unknown_ReturnsOctetStream ()
void GetContentType_NoExtension_ReturnsOctetStream ()
void GetContentType_CaseInsensitive_ReturnsCorrectType ()
void CachedResource_ImplementsIResource ()
async Task CachedResource_GetContentAsync_ReturnsStreamWithCorrectData ()
async Task CachedResource_GetContentAsync_StreamIsAtBeginning ()
async Task CachedResource_WriteAsync_WritesCorrectData ()
async Task CachedResource_WriteAsync_WithLargeBuffer_WritesCorrectly ()
async Task CachedResource_WriteAsync_WithSmallBuffer_WritesCorrectly ()
async Task CachedResource_CalculateChecksumAsync_ReturnsZero ()
void CachedResource_WithEmptyData_HasZeroLength ()
async Task CachedResource_WithEmptyData_GetContentAsync_ReturnsEmptyStream ()
async Task CachedResource_WithBinaryData_PreservesData ()
void CachedResource_WithNullName_AllowsNull ()
void IsTileFile_TileInTilesDirectory_ReturnsTrue ()
void IsTileFile_FileInTilesSubdirectory_ReturnsTrue ()
void IsTileFile_JsonFile_ReturnsFalse ()
void IsTileFile_HtmlFile_ReturnsFalse ()
void IsTileFile_CaseInsensitive_ReturnsTrue ()
void GetCachedFile_NotInCache_ReturnsNull ()
void GetCachedFile_InCache_ReturnsCachedFile ()
void GetCachedFile_FileModified_InvalidatesCache ()
void GetCachedFile_UpdatesLastAccessTime ()
void LoadAndCacheFile_LoadsFileFromDisk ()
void LoadAndCacheFile_AddsToCache ()
void LoadAndCacheFile_UpdatesCacheSize ()
void EvictIfNeeded_WhenFileCountLimitExceeded_EvictsLRU ()
void EvictIfNeeded_LRUOrder_IsMaintained ()
void EvictIfNeeded_WithLargeFile_EvictsIfNeeded ()
void Cache_ConcurrentAccess_IsThreadSafe ()

Detailed Description

Tests for the WebServer file cache implementation. Tests cache behavior including CachedResource functionality and content type detection.

Constructor & Destructor Documentation

◆ WebServerCacheTest()

LiveMap.Tests.WebServerCacheTest.WebServerCacheTest ( )
inline

Member Function Documentation

◆ Cache_ConcurrentAccess_IsThreadSafe()

void LiveMap.Tests.WebServerCacheTest.Cache_ConcurrentAccess_IsThreadSafe ( )
inline

◆ CachedResource_CalculateChecksumAsync_ReturnsZero()

async Task LiveMap.Tests.WebServerCacheTest.CachedResource_CalculateChecksumAsync_ReturnsZero ( )
inline

◆ CachedResource_GetContentAsync_ReturnsStreamWithCorrectData()

async Task LiveMap.Tests.WebServerCacheTest.CachedResource_GetContentAsync_ReturnsStreamWithCorrectData ( )
inline

◆ CachedResource_GetContentAsync_StreamIsAtBeginning()

async Task LiveMap.Tests.WebServerCacheTest.CachedResource_GetContentAsync_StreamIsAtBeginning ( )
inline

◆ CachedResource_ImplementsIResource()

void LiveMap.Tests.WebServerCacheTest.CachedResource_ImplementsIResource ( )
inline

◆ CachedResource_WithBinaryData_PreservesData()

async Task LiveMap.Tests.WebServerCacheTest.CachedResource_WithBinaryData_PreservesData ( )
inline

◆ CachedResource_WithEmptyData_GetContentAsync_ReturnsEmptyStream()

async Task LiveMap.Tests.WebServerCacheTest.CachedResource_WithEmptyData_GetContentAsync_ReturnsEmptyStream ( )
inline

◆ CachedResource_WithEmptyData_HasZeroLength()

void LiveMap.Tests.WebServerCacheTest.CachedResource_WithEmptyData_HasZeroLength ( )
inline

◆ CachedResource_WithNullName_AllowsNull()

void LiveMap.Tests.WebServerCacheTest.CachedResource_WithNullName_AllowsNull ( )
inline

◆ CachedResource_WriteAsync_WithLargeBuffer_WritesCorrectly()

async Task LiveMap.Tests.WebServerCacheTest.CachedResource_WriteAsync_WithLargeBuffer_WritesCorrectly ( )
inline

◆ CachedResource_WriteAsync_WithSmallBuffer_WritesCorrectly()

async Task LiveMap.Tests.WebServerCacheTest.CachedResource_WriteAsync_WithSmallBuffer_WritesCorrectly ( )
inline

◆ CachedResource_WriteAsync_WritesCorrectData()

async Task LiveMap.Tests.WebServerCacheTest.CachedResource_WriteAsync_WritesCorrectData ( )
inline

◆ Dispose()

void LiveMap.Tests.WebServerCacheTest.Dispose ( )
inline

◆ EvictIfNeeded_LRUOrder_IsMaintained()

void LiveMap.Tests.WebServerCacheTest.EvictIfNeeded_LRUOrder_IsMaintained ( )
inline

◆ EvictIfNeeded_WhenFileCountLimitExceeded_EvictsLRU()

void LiveMap.Tests.WebServerCacheTest.EvictIfNeeded_WhenFileCountLimitExceeded_EvictsLRU ( )
inline

◆ EvictIfNeeded_WithLargeFile_EvictsIfNeeded()

void LiveMap.Tests.WebServerCacheTest.EvictIfNeeded_WithLargeFile_EvictsIfNeeded ( )
inline

◆ GetCachedFile_FileModified_InvalidatesCache()

void LiveMap.Tests.WebServerCacheTest.GetCachedFile_FileModified_InvalidatesCache ( )
inline

◆ GetCachedFile_InCache_ReturnsCachedFile()

void LiveMap.Tests.WebServerCacheTest.GetCachedFile_InCache_ReturnsCachedFile ( )
inline

◆ GetCachedFile_NotInCache_ReturnsNull()

void LiveMap.Tests.WebServerCacheTest.GetCachedFile_NotInCache_ReturnsNull ( )
inline

◆ GetCachedFile_UpdatesLastAccessTime()

void LiveMap.Tests.WebServerCacheTest.GetCachedFile_UpdatesLastAccessTime ( )
inline

◆ GetContentType_CaseInsensitive_ReturnsCorrectType()

void LiveMap.Tests.WebServerCacheTest.GetContentType_CaseInsensitive_ReturnsCorrectType ( )
inline

◆ GetContentType_Css_ReturnsTextCss()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Css_ReturnsTextCss ( )
inline

◆ GetContentType_Gif_ReturnsImageGif()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Gif_ReturnsImageGif ( )
inline

◆ GetContentType_Htm_ReturnsTextHtml()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Htm_ReturnsTextHtml ( )
inline

◆ GetContentType_Html_ReturnsTextHtml()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Html_ReturnsTextHtml ( )
inline

◆ GetContentType_Ico_ReturnsImageXIcon()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Ico_ReturnsImageXIcon ( )
inline

◆ GetContentType_Jpeg_ReturnsImageJpeg()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Jpeg_ReturnsImageJpeg ( )
inline

◆ GetContentType_Jpg_ReturnsImageJpeg()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Jpg_ReturnsImageJpeg ( )
inline

◆ GetContentType_Js_ReturnsApplicationJavascript()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Js_ReturnsApplicationJavascript ( )
inline

◆ GetContentType_Json_ReturnsApplicationJson()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Json_ReturnsApplicationJson ( )
inline

◆ GetContentType_NoExtension_ReturnsOctetStream()

void LiveMap.Tests.WebServerCacheTest.GetContentType_NoExtension_ReturnsOctetStream ( )
inline

◆ GetContentType_Png_ReturnsImagePng()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Png_ReturnsImagePng ( )
inline

◆ GetContentType_Svg_ReturnsImageSvgXml()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Svg_ReturnsImageSvgXml ( )
inline

◆ GetContentType_Txt_ReturnsTextPlain()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Txt_ReturnsTextPlain ( )
inline

◆ GetContentType_Unknown_ReturnsOctetStream()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Unknown_ReturnsOctetStream ( )
inline

◆ GetContentType_Woff2_ReturnsFontWoff2()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Woff2_ReturnsFontWoff2 ( )
inline

◆ GetContentType_Woff_ReturnsFontWoff()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Woff_ReturnsFontWoff ( )
inline

◆ GetContentType_Xml_ReturnsApplicationXml()

void LiveMap.Tests.WebServerCacheTest.GetContentType_Xml_ReturnsApplicationXml ( )
inline

◆ IsTileFile_CaseInsensitive_ReturnsTrue()

void LiveMap.Tests.WebServerCacheTest.IsTileFile_CaseInsensitive_ReturnsTrue ( )
inline

◆ IsTileFile_FileInTilesSubdirectory_ReturnsTrue()

void LiveMap.Tests.WebServerCacheTest.IsTileFile_FileInTilesSubdirectory_ReturnsTrue ( )
inline

◆ IsTileFile_HtmlFile_ReturnsFalse()

void LiveMap.Tests.WebServerCacheTest.IsTileFile_HtmlFile_ReturnsFalse ( )
inline

◆ IsTileFile_JsonFile_ReturnsFalse()

void LiveMap.Tests.WebServerCacheTest.IsTileFile_JsonFile_ReturnsFalse ( )
inline

◆ IsTileFile_TileInTilesDirectory_ReturnsTrue()

void LiveMap.Tests.WebServerCacheTest.IsTileFile_TileInTilesDirectory_ReturnsTrue ( )
inline

◆ LoadAndCacheFile_AddsToCache()

void LiveMap.Tests.WebServerCacheTest.LoadAndCacheFile_AddsToCache ( )
inline

◆ LoadAndCacheFile_LoadsFileFromDisk()

void LiveMap.Tests.WebServerCacheTest.LoadAndCacheFile_LoadsFileFromDisk ( )
inline

◆ LoadAndCacheFile_UpdatesCacheSize()

void LiveMap.Tests.WebServerCacheTest.LoadAndCacheFile_UpdatesCacheSize ( )
inline

The documentation for this class was generated from the following file: