Randall Gibson Jr преди 6 години
родител
ревизия
c300491e5a
променени са 13 файла, в които са добавени 427 реда и са изтрити 1 реда
  1. 9
    0
      .idea/FizzBuzz-TDD.iml
  2. 6
    0
      .idea/misc.xml
  3. 8
    0
      .idea/modules.xml
  4. 6
    0
      .idea/vcs.xml
  5. 248
    0
      .idea/workspace.xml
  6. BIN
      FizzBuzzConverter.class
  7. 6
    0
      FizzBuzzConverter.ctxt
  8. 35
    0
      FizzBuzzConverter.java
  9. BIN
      FizzBuzzConverterTest.class
  10. 12
    0
      FizzBuzzConverterTest.ctxt
  11. 56
    0
      FizzBuzzConverterTest.java
  12. 0
    0
      README.TXT
  13. 41
    1
      package.bluej

+ 9
- 0
.idea/FizzBuzz-TDD.iml Целия файл

@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+    <exclude-output />
5
+    <content url="file://$MODULE_DIR$" />
6
+    <orderEntry type="inheritedJdk" />
7
+    <orderEntry type="sourceFolder" forTests="false" />
8
+  </component>
9
+</module>

+ 6
- 0
.idea/misc.xml Целия файл

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="JavaScriptSettings">
4
+    <option name="languageLevel" value="ES6" />
5
+  </component>
6
+</project>

+ 8
- 0
.idea/modules.xml Целия файл

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/.idea/FizzBuzz-TDD.iml" filepath="$PROJECT_DIR$/.idea/FizzBuzz-TDD.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
.idea/vcs.xml Целия файл

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="" vcs="Git" />
5
+  </component>
6
+</project>

+ 248
- 0
.idea/workspace.xml Целия файл

@@ -0,0 +1,248 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="f5f25943-733e-4736-a750-bbb0f9060472" name="Default" comment="">
5
+      <change beforePath="$PROJECT_DIR$/package.bluej" beforeDir="false" afterPath="$PROJECT_DIR$/package.bluej" afterDir="false" />
6
+    </list>
7
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
8
+    <option name="TRACKING_ENABLED" value="true" />
9
+    <option name="SHOW_DIALOG" value="false" />
10
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
11
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
12
+    <option name="LAST_RESOLUTION" value="IGNORE" />
13
+  </component>
14
+  <component name="FileEditorManager">
15
+    <leaf>
16
+      <file leaf-file-name="FizzBuzzConverter.class" pinned="false" current-in-tab="false">
17
+        <entry file="file://$PROJECT_DIR$/FizzBuzzConverter.class">
18
+          <provider selected="true" editor-type-id="text-editor">
19
+            <state>
20
+              <folding>
21
+                <element signature="e#0#260#0" expanded="true" />
22
+              </folding>
23
+            </state>
24
+          </provider>
25
+        </entry>
26
+      </file>
27
+      <file leaf-file-name="FizzBuzzConverterTest.ctxt" pinned="false" current-in-tab="false">
28
+        <entry file="file://$PROJECT_DIR$/FizzBuzzConverterTest.ctxt">
29
+          <provider selected="true" editor-type-id="text-editor" />
30
+        </entry>
31
+      </file>
32
+      <file leaf-file-name="package.bluej" pinned="false" current-in-tab="false">
33
+        <entry file="file://$PROJECT_DIR$/package.bluej">
34
+          <provider selected="true" editor-type-id="text-editor" />
35
+        </entry>
36
+      </file>
37
+      <file leaf-file-name="FizzBuzzConverterTest.class" pinned="false" current-in-tab="true">
38
+        <entry file="file://$PROJECT_DIR$/FizzBuzzConverterTest.class">
39
+          <provider selected="true" editor-type-id="text-editor">
40
+            <state>
41
+              <folding>
42
+                <element signature="e#0#330#0" expanded="true" />
43
+              </folding>
44
+            </state>
45
+          </provider>
46
+        </entry>
47
+      </file>
48
+    </leaf>
49
+  </component>
50
+  <component name="Git.Settings">
51
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
52
+  </component>
53
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
54
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
55
+  <component name="JsGulpfileManager">
56
+    <detection-done>true</detection-done>
57
+    <sorting>DEFINITION_ORDER</sorting>
58
+  </component>
59
+  <component name="NodePackageJsonFileManager">
60
+    <packageJsonPaths />
61
+  </component>
62
+  <component name="ProjectFrameBounds">
63
+    <option name="y" value="23" />
64
+    <option name="width" value="1280" />
65
+    <option name="height" value="726" />
66
+  </component>
67
+  <component name="ProjectView">
68
+    <navigator proportions="" version="1">
69
+      <foldersAlwaysOnTop value="true" />
70
+    </navigator>
71
+    <panes>
72
+      <pane id="PackagesPane" />
73
+      <pane id="ProjectPane">
74
+        <subPane>
75
+          <expand>
76
+            <path>
77
+              <item name="FizzBuzz-TDD" type="b2602c69:ProjectViewProjectNode" />
78
+              <item name="FizzBuzz-TDD" type="462c0819:PsiDirectoryNode" />
79
+            </path>
80
+          </expand>
81
+          <select />
82
+        </subPane>
83
+      </pane>
84
+      <pane id="Scope" />
85
+      <pane id="AndroidView" />
86
+    </panes>
87
+  </component>
88
+  <component name="PropertiesComponent">
89
+    <property name="WebServerToolWindowFactoryState" value="false" />
90
+    <property name="aspect.path.notification.shown" value="true" />
91
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
92
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
93
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
94
+  </component>
95
+  <component name="RunDashboard">
96
+    <option name="ruleStates">
97
+      <list>
98
+        <RuleState>
99
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
100
+        </RuleState>
101
+        <RuleState>
102
+          <option name="name" value="StatusDashboardGroupingRule" />
103
+        </RuleState>
104
+      </list>
105
+    </option>
106
+  </component>
107
+  <component name="RunManager">
108
+    <configuration default="true" type="Application" factoryName="Application">
109
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
110
+    </configuration>
111
+    <configuration default="true" type="JUnit" factoryName="JUnit">
112
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
113
+      <option name="ALTERNATIVE_JRE_PATH" />
114
+      <option name="PACKAGE_NAME" />
115
+      <option name="MAIN_CLASS_NAME" />
116
+      <option name="METHOD_NAME" />
117
+      <option name="TEST_OBJECT" value="class" />
118
+      <option name="VM_PARAMETERS" value="-ea" />
119
+      <option name="PARAMETERS" />
120
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
121
+      <option name="PASS_PARENT_ENVS" value="true" />
122
+      <option name="TEST_SEARCH_SCOPE">
123
+        <value defaultName="singleModule" />
124
+      </option>
125
+      <patterns />
126
+    </configuration>
127
+    <configuration default="true" type="TestNG" factoryName="TestNG">
128
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
129
+      <option name="ALTERNATIVE_JRE_PATH" />
130
+      <option name="SUITE_NAME" />
131
+      <option name="PACKAGE_NAME" />
132
+      <option name="MAIN_CLASS_NAME" />
133
+      <option name="METHOD_NAME" />
134
+      <option name="GROUP_NAME" />
135
+      <option name="TEST_OBJECT" value="CLASS" />
136
+      <option name="VM_PARAMETERS" value="-ea" />
137
+      <option name="PARAMETERS" />
138
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
139
+      <option name="OUTPUT_DIRECTORY" />
140
+      <option name="PASS_PARENT_ENVS" value="true" />
141
+      <option name="TEST_SEARCH_SCOPE">
142
+        <value defaultName="singleModule" />
143
+      </option>
144
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
145
+      <option name="PROPERTIES_FILE" />
146
+      <properties />
147
+      <listeners />
148
+    </configuration>
149
+  </component>
150
+  <component name="SvnConfiguration">
151
+    <configuration />
152
+  </component>
153
+  <component name="TaskManager">
154
+    <task active="true" id="Default" summary="Default task">
155
+      <changelist id="f5f25943-733e-4736-a750-bbb0f9060472" name="Default" comment="" />
156
+      <created>1530109660853</created>
157
+      <option name="number" value="Default" />
158
+      <option name="presentableId" value="Default" />
159
+      <updated>1530109660853</updated>
160
+      <workItem from="1530109662546" duration="263000" />
161
+    </task>
162
+    <servers />
163
+  </component>
164
+  <component name="TimeTrackingManager">
165
+    <option name="totallyTimeSpent" value="263000" />
166
+  </component>
167
+  <component name="ToolWindowManager">
168
+    <frame x="0" y="23" width="1280" height="726" extended-state="0" />
169
+    <editor active="true" />
170
+    <layout>
171
+      <window_info anchor="right" id="Palette" />
172
+      <window_info anchor="bottom" id="TODO" order="6" />
173
+      <window_info anchor="right" id="Palette&#9;" />
174
+      <window_info id="Image Layers" />
175
+      <window_info anchor="right" id="Capture Analysis" />
176
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
177
+      <window_info anchor="right" id="Maven Projects" />
178
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
179
+      <window_info anchor="bottom" id="Run" order="2" />
180
+      <window_info anchor="bottom" id="Version Control" />
181
+      <window_info anchor="bottom" id="Terminal" />
182
+      <window_info id="Capture Tool" />
183
+      <window_info id="Designer" />
184
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24959612" />
185
+      <window_info anchor="right" id="Database" />
186
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
187
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
188
+      <window_info id="UI Designer" />
189
+      <window_info anchor="right" id="Theme Preview" />
190
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
191
+      <window_info id="Favorites" side_tool="true" />
192
+      <window_info anchor="bottom" id="Find" order="1" />
193
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
194
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
195
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
196
+      <window_info anchor="bottom" id="Message" order="0" />
197
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
198
+    </layout>
199
+  </component>
200
+  <component name="TypeScriptGeneratedFilesManager">
201
+    <option name="version" value="1" />
202
+  </component>
203
+  <component name="VcsContentAnnotationSettings">
204
+    <option name="myLimit" value="2678400000" />
205
+  </component>
206
+  <component name="editorHistoryManager">
207
+    <entry file="file://$PROJECT_DIR$/package.bluej">
208
+      <provider selected="true" editor-type-id="text-editor" />
209
+    </entry>
210
+    <entry file="file://$PROJECT_DIR$/FizzBuzzConverter.class">
211
+      <provider selected="true" editor-type-id="text-editor">
212
+        <state>
213
+          <folding>
214
+            <element signature="e#0#260#0" expanded="true" />
215
+          </folding>
216
+        </state>
217
+      </provider>
218
+    </entry>
219
+    <entry file="file://$PROJECT_DIR$/FizzBuzzConverterTest.ctxt">
220
+      <provider selected="true" editor-type-id="text-editor" />
221
+    </entry>
222
+    <entry file="file://$PROJECT_DIR$/FizzBuzzConverterTest.class">
223
+      <provider selected="true" editor-type-id="text-editor">
224
+        <state>
225
+          <folding>
226
+            <element signature="e#0#330#0" expanded="true" />
227
+          </folding>
228
+        </state>
229
+      </provider>
230
+    </entry>
231
+  </component>
232
+  <component name="masterDetails">
233
+    <states>
234
+      <state key="ProjectJDKs.UI">
235
+        <settings>
236
+          <last-edited>1.8</last-edited>
237
+          <splitter-proportions>
238
+            <option name="proportions">
239
+              <list>
240
+                <option value="0.2" />
241
+              </list>
242
+            </option>
243
+          </splitter-proportions>
244
+        </settings>
245
+      </state>
246
+    </states>
247
+  </component>
248
+</project>

BIN
FizzBuzzConverter.class Целия файл


+ 6
- 0
FizzBuzzConverter.ctxt Целия файл

@@ -0,0 +1,6 @@
1
+#BlueJ class context
2
+comment0.target=FizzBuzzConverter
3
+comment0.text=\n\ Write\ a\ description\ of\ class\ FizzBuzzConverter\ here.\n\n\ @author\ (your\ name)\n\ @version\ (a\ version\ number\ or\ a\ date)\n
4
+comment1.params=y
5
+comment1.target=java.lang.String\ fizzBuzz(int)
6
+numComments=2

+ 35
- 0
FizzBuzzConverter.java Целия файл

@@ -0,0 +1,35 @@
1
+
2
+/**
3
+ * Write a description of class FizzBuzzConverter here.
4
+ *
5
+ * @author (your name)
6
+ * @version (a version number or a date)
7
+ */
8
+public class FizzBuzzConverter
9
+{
10
+   // public fizzBuzz(){}
11
+    
12
+     public String fizzBuzz(int y){
13
+        
14
+        String result ="";
15
+     if(y %5 == 0 && y %3 ==0){
16
+        result = "Fizz Buzz";
17
+     }
18
+     else if(y %3 == 0){
19
+         result = "Fizz";
20
+     
21
+    }
22
+     else if(y %5 == 0){
23
+        return "Buzz";
24
+    }else{
25
+        result =Integer.toString(y);
26
+    }
27
+    return result;
28
+      
29
+    
30
+    
31
+    
32
+    
33
+   }
34
+   
35
+}

BIN
FizzBuzzConverterTest.class Целия файл


+ 12
- 0
FizzBuzzConverterTest.ctxt Целия файл

@@ -0,0 +1,12 @@
1
+#BlueJ class context
2
+comment0.target=FizzBuzzConverterTest
3
+comment0.text=\n\ The\ test\ class\ FizzBuzzConverterTest.\n\n\ @author\ \ (your\ name)\n\ @version\ (a\ version\ number\ or\ a\ date)\n
4
+comment1.params=
5
+comment1.target=void\ fizzBuzzConverterLeavesNormalNumbers()
6
+comment2.params=
7
+comment2.target=void\ fizzBuzzConvertorMultiplesOfThree()
8
+comment3.params=
9
+comment3.target=void\ fizzBuzzConvertorMultiplesOfFive()
10
+comment4.params=
11
+comment4.target=void\ fizzBuzzConvertorMultiplesOfFifthTeen()
12
+numComments=5

+ 56
- 0
FizzBuzzConverterTest.java Целия файл

@@ -0,0 +1,56 @@
1
+
2
+
3
+import static org.junit.Assert.*;
4
+import org.junit.After;
5
+import org.junit.Before;
6
+import org.junit.Test;
7
+
8
+/**
9
+ * The test class FizzBuzzConverterTest.
10
+ *
11
+ * @author  (your name)
12
+ * @version (a version number or a date)
13
+ */
14
+public class FizzBuzzConverterTest
15
+{
16
+    FizzBuzzConverter fizzBu = new FizzBuzzConverter();
17
+    @Test
18
+    public void fizzBuzzConverterLeavesNormalNumbers(){
19
+     int x =2;
20
+     String actual =this.fizzBu.fizzBuzz(x);
21
+     String expected = "2";
22
+     assertEquals(expected,actual);
23
+     
24
+        
25
+    }
26
+    
27
+    @Test
28
+    public void fizzBuzzConvertorMultiplesOfThree(){
29
+    int x = 3;
30
+    String actual = this.fizzBu.fizzBuzz(x);
31
+    String expected = "Fizz";
32
+    assertEquals(expected,actual);
33
+    
34
+    
35
+   }
36
+
37
+    @Test
38
+    public void fizzBuzzConvertorMultiplesOfFive(){
39
+    int x=5;
40
+        String actual = fizzBu.fizzBuzz(x);
41
+        String expected = "Buzz";
42
+    assertEquals(expected, actual);
43
+    
44
+    
45
+  }
46
+
47
+    @Test
48
+    public void fizzBuzzConvertorMultiplesOfFifthTeen(){
49
+    int x = 15;
50
+    String actual = this.fizzBu.fizzBuzz(x);
51
+    String expected = "Fizz Buzz";
52
+    assertEquals(expected, actual);
53
+
54
+
55
+  }
56
+}

+ 0
- 0
README.TXT Целия файл


+ 41
- 1
package.bluej Целия файл

@@ -1,3 +1,43 @@
1 1
 #BlueJ package file
2
-#Thu May 31 13:04:16 EDT 2018
2
+dependency1.from=FizzBuzzConverterTest
3
+dependency1.to=FizzBuzzConverter
4
+dependency1.type=UsesDependency
5
+editor.fx.0.height=726
6
+editor.fx.0.width=800
7
+editor.fx.0.x=341
8
+editor.fx.0.y=58
9
+objectbench.height=101
10
+objectbench.width=461
11
+package.divider.horizontal=0.6
12
+package.divider.vertical=0.8007380073800738
13
+package.editor.height=427
14
+package.editor.width=674
15
+package.editor.x=0
16
+package.editor.y=23
17
+package.frame.height=600
18
+package.frame.width=800
19
+package.numDependencies=1
20
+package.numTargets=2
21
+package.showExtends=true
22
+package.showUses=true
3 23
 project.charset=UTF-8
24
+readme.height=58
25
+readme.name=@README
26
+readme.width=47
27
+readme.x=10
28
+readme.y=10
29
+target1.association=FizzBuzzConverterTest
30
+target1.height=50
31
+target1.name=FizzBuzzConverter
32
+target1.showInterface=false
33
+target1.type=ClassTarget
34
+target1.width=140
35
+target1.x=150
36
+target1.y=160
37
+target2.height=50
38
+target2.name=FizzBuzzConverterTest
39
+target2.showInterface=false
40
+target2.type=UnitTestTargetJunit4
41
+target2.width=140
42
+target2.x=180
43
+target2.y=130