Skip to content
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

Write a test generator #17

Open
SoftStoneDevelop opened this issue May 28, 2023 · 5 comments
Open

Write a test generator #17

SoftStoneDevelop opened this issue May 28, 2023 · 5 comments
Assignees
Labels

Comments

@SoftStoneDevelop
Copy link
Owner

In order to be sure that all providers work, you need to check the generation on all supported types of providers: both for DbConnection and for specific attributes and specific providers.

And these are essentially the same tests with slight differences. When choosing between "trying to wrap it all in inheritance or composition" or "write a unit test generator" I choose the latter.

@SoftStoneDevelop SoftStoneDevelop self-assigned this Jun 8, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 8, 2023
+ tests generator first implementation

#17
SoftStoneDevelop added a commit that referenced this issue Jun 8, 2023
Generator not analyze code from generated files. So? we create Target proj for generate tests and real Test proj for generate Gedaq in generated tests.

#17
SoftStoneDevelop added a commit that referenced this issue Jun 8, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 8, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 8, 2023
@SoftStoneDevelop
Copy link
Owner Author

What I thought was confirmed: dotnet/roslyn#68483
So, once again: life is pain.
Two options: write in the generator (like File.WriteText) or run a script before building the project with tests, which will generate and files to project.

SoftStoneDevelop added a commit that referenced this issue Jun 8, 2023
+ call at the stage of pre-build of the script "GenerateTests"

#17
@SoftStoneDevelop
Copy link
Owner Author

Generation via script call works acceptable

SoftStoneDevelop added a commit that referenced this issue Jun 8, 2023
+ update nugets
+ parallel tests generation

#17
SoftStoneDevelop added a commit that referenced this issue Jun 9, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 10, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 10, 2023
+ PostgreSQL: returning(Read) instruction tests

#17
SoftStoneDevelop added a commit that referenced this issue Jun 10, 2023
InsertInnerModel tests

#17
SoftStoneDevelop added a commit that referenced this issue Jun 10, 2023
+ returning scalar not null

#17
SoftStoneDevelop added a commit that referenced this issue Jun 10, 2023
+ Returning nullable value tests

#17
SoftStoneDevelop added a commit that referenced this issue Jun 11, 2023
+ DateOnly tests
+ DateTime tests
+ Guid tests
+ IPAdress tests
+ TimeOnly tests
+ TimeSpan tests

#17
This was referenced Jun 11, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 11, 2023
MS SQL DbConnection tests

#17
SoftStoneDevelop added a commit that referenced this issue Jun 12, 2023
MySQL test generation

#17, Resolve #29
This was referenced Jun 12, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 12, 2023
* drop database exception

#17
SoftStoneDevelop added a commit that referenced this issue Jun 13, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 13, 2023
* missed using

#17
SoftStoneDevelop added a commit that referenced this issue Jun 18, 2023
BinaryExport tests

#17
SoftStoneDevelop added a commit that referenced this issue Jun 19, 2023
- NpgsqlDbType.Money tests
- NpgsqlTypes.NpgsqlDbType.Interval tests

#17
SoftStoneDevelop added a commit that referenced this issue Jun 19, 2023
+ line tests
+ polygon tests
+ point tests

#17
@SoftStoneDevelop
Copy link
Owner Author

Tests fail with 'NpgsqlPolygon' types. See: npgsql/npgsql#5112

SoftStoneDevelop added a commit that referenced this issue Jun 19, 2023
+ PostgreSQL: circle tests

#17
SoftStoneDevelop added a commit that referenced this issue Jun 19, 2023
+ box tests

#17
@SoftStoneDevelop
Copy link
Owner Author

Tests fail with 'NpgsqlBox' types. See: npgsql/npgsql#5113

SoftStoneDevelop added a commit that referenced this issue Jun 19, 2023
+ biginteger tests
+ NpgsqlPath tests

#17
@SoftStoneDevelop
Copy link
Owner Author

SoftStoneDevelop commented Jun 19, 2023

Tests fail with 'NpgsqlPath' types. See: npgsql/npgsql#5112

This was referenced Jun 19, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 19, 2023
+ int32 array tests
+ PostgreSQL: support T[] parametrs and columns mapping in query

Resolve #42, #17, #40
This was referenced Jun 19, 2023
SoftStoneDevelop added a commit that referenced this issue Jun 19, 2023
- remove duplicate test

#17
SoftStoneDevelop added a commit that referenced this issue Jun 20, 2023
+ MsSQL insert, select tests
+ MySQL insert, select tests

fix: MsSQL generate code

#17, #44, #43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant