public void AppMonOpenKitBuilderTakesStringDeviceID() { // given var target = new AppMonOpenKitBuilder(Endpoint, AppName, "stringDeviceID"); // when, then Assert.That(target.BuildConfiguration().DeviceID, Is.EqualTo("stringDeviceID")); }
public void CanSetCrashReportingLevelForAppMon() { // given var target = new AppMonOpenKitBuilder(Endpoint, AppID, DeviceID); // when var level = CrashReportingLevel.OPT_IN_CRASHES; var obtained = target.WithCrashReportingLevel(level); var config = target.BuildConfiguration().BeaconConfig; // then Assert.That(obtained, Is.InstanceOf <AppMonOpenKitBuilder>()); Assert.That((AppMonOpenKitBuilder)obtained, Is.SameAs(target)); Assert.That(config.CrashReportingLevel, Is.EqualTo(level)); }
public void CanSetDataCollectionLevelForAppMon() { // given var target = new AppMonOpenKitBuilder(Endpoint, AppID, DeviceID); // when var level = DataCollectionLevel.USER_BEHAVIOR; var obtained = target.WithDataCollectionLevel(level); var config = target.BuildConfiguration().BeaconConfig; // then Assert.That(obtained, Is.InstanceOf <AppMonOpenKitBuilder>()); Assert.That((AppMonOpenKitBuilder)obtained, Is.SameAs(target)); Assert.That(config.DataCollectionLevel, Is.EqualTo(level)); }
public void CanSetBeaconCacheUpperMemoryBoundaryForAppMon() { // given var target = new AppMonOpenKitBuilder(Endpoint, AppID, DeviceID); const long upperMemoryBoundary = 42L * 1024L; // when var obtained = target.WithBeaconCacheUpperMemoryBoundary(upperMemoryBoundary); var config = target.BuildConfiguration().BeaconCacheConfig; // then Assert.That(obtained, Is.InstanceOf <AppMonOpenKitBuilder>()); Assert.That((AppMonOpenKitBuilder)obtained, Is.SameAs(target)); Assert.That(config.CacheSizeUpperBound, Is.EqualTo(upperMemoryBoundary)); }
public void CanSetCustomMaxBeaconRecordAgeForAppMon() { // given var target = new AppMonOpenKitBuilder(Endpoint, AppID, DeviceID); const long maxRecordAge = 123456L; // when var obtained = target.WithBeaconCacheMaxRecordAge(maxRecordAge); var config = target.BuildConfiguration().BeaconCacheConfig; // then Assert.That(obtained, Is.InstanceOf <AppMonOpenKitBuilder>()); Assert.That((AppMonOpenKitBuilder)obtained, Is.SameAs(target)); Assert.That(config.MaxRecordAge, Is.EqualTo(maxRecordAge)); }