Closed Bug 1261713 Opened 8 years ago Closed 8 years ago

Write unit tests for Switchboard logic

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox47 wontfix, firefox48 fixed)

RESOLVED FIXED
Firefox 48
Tracking Status
firefox47 --- wontfix
firefox48 --- fixed

People

(Reporter: Margaret, Assigned: Margaret)

References

Details

Attachments

(4 files)

      No description provided.
Similar to my comment in bug 1207719, I think we can do more here, but at least this is a start.
Comment on attachment 8737648 [details]
MozReview Request: Bug 1261713 - (Part 1) Add unit test for DeviceUuidFactory.java. r=sebastian

https://reviewboard.mozilla.org/r/44047/#review40631
Attachment #8737648 - Flags: review?(s.kaspari) → review+
Comment on attachment 8737649 [details]
MozReview Request: Bug 1261713 - (Part 2) Refactor isInExperiment and add unit test. r=sebastian

https://reviewboard.mozilla.org/r/44049/#review40633
Attachment #8737649 - Flags: review?(s.kaspari) → review+
Attachment #8737650 - Flags: review?(s.kaspari) → review+
Comment on attachment 8737650 [details]
MozReview Request: Bug 1261713 - (Part 3) Refactor and add tests for extra experiment values support. r=sebastian

https://reviewboard.mozilla.org/r/44051/#review40635

::: mobile/android/tests/background/junit4/src/com/keepsafe/switchboard/TestSwitchboard.java:57
(Diff revision 1)
> +        } catch (JSONException e) {
> +            fail();
> +        }

You can add the exception (or the generic "Exception") to the method signature and the test will fail if this (or any) exception is thrown.
Comment on attachment 8737651 [details]
MozReview Request: Bug 1261713 - (Part 4) Add test for getActiveExperiments. r=sebastian

https://reviewboard.mozilla.org/r/44053/#review40637
Attachment #8737651 - Flags: review?(s.kaspari) → review+
https://hg.mozilla.org/integration/fx-team/rev/ac533e9899b77da4dcb3683440a789cdf06b4fab
Bug 1261713 - (Part 1) Add unit test for DeviceUuidFactory.java. r=sebastian

https://hg.mozilla.org/integration/fx-team/rev/ae1f2e223f22a0961192e4acf85280fdb445621e
Bug 1261713 - (Part 2) Refactor isInExperiment and add unit test. r=sebastian

https://hg.mozilla.org/integration/fx-team/rev/27bd269e54937b99b0eef25ce849400a29c48fdb
Bug 1261713 - (Part 3) Refactor and add tests for extra experiment values support. r=sebastian

https://hg.mozilla.org/integration/fx-team/rev/aedf35fb81d98ad4d53253f1abd680023f2848f1
Bug 1261713 - (Part 4) Add test for getActiveExperiments. r=sebastian
Comment on attachment 8737648 [details]
MozReview Request: Bug 1261713 - (Part 1) Add unit test for DeviceUuidFactory.java. r=sebastian

Required for bug 1270929. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1270929#c9
Attachment #8737648 - Flags: approval-mozilla-beta?
Comment on attachment 8737649 [details]
MozReview Request: Bug 1261713 - (Part 2) Refactor isInExperiment and add unit test. r=sebastian

Required for bug 1270929. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1270929#c9
Attachment #8737649 - Flags: approval-mozilla-beta?
Comment on attachment 8737650 [details]
MozReview Request: Bug 1261713 - (Part 3) Refactor and add tests for extra experiment values support. r=sebastian

Required for bug 1270929. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1270929#c9
Attachment #8737650 - Flags: approval-mozilla-beta?
Comment on attachment 8737651 [details]
MozReview Request: Bug 1261713 - (Part 4) Add test for getActiveExperiments. r=sebastian

Required for bug 1270929. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1270929#c9
Attachment #8737651 - Flags: approval-mozilla-beta?
Comment on attachment 8737648 [details]
MozReview Request: Bug 1261713 - (Part 1) Add unit test for DeviceUuidFactory.java. r=sebastian

We decided to not uplift bug 1270929 to Beta, we'll let this one also ride the Aurora48 to Beta48 train.
Attachment #8737648 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #8737649 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #8737650 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #8737651 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: