public void CanSetBeaconCacheLowerMemoryBoundaryForAppMon() { // given var target = new AppMonOpenKitBuilder(Endpoint, AppID, DeviceID); const long lowerMemoryBoundary = 42L * 1024L; // when var obtained = target.WithBeaconCacheLowerMemoryBoundary(lowerMemoryBoundary); var config = target.BuildConfiguration().BeaconCacheConfig; // then Assert.That(obtained, Is.InstanceOf <AppMonOpenKitBuilder>()); Assert.That((AppMonOpenKitBuilder)obtained, Is.SameAs(target)); Assert.That(config.CacheSizeLowerBound, Is.EqualTo(lowerMemoryBoundary)); }
/// <summary> /// Sets the lower memory boundary of the beacon cache. /// /// When this is set to a positive value the memory based eviction strategy clears the collected data, /// until the data size in the cache falls below the configured limit. /// /// </summary> /// <param name="lowerMemoryBoundary">The lower boundary of the beacon cache or negative if unlimited.</param> /// <returns><code>this</code></returns> public AppMonOpenKitBuilderVB WithBeaconCacheLowerMemoryBoundary(long lowerMemoryBoundary) { wrappedBuilder.WithBeaconCacheLowerMemoryBoundary(lowerMemoryBoundary); return(this); }