@Test public void DefaultMetricDimensionConfigurator_kitchen_sink_constructor_sets_fields_as_expected() { // give String metricName = UUID.randomUUID().toString(); String responseCodeDimKey = UUID.randomUUID().toString(); String uriDimKey = UUID.randomUUID().toString(); String methodDimKey = UUID.randomUUID().toString(); String endpointDimKey = UUID.randomUUID().toString(); // when DefaultMetricDimensionConfigurator instance = new DefaultMetricDimensionConfigurator( metricName, responseCodeDimKey, uriDimKey, methodDimKey, endpointDimKey ); // then assertThat(instance.metricName).isEqualTo(metricName); assertThat(instance.responseCodeDimensionKey).isEqualTo(responseCodeDimKey); assertThat(instance.uriDimensionKey).isEqualTo(uriDimKey); assertThat(instance.methodDimensionKey).isEqualTo(methodDimKey); assertThat(instance.endpointClassKey).isEqualTo(endpointDimKey); }
String endpointDimKey = UUID.randomUUID().toString(); DefaultMetricDimensionConfigurator instance = new DefaultMetricDimensionConfigurator( metricName, responseCodeDimKey, uriDimKey, methodDimKey, endpointDimKey ); BuilderTagger result = instance.setupMetricWithDimensions( builderMock, requestInfoMock, responseInfoMock, httpStateMock, responseStatusCode, responseStatusCodeXXValue, elapsedTimeMillis, endpointMock, endpointClass, method, matchingPathTemplate
@Test public void DefaultMetricDimensionConfigurator_one_arg_constructor_sets_fields_as_expected() { // give String metricName = UUID.randomUUID().toString(); // when DefaultMetricDimensionConfigurator instance = new DefaultMetricDimensionConfigurator(metricName); // then assertThat(instance.metricName).isEqualTo(metricName); assertThat(instance.responseCodeDimensionKey).isEqualTo(DEFAULT_RESPONSE_CODE_DIMENSION_KEY); assertThat(instance.uriDimensionKey).isEqualTo(DEFAULT_URI_DIMENSION_KEY); assertThat(instance.methodDimensionKey).isEqualTo(DEFAULT_METHOD_DIMENSION_KEY); assertThat(instance.endpointClassKey).isEqualTo(DEFAULT_ENDPOINT_CLASS_DIMENSION_KEY); }