-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduced xUnit testing #923
base: develop
Are you sure you want to change the base?
Conversation
When I run the tests for ImageUtil, some tests passed and some failed. That's probably because I'm using the fake test image paths, so when we, for example, want to test if an image can be retrieved to a base64 data, it fails the test. @EjPlatzer Is there any way we can test the file with some real images? |
My first thought is that we should simply put some images in the test project (i.e. literally add a jpg file into the folders of the test project), and use the path of that image for testing. You might also need a minimal base64 string of like a single pixel image to use for testing, but you can just make that a static string in the code. |
xUnit tests were added to the Gordon360 project using the following steps:
Added xUnit tests
Add reference to Gordon360 project
Update framework to match Gordon360
<TargetFramework>
tag and change value to be “net6.0-windows”.Three sample tests (that don't have anything to do with the 360 code base) are included.
Ideas for good candidate functions to write tests for:
private bool CanReadOne()
(found in Gordon360/Auothroization/StateYourBusiness.cs)private bool CanReadAll()
(also in StateYourBusiness)