use of com.google.firebase.perf.metrics.NetworkRequestMetricBuilder in project firebase-android-sdk by firebase.
the class FirebasePerfNetworkValidatorTest method testValidContentType.
@Test
public void testValidContentType() {
NetworkRequestMetricBuilder metricBuilder = createNetworkRequestMetricBuilderWithRequiredValuesPresent();
metricBuilder.setResponseContentType("a\u0020");
FirebasePerfNetworkValidator validator = new FirebasePerfNetworkValidator(metricBuilder.build(), ApplicationProvider.getApplicationContext());
assertTrue(validator.isValidPerfMetric());
}
use of com.google.firebase.perf.metrics.NetworkRequestMetricBuilder in project firebase-android-sdk by firebase.
the class FirebasePerfNetworkValidatorTest method testIsValid.
@Test
public void testIsValid() {
NetworkRequestMetricBuilder metricBuilder = createNetworkRequestMetricBuilderWithRequiredValuesPresent();
FirebasePerfNetworkValidator validator = new FirebasePerfNetworkValidator(metricBuilder.build(), ApplicationProvider.getApplicationContext());
assertTrue(validator.isValidPerfMetric());
}
use of com.google.firebase.perf.metrics.NetworkRequestMetricBuilder in project firebase-android-sdk by firebase.
the class FirebasePerfNetworkValidatorTest method testNegativeTimeToResponseInitiated.
@Test
public void testNegativeTimeToResponseInitiated() {
NetworkRequestMetricBuilder metricBuilder = createNetworkRequestMetricBuilderWithRequiredValuesPresent();
metricBuilder.setTimeToResponseInitiatedMicros(-1L);
FirebasePerfNetworkValidator validator = new FirebasePerfNetworkValidator(metricBuilder.build(), ApplicationProvider.getApplicationContext());
assertFalse(validator.isValidPerfMetric());
}
use of com.google.firebase.perf.metrics.NetworkRequestMetricBuilder in project firebase-android-sdk by firebase.
the class FirebasePerfNetworkValidatorTest method testNegativeTimeToResponseCompleted.
@Test
public void testNegativeTimeToResponseCompleted() {
NetworkRequestMetricBuilder metricBuilder = createNetworkRequestMetricBuilderWithRequiredValuesPresent();
metricBuilder.setTimeToResponseCompletedMicros(-1L);
FirebasePerfNetworkValidator validator = new FirebasePerfNetworkValidator(metricBuilder.build(), ApplicationProvider.getApplicationContext());
assertFalse(validator.isValidPerfMetric());
}
use of com.google.firebase.perf.metrics.NetworkRequestMetricBuilder in project firebase-android-sdk by firebase.
the class FirebasePerfNetworkValidatorTest method testNullResponsePayloadBytes.
@Test
public void testNullResponsePayloadBytes() {
NetworkRequestMetricBuilder metricBuilder = createNetworkRequestMetricBuilderWithRequiredValuesPresent();
NetworkRequestMetric metric = metricBuilder.build();
assertFalse(metric.hasResponsePayloadBytes());
FirebasePerfNetworkValidator validator = new FirebasePerfNetworkValidator(metric, ApplicationProvider.getApplicationContext());
assertTrue(validator.isValidPerfMetric());
}
Aggregations