Alonso-del-Arte / toy-examples

Just a random assortment of classic object-oriented programming toy examples, some more fleshed out than others.
GNU General Public License v3.0
2 stars 6 forks source link

toString() for currency amounts between $0 and $1 #1

Closed Alonso-del-Arte closed 5 years ago

Alonso-del-Arte commented 5 years ago

An amount like 0 dollars and 47 cents should have CurrencyAmount.toString() return either "$0.47" or "$.47".

This is easy enough that I could do this myself, but I figured it would be a good first issue for Hacktoberfest participants.

fsabr commented 5 years ago

I can take this up. How do I run tests?

Alonso-del-Arte commented 5 years ago

Only CurrencyAmount and CurrencyAmountTest. On this one you may change the test class if you prefer "$.47" to "$0.47".

On Tue, Oct 1, 2019 at 1:24 PM Abraham Francis notifications@github.com wrote:

I can take this up. Which files should I look at?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Alonso-del-Arte/toy-examples/issues/1?email_source=notifications&email_token=AHDSGAQIK4SNC3ZBXS633M3QMOBUZA5CNFSM4I4MPES2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEACB4DA#issuecomment-537140748, or mute the thread https://github.com/notifications/unsubscribe-auth/AHDSGAV6SJ366WJPS22WQUDQMOBUZANCNFSM4I4MPESQ .

-- Alonso del Arte Author at SmashWords.com https://www.smashwords.com/profile/view/AlonsoDelarte Musician at ReverbNation.com http://www.reverbnation.com/alonsodelarte

Alonso-del-Arte commented 5 years ago

If you're using IntelliJ and I set this up correctly, hopefully you can just run the tests by clicking green arrows on CurrencyAmountTest. If you're using NetBeans I might be able to help you figure out how to connect the tests. But if you're using Eclipse, you're on your own.

fsabr commented 5 years ago

I installed IntelliJ. I can't figure out how to run tests. I cannot find any green arrows. If I select Build or Run, I get a prompt to setup configuration for it.

I've manually run #4 and I think it works. Please look into it.