Elfocrash / Cosmonaut

🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
https://cosmonaut.readthedocs.io
MIT License
341 stars 44 forks source link

Fix #103 #104

Closed tidusjar closed 5 years ago

tidusjar commented 5 years ago

Fix the issue where we currently require the raw sql to have the order by in lowercase.

I could do a .ToLower()/.ToUpper() and that would also fix the issue, but that seems a bit more 'hacky'

Elfocrash commented 5 years ago

Thanks for spotting and fixing this. I have a question though. Are you sure this test is passing? Because after replacing it the order by should be lowercased, at least according to the code.

Elfocrash commented 5 years ago

Ok it turns out I was misusing Fluent Assertions. Should().BeEquivelentTo() is doing case insensitive checks. That sucks. I need to change all the string comparisons to Should().Be() that actually checks the case too. That's why this test is passing even though it should fail.

Could you place change every Should().BeEquivelentTo() check in this test class to be Should().Be() instead please?

tidusjar commented 5 years ago

Very good point, I have changed the expected to match what the code actually now does, and changed the assertions for that class.

Elfocrash commented 5 years ago

Thank you very much for this. Merged.