更新 逆向 List 的文章中的示例代码:https://www.ossez.com/t/java-list/13943
This commit is contained in:
parent
960b83ae6a
commit
3c6dbf5a9d
|
@ -4,9 +4,9 @@
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="080575e3-7e62-4649-ae70-06fb6130a866" name="Changes" comment="Java 从一个 List 中删除所有重复的元素: https://www.ossez.com/t/java-list/13942">
|
<list default="true" id="080575e3-7e62-4649-ae70-06fb6130a866" name="Changes" comment="更新: Java 从一个 List 中删除重复的元素 文章链接">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/core-java-modules/core-java-collections-list/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/core-java-modules/core-java-collections-list/README.md" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/core-java-modules/core-java-collections-list/src/test/java/com/ossez/java/list/ReverseIteratorUnitTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/core-java-modules/core-java-collections-list/src/test/java/com/ossez/java/list/ReverseIteratorUnitTest.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<recent name="com.ossez.collections" />
|
<recent name="com.ossez.collections" />
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager" selected="JUnit.JavaCollectionCleanupUnitTest.givenListContainsDuplicates_whenRemovingDuplicatesWithPlainJava_thenCorrect">
|
<component name="RunManager" selected="JUnit.ReverseIteratorUnitTest.whenIteratingUsingGuava_thenCorrect">
|
||||||
<configuration default="true" type="DjangoTestsConfigurationType">
|
<configuration default="true" type="DjangoTestsConfigurationType">
|
||||||
<module name="junit-5-basics" />
|
<module name="junit-5-basics" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
@ -170,17 +170,17 @@
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="RandomListElementUnitTest.givenList_whenRandomIndexChosen_shouldReturnARandomElementUsingMathRandom" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
<configuration name="ReverseIteratorUnitTest.whenIteratingUsingGuava_thenCorrect" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||||
<module name="core-java-collections-list" />
|
<module name="core-java-collections-list" />
|
||||||
<extension name="coverage">
|
<extension name="coverage">
|
||||||
<pattern>
|
<pattern>
|
||||||
<option name="PATTERN" value="com.ossez.list.random.*" />
|
<option name="PATTERN" value="com.ossez.java.list.*" />
|
||||||
<option name="ENABLED" value="true" />
|
<option name="ENABLED" value="true" />
|
||||||
</pattern>
|
</pattern>
|
||||||
</extension>
|
</extension>
|
||||||
<option name="PACKAGE_NAME" value="com.ossez.list.random" />
|
<option name="PACKAGE_NAME" value="com.ossez.java.list" />
|
||||||
<option name="MAIN_CLASS_NAME" value="com.ossez.list.random.RandomListElementUnitTest" />
|
<option name="MAIN_CLASS_NAME" value="com.ossez.java.list.ReverseIteratorUnitTest" />
|
||||||
<option name="METHOD_NAME" value="givenList_whenRandomIndexChosen_shouldReturnARandomElementUsingMathRandom" />
|
<option name="METHOD_NAME" value="whenIteratingUsingGuava_thenCorrect" />
|
||||||
<option name="TEST_OBJECT" value="method" />
|
<option name="TEST_OBJECT" value="method" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
|
@ -295,11 +295,11 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
<recent_temporary>
|
<recent_temporary>
|
||||||
<list>
|
<list>
|
||||||
|
<item itemvalue="JUnit.ReverseIteratorUnitTest.whenIteratingUsingGuava_thenCorrect" />
|
||||||
<item itemvalue="JUnit.JavaCollectionCleanupUnitTest.givenListContainsDuplicates_whenRemovingDuplicatesWithPlainJava_thenCorrect" />
|
<item itemvalue="JUnit.JavaCollectionCleanupUnitTest.givenListContainsDuplicates_whenRemovingDuplicatesWithPlainJava_thenCorrect" />
|
||||||
<item itemvalue="JUnit.JavaCollectionCleanupUnitTest.givenListContainsNulls_whenRemovingNullsWithGuavaV1_thenCorrect" />
|
<item itemvalue="JUnit.JavaCollectionCleanupUnitTest.givenListContainsNulls_whenRemovingNullsWithGuavaV1_thenCorrect" />
|
||||||
<item itemvalue="JUnit.JavaCollectionCleanupUnitTest.givenListContainsNulls_whenRemovingNullsWithPlainJavaAlternative_thenCorrect" />
|
<item itemvalue="JUnit.JavaCollectionCleanupUnitTest.givenListContainsNulls_whenRemovingNullsWithPlainJavaAlternative_thenCorrect" />
|
||||||
<item itemvalue="JUnit.JavaCollectionCleanupUnitTest.givenListContainsNulls_whenRemovingNullsWithPlainJava_thenCorrect" />
|
<item itemvalue="JUnit.JavaCollectionCleanupUnitTest.givenListContainsNulls_whenRemovingNullsWithPlainJava_thenCorrect" />
|
||||||
<item itemvalue="JUnit.RandomListElementUnitTest.givenList_whenRandomIndexChosen_shouldReturnARandomElementUsingMathRandom" />
|
|
||||||
</list>
|
</list>
|
||||||
</recent_temporary>
|
</recent_temporary>
|
||||||
</component>
|
</component>
|
||||||
|
@ -442,7 +442,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1651417575415</updated>
|
<updated>1651417575415</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="19" />
|
<task id="LOCAL-00019" summary="更新: Java 从一个 List 中删除重复的元素 文章链接">
|
||||||
|
<created>1651418643865</created>
|
||||||
|
<option name="number" value="00019" />
|
||||||
|
<option name="presentableId" value="LOCAL-00019" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1651418643865</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="20" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
@ -478,7 +485,8 @@
|
||||||
<MESSAGE value="init submit all for code branch" />
|
<MESSAGE value="init submit all for code branch" />
|
||||||
<MESSAGE value="添加文章链接: https://www.ossez.com/t/java-list-null/13940" />
|
<MESSAGE value="添加文章链接: https://www.ossez.com/t/java-list-null/13940" />
|
||||||
<MESSAGE value="Java 从一个 List 中删除所有重复的元素: https://www.ossez.com/t/java-list/13942" />
|
<MESSAGE value="Java 从一个 List 中删除所有重复的元素: https://www.ossez.com/t/java-list/13942" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Java 从一个 List 中删除所有重复的元素: https://www.ossez.com/t/java-list/13942" />
|
<MESSAGE value="更新: Java 从一个 List 中删除重复的元素 文章链接" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="更新: Java 从一个 List 中删除重复的元素 文章链接" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
|
@ -493,6 +501,11 @@
|
||||||
<line>54</line>
|
<line>54</line>
|
||||||
<option name="timeStamp" value="4" />
|
<option name="timeStamp" value="4" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/core-java-modules/core-java-collections-list/src/test/java/com/ossez/java/list/ReverseIteratorUnitTest.java</url>
|
||||||
|
<line>88</line>
|
||||||
|
<option name="timeStamp" value="7" />
|
||||||
|
</line-breakpoint>
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -12,7 +12,16 @@ import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import org.junit.jupiter.api.TestInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test for list Reverse
|
||||||
|
*
|
||||||
|
* <p><a href="https://www.ossez.com/t/java-list/13943">https://www.ossez.com/t/java-list/13943</a></p>
|
||||||
|
*
|
||||||
|
* @author YuCheng
|
||||||
|
*/
|
||||||
|
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||||
public class ReverseIteratorUnitTest {
|
public class ReverseIteratorUnitTest {
|
||||||
|
|
||||||
private final ReverseIterator reverseIterator = new ReverseIterator();
|
private final ReverseIterator reverseIterator = new ReverseIterator();
|
||||||
|
|
Loading…
Reference in New Issue