From 26563994e7c9a5b8c4066a5a66b2f13c7c76b1c3 Mon Sep 17 00:00:00 2001 From: Zachary Date: Wed, 1 Mar 2023 10:28:34 -0500 Subject: [PATCH 1/2] I have made changes. --- .DS_Store | Bin 0 -> 6148 bytes src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/java/.idea/.gitignore | 3 +++ src/main/java/.idea/java.iml | 9 +++++++++ src/main/java/.idea/modules.xml | 8 ++++++++ src/main/java/.idea/vcs.xml | 6 ++++++ src/main/java/LogginLab.class | Bin 0 -> 1509 bytes src/main/java/LogginLab.java | 11 +++++++++-- src/test/.DS_Store | Bin 0 -> 6148 bytes src/test/java/.DS_Store | Bin 0 -> 6148 bytes src/test/java/LogginLabTest.java | 2 +- 12 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 .DS_Store create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store create mode 100644 src/main/java/.idea/.gitignore create mode 100644 src/main/java/.idea/java.iml create mode 100644 src/main/java/.idea/modules.xml create mode 100644 src/main/java/.idea/vcs.xml create mode 100644 src/main/java/LogginLab.class create mode 100644 src/test/.DS_Store create mode 100644 src/test/java/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..efc21ae25b4dcba55a98d71e59ee6aed8b9fc029 GIT binary patch literal 6148 zcmeHK!EO^V5FIBe*;R#<14wW{vcxqCDXEGoE=x!c9Jq858~}xEH-Z)0b(BpAQWR!j5L1Z@r=EGw(K<#ss23OBWe**0A;L&D6SE1XWf#T_v`?b z?c+P0QvND8CrQ2)EsopB0Iyw>CS*tydTn!#@HG5%r}@oY4k zm;KT7J=fkClP7C?l)TNxi(%{DOH<57Suvj4ge)B+e=0#fC+}Je)VGs^m z50}f{;XzyP^`7mo+Io5TwAf%EED#!>be+ i_9{j!U&RlgR^Zoc03(l;LwF$aBVcKeLKyg`3|s<_+-+b0 literal 0 HcmV?d00001 diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..11c1187f02ce44a8ab46c80ef3026410209e43e6 GIT binary patch literal 6148 zcmeHK&r2IY6n>+t*(gE|Ewr}YqdxdK8s$IV?Ky;1{osw9b-;d7K=l{ZY5^;k(YuIL-S5laTiM2>Jap z&3k&((Zjq~nB2%Z{JLN7Ha?HX?cJSbu-X2)J!uBx-K|zL*lzDkCUyVg`o_1z?qznB z>pzxvg^S6^n&1Qc#pJP|n`n?{IzNYv<2@>=PX(1Tg#3eVnh=SbA3~&{8A4FEleuF+ zj)uQFca^z<90QJl*D}EOLjYwA1uKi@>cC)H0H6o65zNi6KQLeeFchpT!U9n?6=+kH zv=~Y{2W8XY4<){`XwylVFJmA1vXTx(N#mgc6HY3$=tjqYV_=$rMZ0Y9`+tBl{6haf zo#a-I0mr~xF`&HtXupG!z^c2d%ag{}rf2hrr6Bme*a literal 0 HcmV?d00001 diff --git a/src/main/.DS_Store b/src/main/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7509e116b44038d67d6eeaff67d4417cd2367cdb GIT binary patch literal 6148 zcmeHK!AiqG5Z!I7O({YT3VK`cTC}yLQoO`k4_=MvL8T_PXf$R^lQxG^$X$QPAMtl| zW_MH2>PZkOGcfx$vojm!ZP>{$#&~DkuQOI*j9H+Fxe^TD2(F_pNX}UDfE@QY3FNI8 zNDrQILz4f`0G?feJusI|nEU1Y4q33EKOBryfZrd0%hiP+_GQwMQHW43~o9HuESy7HvXwb9nQFVGwfsD%uR>F zP2<6Za%bGuNFy;o418t)dq0p0*8k(5`+wy`12I4hEGGlJ&~>^U$j#K&g)Fhw3eX!+ q6!c3q&O>0LN-_9iDc%HC0(OBDK-*xd5iB6|BcN!Yff)Ex20j3-J5=ld literal 0 HcmV?d00001 diff --git a/src/main/java/.idea/.gitignore b/src/main/java/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/src/main/java/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/src/main/java/.idea/java.iml b/src/main/java/.idea/java.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/src/main/java/.idea/java.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/.idea/modules.xml b/src/main/java/.idea/modules.xml new file mode 100644 index 0000000..a127731 --- /dev/null +++ b/src/main/java/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/java/.idea/vcs.xml b/src/main/java/.idea/vcs.xml new file mode 100644 index 0000000..c2365ab --- /dev/null +++ b/src/main/java/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/main/java/LogginLab.class b/src/main/java/LogginLab.class new file mode 100644 index 0000000000000000000000000000000000000000..b4e8dd7abf870e13473b68557c1fe38f6ac25600 GIT binary patch literal 1509 zcmZuxTT|0O7(MANZH%Q9xrn#mjZ(CDzkwIPqSaa)is7T#9egn9QnubA4YA9eTgDi@2n9kq~&Zbe)FoSdQ z<$M|!+a#dk_=2}3&z$90{w)RZ!ql3A#G>023I?i{BWm4^b>Xd=>o#{1 z8>Zzb7%9BiMN{`ZhMSca^_K8gqhP~@sa?1zoZi_38!7ZbNxIxl;^lV@A(|Z-x*ztr zg8g;hY`lJCz6n!}?yd;4(H7L6o@>~lPOa{Cy@pt_q^hi}l;u>-^^&ZjjuDKinA33+ zw{#r9u#P;2RNU5a2lG^UU)Z*5Jas+0IiX@f$0F|PD9f{fRpEISi)EBO&-EsBEXnP` zn(G^N*H|!{;emo@MLt?)-Z!3GZ)C;K7+U77Fq*D2=^NdSFzW9+zStLG$*JQW?z8PXvQ$)bJitR8RXk!@1Fr-YSYCf6 z8b0%jw!$_kP&ZAxE0$l%qF4Gia~ofadHMB)%Y-Pi;XBmg#(Ed#UC3 zZ7-8~oy&-R1WD2lkTl2K2ATa3|AU4}c^F5+5OS88CX3$?|HMTvvsAD-#_=eQag?Ht zQ&fy|syIzGQ5Y@QJ zq~;tcPW(?K8A7uDM5jqKNusHUD2 limit) + if (this.threshold > limit) return true; else return false; } - + public boolean thresholdReached(Integer limit) { + if (limit > this.threshold) + return true; + else + return false; + } // Write a method called thresholdReached, returns true if argument 'limit' is over the threshold. // use thresholdExceeds for a pattern. // Write a test for the method in the Test class. } + + diff --git a/src/test/.DS_Store b/src/test/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7509e116b44038d67d6eeaff67d4417cd2367cdb GIT binary patch literal 6148 zcmeHK!AiqG5Z!I7O({YT3VK`cTC}yLQoO`k4_=MvL8T_PXf$R^lQxG^$X$QPAMtl| zW_MH2>PZkOGcfx$vojm!ZP>{$#&~DkuQOI*j9H+Fxe^TD2(F_pNX}UDfE@QY3FNI8 zNDrQILz4f`0G?feJusI|nEU1Y4q33EKOBryfZrd0%hiP+_GQwMQHW43~o9HuESy7HvXwb9nQFVGwfsD%uR>F zP2<6Za%bGuNFy;o418t)dq0p0*8k(5`+wy`12I4hEGGlJ&~>^U$j#K&g)Fhw3eX!+ q6!c3q&O>0LN-_9iDc%HC0(OBDK-*xd5iB6|BcN!Yff)Ex20j3-J5=ld literal 0 HcmV?d00001 diff --git a/src/test/java/.DS_Store b/src/test/java/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f8c2565618d17a683f25592d9b69a7ada108a868 GIT binary patch literal 6148 zcmeHKJx{|x41HHR6tPrHj5jk-_yZ^lBTL5C0ZWWH@^H6f4VP@DS%~mr`pZ^_D6kac#m?3I|$>87rmuh^j(=lmRg_Y!lK$ P@ecu|!HqNUrwn`nNlHk{ literal 0 HcmV?d00001 diff --git a/src/test/java/LogginLabTest.java b/src/test/java/LogginLabTest.java index be1c95f..6521cc7 100644 --- a/src/test/java/LogginLabTest.java +++ b/src/test/java/LogginLabTest.java @@ -27,7 +27,7 @@ public void thresholdExceeds() { assertTrue(lab.thresholdExceeds(i)); } else { logger.log(Level.INFO, "Threshold finally reached!"); - assertFalse(lab.thresholdExceeds(i)); + assertFalse(lab.thresholdReached(i)); } } } From f2c3c3ee501a723194d7f00049d9d02e5ea26999 Mon Sep 17 00:00:00 2001 From: Zachary Date: Wed, 1 Mar 2023 13:59:14 -0500 Subject: [PATCH 2/2] updated to add my own method over 9000 --- src/test/java/LogginLabTest.java | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/test/java/LogginLabTest.java b/src/test/java/LogginLabTest.java index 6521cc7..b156b4d 100644 --- a/src/test/java/LogginLabTest.java +++ b/src/test/java/LogginLabTest.java @@ -16,7 +16,7 @@ public void tearDown() throws Exception { @org.junit.Test public void thresholdExceeds() { - Integer finalLimit = 5; + Integer finalLimit = 9001; LogginLab lab = new LogginLab(); lab.setThreshold(finalLimit); @@ -27,8 +27,25 @@ public void thresholdExceeds() { assertTrue(lab.thresholdExceeds(i)); } else { logger.log(Level.INFO, "Threshold finally reached!"); + assertFalse(lab.thresholdExceeds(i)); + } + } + } + @org.junit.Test + public void thresholdReached(){ + Integer finalLimit = 9001; + + LogginLab lab = new LogginLab(); + lab.setThreshold(finalLimit); + + for (Integer i = 1; i <= finalLimit; i++){ + if (lab.thresholdReached(i)) { + logger.log(Level.INFO, "Pitiful Power" + i); + assertTrue(lab.thresholdReached(i)); + }else { + logger.log(Level.INFO, "It's over 9000!"); assertFalse(lab.thresholdReached(i)); } + } } } -} \ No newline at end of file