I have a simple lambda that is basically x => "Error: "+x+"."
.
I was just wondering if this was worth a test. It's really just a one-liner, so there's not much that can go wrong.
Should I write a test?
I have a simple lambda that is basically x => "Error: "+x+"."
.
I was just wondering if this was worth a test. It's really just a one-liner, so there's not much that can go wrong.
Should I write a test?
It's about behavior not structure.
Being a lambda isn't the point. Being a one liner isn't the point.
The point is your behavior is well tested string concatenation. Without a requirement I say move along. Nothing interesting to see here.
You can cram an entire operating system into a one liner or a lambda. Stop getting distracted by structure.