r/badcode • • Jul 08 '19

c# While reviewing code today...

Post image
696 Upvotes

57 comments sorted by

View all comments

116

u/campbellm Jul 08 '19

I'm almost tempted to ask what the unit test looks like

138

u/Kidiri90 Jul 08 '19

unit test

What's that?

55

u/SanityNotFound Jul 08 '19

Well, it.. you know, tests.. units.

43

u/SheepLinux Jul 08 '19

instructions unclear; dick stuck in toaster...

22

u/overkill Jul 08 '19

Spoken like a true QA.

1

u/GideonMax Jan 02 '20

A unit test is code whose purpose is to test code you made.

For example, if you made a function that multiplies a number by two, the unit test will feed the function some numbers and check the outputs

22

u/iamthemisionman Jul 08 '19

Diver.Url == Driver.Url;

17

u/jarfil Jul 08 '19 edited Dec 02 '23

CENSORED

9

u/christian-mann Jul 09 '19

you mean GotToUrl(url);

19

u/andesz Jul 08 '19

i'll give an update when that hits the VCS :D

5

u/mfb- Jul 09 '19

It checks if Driver.Url == Driver.Url.