From 9e5219ac94009192f749d42d4210db14737ef56b Mon Sep 17 00:00:00 2001 From: Stefan Kolb Date: Mon, 4 Apr 2016 19:38:37 +0200 Subject: [PATCH] Fix tests related to lowercase matching --- .../autocompleter/BibtexKeyAutoCompleterTest.java | 13 ------------- .../autocompleter/DefaultAutoCompleterTest.java | 13 ------------- .../autocompleter/EntireFieldAutoCompleterTest.java | 13 ------------- .../autocompleter/NameFieldAutoCompleterTest.java | 13 ------------- 4 files changed, 52 deletions(-) diff --git a/src/test/java/net/sf/jabref/logic/autocompleter/BibtexKeyAutoCompleterTest.java b/src/test/java/net/sf/jabref/logic/autocompleter/BibtexKeyAutoCompleterTest.java index 1afbef9e6a16..54bcfa759920 100644 --- a/src/test/java/net/sf/jabref/logic/autocompleter/BibtexKeyAutoCompleterTest.java +++ b/src/test/java/net/sf/jabref/logic/autocompleter/BibtexKeyAutoCompleterTest.java @@ -76,19 +76,6 @@ public void completeBeginnigOfKeyReturnsKey() { Assert.assertEquals(Arrays.asList("testKey"), result); } - @Test - public void completeLowercaseKeyReturnsKey() { - AutoCompletePreferences preferences = mock(AutoCompletePreferences.class); - BibtexKeyAutoCompleter autoCompleter = new BibtexKeyAutoCompleter(preferences); - - BibEntry entry = new BibEntry(); - entry.setField(BibEntry.KEY_FIELD, "testKey"); - autoCompleter.addToIndex(entry); - - List result = autoCompleter.complete("testkey"); - Assert.assertEquals(Arrays.asList("testKey"), result); - } - @Test public void completeNullReturnsNothing() { AutoCompletePreferences preferences = mock(AutoCompletePreferences.class); diff --git a/src/test/java/net/sf/jabref/logic/autocompleter/DefaultAutoCompleterTest.java b/src/test/java/net/sf/jabref/logic/autocompleter/DefaultAutoCompleterTest.java index 705226202ee3..c25e35671f26 100644 --- a/src/test/java/net/sf/jabref/logic/autocompleter/DefaultAutoCompleterTest.java +++ b/src/test/java/net/sf/jabref/logic/autocompleter/DefaultAutoCompleterTest.java @@ -96,19 +96,6 @@ public void completeBeginnigOfValueReturnsValue() { Assert.assertEquals(Arrays.asList("testValue"), result); } - @Test - public void completeLowercaseValueReturnsValue() { - AutoCompletePreferences preferences = mock(AutoCompletePreferences.class); - DefaultAutoCompleter autoCompleter = new DefaultAutoCompleter("field", preferences); - - BibEntry entry = new BibEntry(); - entry.setField("field", "testValue"); - autoCompleter.addToIndex(entry); - - List result = autoCompleter.complete("testvalue"); - Assert.assertEquals(Arrays.asList("testValue"), result); - } - @Test public void completeNullReturnsNothing() { AutoCompletePreferences preferences = mock(AutoCompletePreferences.class); diff --git a/src/test/java/net/sf/jabref/logic/autocompleter/EntireFieldAutoCompleterTest.java b/src/test/java/net/sf/jabref/logic/autocompleter/EntireFieldAutoCompleterTest.java index 342743fff9b0..5500a73aee25 100644 --- a/src/test/java/net/sf/jabref/logic/autocompleter/EntireFieldAutoCompleterTest.java +++ b/src/test/java/net/sf/jabref/logic/autocompleter/EntireFieldAutoCompleterTest.java @@ -96,19 +96,6 @@ public void completeBeginnigOfValueReturnsValue() { Assert.assertEquals(Arrays.asList("testValue"), result); } - @Test - public void completeLowercaseValueReturnsValue() { - AutoCompletePreferences preferences = mock(AutoCompletePreferences.class); - EntireFieldAutoCompleter autoCompleter = new EntireFieldAutoCompleter("field", preferences); - - BibEntry entry = new BibEntry(); - entry.setField("field", "testValue"); - autoCompleter.addToIndex(entry); - - List result = autoCompleter.complete("testvalue"); - Assert.assertEquals(Arrays.asList("testValue"), result); - } - @Test public void completeNullReturnsNothing() { AutoCompletePreferences preferences = mock(AutoCompletePreferences.class); diff --git a/src/test/java/net/sf/jabref/logic/autocompleter/NameFieldAutoCompleterTest.java b/src/test/java/net/sf/jabref/logic/autocompleter/NameFieldAutoCompleterTest.java index 01bd543b0027..516db3a7d042 100644 --- a/src/test/java/net/sf/jabref/logic/autocompleter/NameFieldAutoCompleterTest.java +++ b/src/test/java/net/sf/jabref/logic/autocompleter/NameFieldAutoCompleterTest.java @@ -96,19 +96,6 @@ public void completeBeginnigOfNameReturnsName() { Assert.assertEquals(Arrays.asList("Testname"), result); } - @Test - public void completeLowercaseNameReturnsName() { - AutoCompletePreferences preferences = mock(AutoCompletePreferences.class); - NameFieldAutoCompleter autoCompleter = new NameFieldAutoCompleter("field", preferences); - - BibEntry entry = new BibEntry(); - entry.setField("field", "Testname"); - autoCompleter.addToIndex(entry); - - List result = autoCompleter.complete("test"); - Assert.assertEquals(Arrays.asList("Testname"), result); - } - @Test public void completeNullReturnsNothing() { AutoCompletePreferences preferences = mock(AutoCompletePreferences.class);