Permalink
Browse files

testing

  • Loading branch information...
1 parent 5f2eba0 commit ab4192e293fc52fcf28016adc8078ccd192152f6 @mileschet mileschet committed Jun 3, 2012
View
@@ -16,6 +16,11 @@
<rightPanel />
<splitter proportion="0.5" />
</component>
+ <component name="CoverageDataManager">
+ <SUITE FILE_PATH="coverage/bsync$SyncCoreTest.ic" NAME="SyncCoreTest Coverage Results" MODIFIED="1338757986269" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="true">
+ <FILTER>bravado.sync.test.*</FILTER>
+ </SUITE>
+ </component>
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
@@ -62,39 +67,7 @@
<favorites_list name="bavado" />
</component>
<component name="FileEditorManager">
- <leaf>
- <file leaf-file-name="SyncCoreTest.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/src-test/bravado/sync/test/SyncCoreTest.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="253" column="44" selection-start="8694" selection-end="8695" vertical-scroll-proportion="1.1194267">
- <folding>
- <element signature="imports" expanded="true" />
- <element signature="e#1568#1583#0" expanded="true" />
- <element signature="e#2251#2266#0" expanded="true" />
- <element signature="e#3157#3172#0" expanded="true" />
- <element signature="e#4072#4083#0" expanded="true" />
- <element signature="e#4132#4143#0" expanded="true" />
- <element signature="e#5292#5303#0" expanded="true" />
- <element signature="e#5351#5362#0" expanded="true" />
- <element signature="e#5412#5423#0" expanded="true" />
- <element signature="e#7488#7499#0" expanded="true" />
- <element signature="e#7547#7558#0" expanded="true" />
- <element signature="e#7608#7619#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="pom.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/pom.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="21" column="21" selection-start="784" selection-end="784" vertical-scroll-proportion="0.0">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
+ <leaf />
</component>
<component name="FindManager">
<FindUsagesManager>
@@ -119,11 +92,11 @@
<option value="$PROJECT_DIR$/src/bravado/sync/core/SyncMock1.java" />
<option value="$PROJECT_DIR$/bsync.iml" />
<option value="$PROJECT_DIR$/src/bravado/sync/core/Repository.java" />
- <option value="$PROJECT_DIR$/src-test/bravado/sync/test/MockServer.java" />
<option value="$PROJECT_DIR$/src/bravado/sync/core/SyncToken.java" />
<option value="$PROJECT_DIR$/src-test/bravado/sync/test/MockSyncToken.java" />
- <option value="$PROJECT_DIR$/src/bravado/sync/core/SyncCore.java" />
<option value="$PROJECT_DIR$/src/bravado/sync/core/FileEntry.java" />
+ <option value="$PROJECT_DIR$/src/bravado/sync/core/SyncCore.java" />
+ <option value="$PROJECT_DIR$/src-test/bravado/sync/test/MockServer.java" />
<option value="$PROJECT_DIR$/src-test/bravado/sync/test/SyncCoreTest.java" />
</list>
</option>
@@ -272,6 +245,7 @@
<property name="MemberChooser.copyJavadoc" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="WebServerToolWindowFactoryState" value="false" />
+ <property name="FullScreen" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="GoToClass.includeLibraries" value="false" />
<property name="options.splitter.details.proportions" value="0.2" />
@@ -291,8 +265,8 @@
<recent name="bravado.sync.core" />
</key>
</component>
- <component name="RunManager" selected="JUnit.SyncCoreTest.testGroupingOperations">
- <configuration default="false" name="SyncCoreTest.testBobPutAllFiles" type="JUnit" factoryName="JUnit" temporary="true">
+ <component name="RunManager" selected="JUnit.SyncCoreTest">
+ <configuration default="false" name="SyncCoreTest.testAlgoritmo" type="JUnit" factoryName="JUnit" temporary="true">
<extension name="coverage" enabled="false" merge="false" runner="idea">
<pattern>
<option name="PATTERN" value="bravado.sync.test.*" />
@@ -304,7 +278,7 @@
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="bravado.sync.test" />
<option name="MAIN_CLASS_NAME" value="bravado.sync.test.SyncCoreTest" />
- <option name="METHOD_NAME" value="testBobPutAllFiles" />
+ <option name="METHOD_NAME" value="testAlgoritmo" />
<option name="TEST_OBJECT" value="method" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
@@ -320,7 +294,7 @@
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
- <configuration default="false" name="SyncCoreTest.testNotIn" type="JUnit" factoryName="JUnit" temporary="true">
+ <configuration default="false" name="SyncCoreTest.testCoreSync" type="JUnit" factoryName="JUnit" temporary="true">
<extension name="coverage" enabled="false" merge="false" runner="idea">
<pattern>
<option name="PATTERN" value="bravado.sync.test.*" />
@@ -332,7 +306,7 @@
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="bravado.sync.test" />
<option name="MAIN_CLASS_NAME" value="bravado.sync.test.SyncCoreTest" />
- <option name="METHOD_NAME" value="testNotIn" />
+ <option name="METHOD_NAME" value="testCoreSync" />
<option name="TEST_OBJECT" value="method" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
@@ -348,7 +322,7 @@
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
- <configuration default="false" name="SyncCoreTest.testAlgoritmo" type="JUnit" factoryName="JUnit" temporary="true">
+ <configuration default="false" name="SyncCoreTest.testGroupingOperations" type="JUnit" factoryName="JUnit" temporary="true">
<extension name="coverage" enabled="false" merge="false" runner="idea">
<pattern>
<option name="PATTERN" value="bravado.sync.test.*" />
@@ -360,7 +334,7 @@
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="bravado.sync.test" />
<option name="MAIN_CLASS_NAME" value="bravado.sync.test.SyncCoreTest" />
- <option name="METHOD_NAME" value="testAlgoritmo" />
+ <option name="METHOD_NAME" value="testGroupingOperations" />
<option name="TEST_OBJECT" value="method" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
@@ -376,7 +350,7 @@
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
- <configuration default="false" name="SyncCoreTest.testCoreSync" type="JUnit" factoryName="JUnit" temporary="true">
+ <configuration default="false" name="SyncCoreTest" type="JUnit" factoryName="JUnit" temporary="true">
<extension name="coverage" enabled="false" merge="false" runner="idea">
<pattern>
<option name="PATTERN" value="bravado.sync.test.*" />
@@ -388,8 +362,8 @@
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="bravado.sync.test" />
<option name="MAIN_CLASS_NAME" value="bravado.sync.test.SyncCoreTest" />
- <option name="METHOD_NAME" value="testCoreSync" />
- <option name="TEST_OBJECT" value="method" />
+ <option name="METHOD_NAME" />
+ <option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
@@ -400,11 +374,13 @@
</option>
<envs />
<patterns />
+ <RunnerSettings RunnerId="Cover" />
<RunnerSettings RunnerId="Run" />
+ <ConfigurationWrapper RunnerId="Cover" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
- <configuration default="false" name="SyncCoreTest.testGroupingOperations" type="JUnit" factoryName="JUnit" temporary="true">
+ <configuration default="false" name="SyncCoreTest.testRepo1PutDeleteAndPut" type="JUnit" factoryName="JUnit" temporary="true">
<extension name="coverage" enabled="false" merge="false" runner="idea">
<pattern>
<option name="PATTERN" value="bravado.sync.test.*" />
@@ -416,7 +392,7 @@
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="bravado.sync.test" />
<option name="MAIN_CLASS_NAME" value="bravado.sync.test.SyncCoreTest" />
- <option name="METHOD_NAME" value="testGroupingOperations" />
+ <option name="METHOD_NAME" value="testRepo1PutDeleteAndPut" />
<option name="TEST_OBJECT" value="method" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
@@ -568,11 +544,11 @@
</method>
</configuration>
<list size="5">
- <item index="0" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testBobPutAllFiles" />
- <item index="1" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testNotIn" />
- <item index="2" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testAlgoritmo" />
- <item index="3" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testCoreSync" />
- <item index="4" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testGroupingOperations" />
+ <item index="0" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testAlgoritmo" />
+ <item index="1" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testCoreSync" />
+ <item index="2" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testGroupingOperations" />
+ <item index="3" class="java.lang.String" itemvalue="JUnit.SyncCoreTest" />
+ <item index="4" class="java.lang.String" itemvalue="JUnit.SyncCoreTest.testRepo1PutDeleteAndPut" />
</list>
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
@@ -628,7 +604,7 @@
</component>
<component name="ToolWindowManager">
<frame x="2" y="22" width="1280" height="774" extended-state="6" />
- <editor active="true" />
+ <editor active="false" />
<layout>
<window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
@@ -646,7 +622,7 @@
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33522728" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39935064" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23863636" sideWeight="0.17099236" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23863636" sideWeight="0.17099236" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.8290076" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
@@ -737,17 +713,6 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src-test/bravado/sync/test/MockServer.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="28" column="4" selection-start="471" selection-end="700" vertical-scroll-proportion="0.6433121">
- <folding>
- <element signature="imports" expanded="true" />
- <element signature="e#363#374#0" expanded="true" />
- <element signature="e#440#462#0" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
<entry file="file://$PROJECT_DIR$/src/bravado/sync/core/SyncOperation.java">
<provider selected="true" editor-type-id="text-editor">
<state line="14" column="4" selection-start="274" selection-end="274" vertical-scroll-proportion="0.3343949">
@@ -772,56 +737,67 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/bravado/sync/core/SyncMock1.java">
+ <entry file="file://$PROJECT_DIR$/src/bravado/sync/core/FileEntry.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="189" column="82" selection-start="6315" selection-end="6315" vertical-scroll-proportion="0.46341464">
+ <state line="43" column="16" selection-start="868" selection-end="868" vertical-scroll-proportion="0.85641026">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/bravado/sync/core/SyncCore.java">
+ <entry file="file://$PROJECT_DIR$/src-test/bravado/sync/test/SyncCoreTest.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="8" column="0" selection-start="178" selection-end="212" vertical-scroll-proportion="0.2982456">
+ <state line="189" column="5" selection-start="6551" selection-end="6551" vertical-scroll-proportion="0.31050956">
<folding>
- <element signature="e#669#684#0" expanded="true" />
+ <element signature="imports" expanded="true" />
+ <element signature="e#1568#1583#0" expanded="true" />
+ <element signature="e#2301#2316#0" expanded="true" />
+ <element signature="e#3216#3227#0" expanded="true" />
+ <element signature="e#3276#3287#0" expanded="true" />
+ <element signature="e#4436#4447#0" expanded="true" />
+ <element signature="e#4495#4506#0" expanded="true" />
+ <element signature="e#4556#4567#0" expanded="true" />
+ <element signature="e#6632#6643#0" expanded="true" />
+ <element signature="e#6691#6702#0" expanded="true" />
+ <element signature="e#6752#6763#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/bravado/sync/core/FileEntry.java">
+ <entry file="file://$PROJECT_DIR$/src-test/bravado/sync/test/MockServer.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="43" column="16" selection-start="868" selection-end="868" vertical-scroll-proportion="0.85641026">
- <folding />
+ <state line="32" column="28" selection-start="831" selection-end="831" vertical-scroll-proportion="0.7643312">
+ <folding>
+ <element signature="imports" expanded="true" />
+ <element signature="e#416#427#0" expanded="true" />
+ <element signature="e#522#550#0" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/pom.xml">
+ <entry file="file://$PROJECT_DIR$/src/bravado/sync/core/SyncMock1.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="21" column="21" selection-start="784" selection-end="784" vertical-scroll-proportion="0.0">
+ <state line="189" column="82" selection-start="6315" selection-end="6315" vertical-scroll-proportion="0.07317073">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src-test/bravado/sync/test/SyncCoreTest.java">
+ <entry file="file://$PROJECT_DIR$/src/bravado/sync/core/SyncCore.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="253" column="44" selection-start="8694" selection-end="8695" vertical-scroll-proportion="1.1194267">
+ <state line="33" column="31" selection-start="806" selection-end="806" vertical-scroll-proportion="0.18789808">
<folding>
<element signature="imports" expanded="true" />
- <element signature="e#1568#1583#0" expanded="true" />
- <element signature="e#2251#2266#0" expanded="true" />
- <element signature="e#3157#3172#0" expanded="true" />
- <element signature="e#4072#4083#0" expanded="true" />
- <element signature="e#4132#4143#0" expanded="true" />
- <element signature="e#5292#5303#0" expanded="true" />
- <element signature="e#5351#5362#0" expanded="true" />
- <element signature="e#5412#5423#0" expanded="true" />
- <element signature="e#7488#7499#0" expanded="true" />
- <element signature="e#7547#7558#0" expanded="true" />
- <element signature="e#7608#7619#0" expanded="true" />
+ <element signature="e#927#942#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/pom.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="21" column="21" selection-start="784" selection-end="784" vertical-scroll-proportion="0.50159234">
+ <folding />
+ </state>
+ </provider>
+ </entry>
</component>
<component name="masterDetails">
<states>
@@ -14,22 +14,30 @@
* 6/2/12 5:11 PM
*/
public class MockServer extends SyncCore {
-
+
+ private static String SERVER_REPOSITORY = "server";
+
public List<FileEntry> serverFiles = new ArrayList<FileEntry>();
- public HashMap<SyncToken, FileEntry> history = new HashMap<SyncToken, FileEntry>();
+ // user, FileEntry
+ public HashMap<SyncToken, List<FileEntry>> history = new HashMap<SyncToken, List<FileEntry>>();
- public void addFile(SyncToken repo, FileEntry fileEntry) {
+ public void addFile(SyncToken syncToken, FileEntry fileEntry) {
serverFiles.add(fileEntry);
- history.put(repo, fileEntry);
+ getServerRepositoryHistory(syncToken).add(fileEntry);
}
public void addFile(FileEntry fileEntry) {
serverFiles.add(fileEntry);
}
@Override
- protected HashMap<SyncToken, FileEntry> getServerRepositoryHistory() {
- return history;
+ protected List<FileEntry> getServerRepositoryHistory(SyncToken syncToken) {
+ List<FileEntry> listFileEntry = history.get(syncToken);
+ if (listFileEntry == null) {
+ listFileEntry = new ArrayList<FileEntry>();
+ history.put(syncToken, listFileEntry);
+ }
+ return listFileEntry;
}
@Override
Oops, something went wrong.

0 comments on commit ab4192e

Please sign in to comment.