#1658 - ENH: Add label to ProfileLocation and use as default query label

This commit is contained in:
rob bygrave
2019-03-27 09:37:35 +13:00
parent 54534ea7f3
commit fc032c632b
10 changed files with 65 additions and 8 deletions
@@ -15,6 +15,8 @@ public class BasicProfileLocationTest {
assertThat(loc.obtain()).endsWith(":12)");
assertThat(loc.shortDescription()).isEqualTo("NativeMethodAccessorImpl.invoke0(Native Method:12)");
assertThat(loc.label()).isEqualTo("NativeMethodAccessorImpl.invoke0");
}
@Test
@@ -23,6 +25,7 @@ public class BasicProfileLocationTest {
BasicProfileLocation loc = new BasicProfileLocation("com.foo.Bar.all");
assertThat(loc.obtain()).isEqualTo("com.foo.Bar.all");
assertThat(loc.shortDescription()).isEqualTo("Bar.all");
assertThat(loc.label()).isEqualTo("Bar.all");
}
@Test
@@ -31,5 +34,6 @@ public class BasicProfileLocationTest {
BasicProfileLocation loc = new BasicProfileLocation("foo.Bar.all");
assertThat(loc.obtain()).isEqualTo("foo.Bar.all");
assertThat(loc.shortDescription()).isEqualTo("Bar.all");
assertThat(loc.label()).isEqualTo("Bar.all");
}
}
@@ -17,6 +17,8 @@ public class ProfileLocationTest {
public void test_obtain() {
assertThat(doIt()).isEqualTo("org.tests.profile.ProfileLocationTest.doIt(ProfileLocationTest.java:13)");
assertThat(loc.shortDescription()).isEqualTo("ProfileLocationTest.doIt(ProfileLocationTest.java:13)");
assertThat(loc.label()).isEqualTo("ProfileLocationTest.doIt");
}
@Test