diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..ba9629c
Binary files /dev/null and b/.DS_Store differ
diff --git a/LogginLab1.iml b/LogginLab1.iml
new file mode 100644
index 0000000..eb56831
--- /dev/null
+++ b/LogginLab1.iml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 68a484b..b24ca72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,6 +27,10 @@
test
+
+ 19
+ 19
+
\ No newline at end of file
diff --git a/src/.DS_Store b/src/.DS_Store
new file mode 100644
index 0000000..1e24b29
Binary files /dev/null and b/src/.DS_Store differ
diff --git a/src/main/java/LogginLab.java b/src/main/java/LogginLab.java
index 11744ac..aa78cd0 100644
--- a/src/main/java/LogginLab.java
+++ b/src/main/java/LogginLab.java
@@ -32,6 +32,8 @@ public boolean thresholdExceeds(Integer limit) {
return (this.threshold > limit);
}
+ public boolean thresholdReached(Integer limit) { return (this.threshold < limit); }
+
// Write a method called thresholdReached, returns true if argument 'limit' is over the threshold.
// 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 0000000..4b4aae7
Binary files /dev/null and b/src/test/.DS_Store differ
diff --git a/src/test/java/LogginLabTest.java b/src/test/java/LogginLabTest.java
index be1c95f..bd16d6d 100644
--- a/src/test/java/LogginLabTest.java
+++ b/src/test/java/LogginLabTest.java
@@ -21,14 +21,20 @@ public void thresholdExceeds() {
LogginLab lab = new LogginLab();
lab.setThreshold(finalLimit);
- for (Integer i = 1; i <= finalLimit; i++) {
+ for (Integer i = 1; i <= 5; i++) {
if (lab.thresholdExceeds(i)) {
logger.log(Level.INFO, "Threshold not reached! It is "+i);
assertTrue(lab.thresholdExceeds(i));
+ } else if (lab.thresholdReached(i)){
+ logger.log(Level.INFO, "Threshold exceeded Limit!");
+ assertFalse(lab.thresholdExceeds(finalLimit));
} else {
logger.log(Level.INFO, "Threshold finally reached!");
assertFalse(lab.thresholdExceeds(i));
}
}
}
-}
\ No newline at end of file
+}
+
+// Write a method called thresholdReached, returns true if argument 'limit' is over the threshold.
+// Write a test for the method in the Test class.
\ No newline at end of file