-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit testing and fix negative coat response display
- Loading branch information
Showing
10 changed files
with
8,162 additions
and
4,073 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6},"path":"app-release.apk","properties":{"packageId":"coatapp.coat","split":"","minSdkVersion":"21"}}] | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":7},"path":"app-release.apk","properties":{"packageId":"coatapp.coat","split":"","minSdkVersion":"21"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package coatapp.coat; | ||
|
||
import org.json.JSONException; | ||
import org.json.JSONObject; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Example local unit test, which will execute on the development machine (host). | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
public class CoatUnitTests { | ||
|
||
@Test | ||
public void coatCheck() throws JSONException { | ||
Home h = new Home(); | ||
JSONObject ForecastHotClearDay = new JSONObject(TestData.ForecastHotClearDay); | ||
boolean ForecastHotClearDayResult = h.ShouldWearACoat(ForecastHotClearDay); | ||
assertEquals(false, ForecastHotClearDayResult); | ||
|
||
JSONObject ForecastHotRain = new JSONObject(TestData.ForecastHotRain); | ||
boolean ForecastHotRainResult = h.ShouldWearACoat(ForecastHotRain); | ||
assertEquals(true, ForecastHotRainResult); | ||
|
||
JSONObject ForecastColdRain = new JSONObject(TestData.ForecastColdRain); | ||
boolean ForecastColdRainResult = h.ShouldWearACoat(ForecastColdRain); | ||
assertEquals(true, ForecastColdRainResult); | ||
|
||
JSONObject ForecastColdClearDay = new JSONObject(TestData.ForecastColdClearDay); | ||
boolean ForecastColdClearDayResult = h.ShouldWearACoat(ForecastColdClearDay); | ||
assertEquals(true, ForecastColdClearDayResult); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.