1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

[SM-151] Move EF Dapper tests to Infrastructure.EFIntegration.Test (#2204)

This commit is contained in:
Oscar Hinton 2022-08-29 15:40:59 +02:00 committed by GitHub
parent 2b2f9fafd2
commit 194c695cd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
104 changed files with 4098 additions and 1898 deletions

View File

@ -92,6 +92,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTestCommon", "te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Scim", "bitwarden_license\src\Scim\Scim.csproj", "{BC3B3F8C-621A-4CB8-9563-6EC0A2C8C747}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure.EFIntegration.Test", "test\Infrastructure.EFIntegration.Test\Infrastructure.EFIntegration.Test.csproj", "{7EFB1124-F40A-40EB-9EDA-94FD540AA8FD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -220,6 +222,10 @@ Global
{BC3B3F8C-621A-4CB8-9563-6EC0A2C8C747}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC3B3F8C-621A-4CB8-9563-6EC0A2C8C747}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC3B3F8C-621A-4CB8-9563-6EC0A2C8C747}.Release|Any CPU.Build.0 = Release|Any CPU
{7EFB1124-F40A-40EB-9EDA-94FD540AA8FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7EFB1124-F40A-40EB-9EDA-94FD540AA8FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EFB1124-F40A-40EB-9EDA-94FD540AA8FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EFB1124-F40A-40EB-9EDA-94FD540AA8FD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -255,6 +261,7 @@ Global
{0D3B2BD2-53F3-421D-AD8F-C19B954C796B} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F}
{0923DE59-5FB1-44F2-9302-A09D2236B470} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F}
{BC3B3F8C-621A-4CB8-9563-6EC0A2C8C747} = {4FDB6543-F68B-4202-9EA6-7FEA984D2D0A}
{7EFB1124-F40A-40EB-9EDA-94FD540AA8FD} = {DD5BD056-4AAE-43EF-BBD2-0B569B8DA84F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E01CBF68-2E20-425F-9EDB-E0A6510CA92F}

View File

@ -2981,7 +2981,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2990,7 +2990,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -3000,9 +3000,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -2851,7 +2851,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2860,7 +2860,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -2870,9 +2870,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -82,23 +82,6 @@
"xunit.extensibility.core": "[2.2.0, 3.0.0)"
}
},
"AutoMapper": {
"type": "Transitive",
"resolved": "11.0.0",
"contentHash": "+596AnKykYCk9RxXCEF4GYuapSebQtFVvIA1oVG1rrRkCLAC7AkWehJ0brCfYUbdDW3v1H/p0W3hob7JoXGjMw==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"AutoMapper.Extensions.Microsoft.DependencyInjection": {
"type": "Transitive",
"resolved": "11.0.0",
"contentHash": "0asw5WxdCFh2OTi9Gv+oKyH9SzxwYQSnO8TV5Dd0GggovILzJW4UimP26JAcxc3yB5NnC5urooZ1BBs8ElpiBw==",
"dependencies": {
"AutoMapper": "11.0.0",
"Microsoft.Extensions.Options": "6.0.0"
}
},
"AWSSDK.Core": {
"type": "Transitive",
"resolved": "3.7.10.11",
@ -122,8 +105,8 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.24.0",
"contentHash": "+/qI1j2oU1S4/nvxb2k/wDsol00iGf1AyJX5g3epV7eOpQEP/2xcgh/cxgKMeFgn3U2fmgSiBnQZdkV+l5y0Uw==",
"resolved": "1.22.0",
"contentHash": "ze/xRCHSSDe5TIk5vBDbVrauW1EN7UIbnBvIBfMH8KSt/I9+/7yPAjTBDgNBk0IwG6WBV+BBHp4IUtS/PGAQwQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.Diagnostics.DiagnosticSource": "4.6.0",
@ -158,16 +141,6 @@
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"Azure.Messaging.EventGrid": {
"type": "Transitive",
"resolved": "4.10.0",
"contentHash": "X3dh3Cek/7wFPUrBJ2KbnkJteGjWvKBoSBmD/uQm8reMIavCFTKhnl95F937eLn/2cSsm5l3oPHtYPFtDerA7Q==",
"dependencies": {
"Azure.Core": "1.24.0",
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
}
},
"Azure.Storage.Blobs": {
"type": "Transitive",
"resolved": "12.11.0",
@ -230,11 +203,6 @@
"System.Xml.XmlDocument": "4.3.0"
}
},
"Dapper": {
"type": "Transitive",
"resolved": "2.0.123",
"contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
},
"Fare": {
"type": "Transitive",
"resolved": "2.1.1",
@ -339,23 +307,6 @@
"Microsoft.NETCore.Platforms": "1.0.1"
}
},
"linq2db": {
"type": "Transitive",
"resolved": "3.7.0",
"contentHash": "iDous2TbSchtALnTLNXQnprmNZF4GrXas0MBz6ZHWkSdilSJjcf26qFM7Qf98Mny0OXHEmNXG/jtIDhoVJ5KmQ==",
"dependencies": {
"System.ComponentModel.Annotations": "4.7.0"
}
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
"resolved": "6.7.1",
"contentHash": "Bb25vUDyFw3nKnf7KY+bauwKGD0hdM7/syodS+IgHdWlcbH9g7tHxYmMa9+DNuL0yy6DFvP6Q3BkClm7zbQdAw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "6.0.0",
"linq2db": "3.7.0"
}
},
"MailKit": {
"type": "Transitive",
"resolved": "3.2.0",
@ -590,44 +541,6 @@
"resolved": "4.0.0",
"contentHash": "wtLlRwQX7YoBUYm25xBjJ3UsuLgycme1xXqDn8t3S5kPCWiZrx8uOkyZHLKzH4kkCiQ9m2/J5JeCKNRbZNn3Qg=="
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "gTh3SJsF5WNjEmG32kYc3U4tjeTIv55QOrwHAJcF/xtrIVMteDHMArGC35N0dw86WFY0v8yFkKYKOIOln4jkfQ==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Abstractions": "6.0.4",
"Microsoft.EntityFrameworkCore.Analyzers": "6.0.4",
"Microsoft.Extensions.Caching.Memory": "6.0.1",
"Microsoft.Extensions.DependencyInjection": "6.0.0",
"Microsoft.Extensions.Logging": "6.0.0",
"System.Collections.Immutable": "6.0.0",
"System.Diagnostics.DiagnosticSource": "6.0.0"
}
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "jycTQF0FUJp10cGWBmtsyFhQNeISU9CltDRKCaNiX4QRSEFzgRgaFN4vAFK0T+G5etmXugyddijE4NWCGtgznQ=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "t12WodVyGGP2CuLo7R1qwcawHY5zlg+GiQzvkceZpsjcFJVyTFFBFDPg1isBtzurLzWsl+G3z5fVXeic90mPxg=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "E867NbEXYRTElBF5ff+1AN5Awa1jkORy/Rrm0ueibaTAV5uw89LsLoH6yTe+b9urZTWMHtLfGd1RDdNjk8+KzA==",
"dependencies": {
"Microsoft.EntityFrameworkCore": "6.0.4",
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w=="
},
"Microsoft.Extensions.Caching.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
@ -638,14 +551,13 @@
},
"Microsoft.Extensions.Caching.Memory": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "B4y+Cev05eMcjf1na0v9gza6GUtahXbtY1JCypIgx3B4Ea/KAgsWyXEmW4q6zMbmTMtKzmPVk09rvFJirvMwTg==",
"resolved": "3.1.8",
"contentHash": "u04q7+tgc8l6pQ5HOcr6scgapkQQHnrhpGoCaaAZd24R36/NxGsGxuhSmhHOrQx9CsBLe2CVBN/4CkLlxtnnXw==",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "6.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"Microsoft.Extensions.Options": "6.0.0",
"Microsoft.Extensions.Primitives": "6.0.0"
"Microsoft.Extensions.Caching.Abstractions": "3.1.8",
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.8",
"Microsoft.Extensions.Logging.Abstractions": "3.1.8",
"Microsoft.Extensions.Options": "3.1.8"
}
},
"Microsoft.Extensions.Caching.StackExchangeRedis": {
@ -937,11 +849,6 @@
"resolved": "7.6.4",
"contentHash": "MSSmA6kIfpgFTtNpOnnayoSj/6KSzHC1U9KOjF7cTA1PG4tZ7rIMi1pvjFc8CmYEvP4cxGl/+vrCn+HpK26HTQ=="
},
"Microsoft.OpenApi": {
"type": "Transitive",
"resolved": "1.2.3",
"contentHash": "Nug3rO+7Kl5/SBAadzSMAVgqDlfGjJZ0GenQrLywJ84XGKO0uRqkunz5Wyl0SDwcR71bAATXvSdbdzPrYRYKGw=="
},
"Microsoft.Spatial": {
"type": "Transitive",
"resolved": "7.6.4",
@ -1007,11 +914,6 @@
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"MySqlConnector": {
"type": "Transitive",
"resolved": "2.1.2",
"contentHash": "JVokQTUNN3WHAu9Vw8ieeq1dXTFokJiig5P0VJ4f439UxRrsPo6SaVWC8Zdm6mkPeQFhZ0/9afdWa02EY/1j/w=="
},
"NETStandard.Library": {
"type": "Transitive",
"resolved": "1.6.1",
@ -1068,25 +970,6 @@
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
},
"Npgsql": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "SJMlOmFHr32oOzVXeHmarGaBKkhi0wHVN/rzuu2tUSJ4Qx2AkHCpr9R/DhLWwDiklqgzFU++9wkFyGJxbx/zzg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "fzgRmBd3nAFvKt/L70sJfFWAdobtwDEeOzOzruJq9og97O8/5B96inQOAgOpYyaUjPYpS4ZS5/bxm3vnOJ0+pQ==",
"dependencies": {
"Microsoft.EntityFrameworkCore": "6.0.4",
"Microsoft.EntityFrameworkCore.Abstractions": "6.0.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql": "6.0.4"
}
},
"NSec.Cryptography": {
"type": "Transitive",
"resolved": "20.2.0",
@ -1122,16 +1005,6 @@
"System.IO.Pipelines": "5.0.1"
}
},
"Pomelo.EntityFrameworkCore.MySql": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "sFIo5e9RmQoCTEvH6EeSV8ptmX3dw/6XgyD8R93X/i7A9+XCeG9KTjSNjrszVjVOtCu/eyvYqqcv2uZ/BHhlYA==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "[6.0.1, 7.0.0)",
"Microsoft.Extensions.DependencyInjection": "6.0.0",
"MySqlConnector": "2.1.2"
}
},
"Portable.BouncyCastle": {
"type": "Transitive",
"resolved": "1.9.0",
@ -1176,16 +1049,6 @@
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "9kyFSIdN3T0qjDQ2R0HRXYIhS3l5psBzQi6qqhdLz+SzFyEy4sVxNOke+yyYv8Cu8rPER12c3RDjLT8wF3WBYQ==",
"dependencies": {
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni": "4.4.0",
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni": "4.4.0",
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni": "4.4.0"
}
},
"runtime.native.System.IO.Compression": {
"type": "Transitive",
"resolved": "4.3.0",
@ -1278,21 +1141,6 @@
"resolved": "4.3.2",
"contentHash": "leXiwfiIkW7Gmn7cgnNcdtNAU70SjmKW3jxGj1iKHOvdn0zRWsgv/l2OJUO5zdGdiv2VRFnAsxxhDgMzofPdWg=="
},
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "LbrynESTp3bm5O/+jGL8v0Qg5SJlTV08lpIpFesXjF6uGNMWqFnUQbYBJwZTeua6E/Y7FIM1C54Ey1btLWupdg=="
},
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "38ugOfkYJqJoX9g6EYRlZB5U2ZJH51UP8ptxZgdpS07FgOEToV+lS11ouNK2PM12Pr6X/PpT5jK82G3DwH/SxQ=="
},
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "YhEdSQUsTx+C8m8Bw7ar5/VesXvCFMItyZF7G1AUY+OM0VPZUOeAVpJ4Wl6fydBGUYZxojTDR3I6Bj/+BPkJNA=="
},
"SendGrid": {
"type": "Transitive",
"resolved": "9.27.0",
@ -1487,38 +1335,6 @@
"System.Configuration.ConfigurationManager": "6.0.0"
}
},
"Swashbuckle.AspNetCore": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JFk0+HHUPdjYuPhkpGBMLi2JtnEuWkE2pp0yXQp64DmeMe+Fb0hZyVNq/ENJ2vQNso7Zg+C758WmR/xyAl36bA==",
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
"Swashbuckle.AspNetCore.Swagger": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerUI": "6.3.1"
}
},
"Swashbuckle.AspNetCore.Swagger": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "idAFh4xhyJHYHfdLVOOn+BmscBul1OQbWsnL6YPJE8tO/0y6S79hDCvs6OY5VI093/9+1pYY3j31Zet9yaDZjA==",
"dependencies": {
"Microsoft.OpenApi": "1.2.3"
}
},
"Swashbuckle.AspNetCore.SwaggerGen": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "+uoBV4h/6NhCPLoTofSmuOnZ+usu4PW1jP6l4OHwPyu2frbYXGNpJsHs5uUXXn929OiVQkT8wo3Lj/o+P99Ejg==",
"dependencies": {
"Swashbuckle.AspNetCore.Swagger": "6.3.1"
}
},
"Swashbuckle.AspNetCore.SwaggerUI": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JLm9hN67jh7RHsX3H30+tb432Li8xm/qV5lRyMMkyHYMfWitIuKAAdrpo2ILcHOIeH7CLMuOO2hp/iLBmE+Bkw=="
},
"System.AppContext": {
"type": "Transitive",
"resolved": "4.3.0",
@ -1561,11 +1377,8 @@
},
"System.Collections.Immutable": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"resolved": "1.7.0",
"contentHash": "RVSM6wZUo6L2y6P3vN6gjUtyJ2IF2RVtrepF3J7nrDKfFQd5u/SnSUFclchYQis8/k5scHy9E+fVeKVQLnnkzw=="
},
"System.Collections.NonGeneric": {
"type": "Transitive",
@ -1604,8 +1417,21 @@
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "0YFqjhp/mYkDGpU0Ye1GjE53HMp9UVfGN7seGpAMttAC0C40v5gw598jCgpbBLMmCo0E5YRLBv5Z2doypO49ZQ=="
"resolved": "4.3.0",
"contentHash": "SY2RLItHt43rd8J9D8M8e8NM4m+9WLN2uUd9G0n1I4hj/7w+v3pzK6ZBjexlG1/2xvLKQsqir3UGVSyBTXMLWA==",
"dependencies": {
"System.Collections": "4.3.0",
"System.ComponentModel": "4.3.0",
"System.Globalization": "4.3.0",
"System.Linq": "4.3.0",
"System.Reflection": "4.3.0",
"System.Reflection.Extensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Text.RegularExpressions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.ComponentModel.Primitives": {
"type": "Transitive",
@ -1660,16 +1486,6 @@
"System.Text.Encoding": "4.3.0"
}
},
"System.Data.SqlClient": {
"type": "Transitive",
"resolved": "4.8.3",
"contentHash": "yERfVLXAY0QbylAgaGLByYN0hFxX28aeEQ0hUgJO+Ntn1AfmWl5HHUoYJA0Yl9HhIUUJHVaS/Sw/RLZr5aaC+A==",
"dependencies": {
"Microsoft.Win32.Registry": "4.7.0",
"System.Security.Principal.Windows": "4.7.0",
"runtime.native.System.Data.SqlClient.sni": "4.7.0"
}
},
"System.Diagnostics.Debug": {
"type": "Transitive",
"resolved": "4.3.0",
@ -2951,29 +2767,18 @@
"NETStandard.Library": "1.6.1"
}
},
"api": {
"type": "Project",
"dependencies": {
"Azure.Messaging.EventGrid": "4.10.0",
"Commercial.Core": "2022.8.0",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Swashbuckle.AspNetCore": "6.3.1"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
"Core": "2022.8.4"
}
},
"common": {
"type": "Project",
"dependencies": {
"Api": "2022.8.0",
"AutoFixture.AutoNSubstitute": "4.17.0",
"AutoFixture.Xunit2": "4.17.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0",
"Microsoft.NET.Test.Sdk": "17.1.0",
"NSubstitute": "4.3.0",
@ -3023,44 +2828,16 @@
"core.test": {
"type": "Project",
"dependencies": {
"Api": "2022.8.0",
"AutoFixture.AutoNSubstitute": "4.17.0",
"AutoFixture.Xunit2": "4.17.0",
"Common": "2022.8.0",
"Core": "2022.8.0",
"Common": "2022.8.4",
"Core": "2022.8.4",
"Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0",
"Microsoft.NET.Test.Sdk": "17.1.0",
"Moq": "4.17.2",
"NSubstitute": "4.3.0",
"xunit": "2.4.1"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
"linq2db.EntityFrameworkCore": "6.7.1"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
}
}
}
}

View File

@ -3211,7 +3211,7 @@
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
"Core": "2022.8.4"
}
},
"core": {
@ -3257,7 +3257,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -3266,7 +3266,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -3276,7 +3276,7 @@
"migrator": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.Extensions.Logging": "6.0.0",
"dbup-sqlserver": "4.5.0"
}
@ -3284,9 +3284,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -2723,7 +2723,7 @@
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
"Core": "2022.8.4"
}
},
"core": {
@ -2769,7 +2769,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2778,7 +2778,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -2788,9 +2788,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -3228,7 +3228,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -3237,7 +3237,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -3247,9 +3247,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -2709,7 +2709,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2718,7 +2718,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -2728,9 +2728,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -2709,7 +2709,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2718,7 +2718,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -2728,9 +2728,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -2719,7 +2719,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2728,7 +2728,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -2738,9 +2738,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -2731,7 +2731,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2740,7 +2740,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -2750,9 +2750,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -2759,7 +2759,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2768,7 +2768,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -2778,9 +2778,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -2709,7 +2709,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2718,7 +2718,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",

View File

@ -2948,25 +2948,24 @@
"type": "Project",
"dependencies": {
"Azure.Messaging.EventGrid": "4.10.0",
"Commercial.Core": "2022.8.0",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Commercial.Core": "2022.8.4",
"Core": "2022.8.4",
"SharedWeb": "2022.8.4",
"Swashbuckle.AspNetCore": "6.3.1"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
"Core": "2022.8.4"
}
},
"common": {
"type": "Project",
"dependencies": {
"Api": "2022.8.0",
"AutoFixture.AutoNSubstitute": "4.17.0",
"AutoFixture.Xunit2": "4.17.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0",
"Microsoft.NET.Test.Sdk": "17.1.0",
"NSubstitute": "4.3.0",
@ -3016,7 +3015,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -3025,7 +3024,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -3035,9 +3034,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -132,8 +132,8 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.24.0",
"contentHash": "+/qI1j2oU1S4/nvxb2k/wDsol00iGf1AyJX5g3epV7eOpQEP/2xcgh/cxgKMeFgn3U2fmgSiBnQZdkV+l5y0Uw==",
"resolved": "1.22.0",
"contentHash": "ze/xRCHSSDe5TIk5vBDbVrauW1EN7UIbnBvIBfMH8KSt/I9+/7yPAjTBDgNBk0IwG6WBV+BBHp4IUtS/PGAQwQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.Diagnostics.DiagnosticSource": "4.6.0",
@ -168,16 +168,6 @@
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"Azure.Messaging.EventGrid": {
"type": "Transitive",
"resolved": "4.10.0",
"contentHash": "X3dh3Cek/7wFPUrBJ2KbnkJteGjWvKBoSBmD/uQm8reMIavCFTKhnl95F937eLn/2cSsm5l3oPHtYPFtDerA7Q==",
"dependencies": {
"Azure.Core": "1.24.0",
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
}
},
"Azure.Storage.Blobs": {
"type": "Transitive",
"resolved": "12.11.0",
@ -878,11 +868,6 @@
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w=="
},
"Microsoft.Extensions.Caching.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
@ -1201,11 +1186,6 @@
"resolved": "7.6.4",
"contentHash": "MSSmA6kIfpgFTtNpOnnayoSj/6KSzHC1U9KOjF7cTA1PG4tZ7rIMi1pvjFc8CmYEvP4cxGl/+vrCn+HpK26HTQ=="
},
"Microsoft.OpenApi": {
"type": "Transitive",
"resolved": "1.2.3",
"contentHash": "Nug3rO+7Kl5/SBAadzSMAVgqDlfGjJZ0GenQrLywJ84XGKO0uRqkunz5Wyl0SDwcR71bAATXvSdbdzPrYRYKGw=="
},
"Microsoft.Spatial": {
"type": "Transitive",
"resolved": "7.6.4",
@ -1891,38 +1871,6 @@
"System.Configuration.ConfigurationManager": "6.0.0"
}
},
"Swashbuckle.AspNetCore": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JFk0+HHUPdjYuPhkpGBMLi2JtnEuWkE2pp0yXQp64DmeMe+Fb0hZyVNq/ENJ2vQNso7Zg+C758WmR/xyAl36bA==",
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
"Swashbuckle.AspNetCore.Swagger": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerUI": "6.3.1"
}
},
"Swashbuckle.AspNetCore.Swagger": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "idAFh4xhyJHYHfdLVOOn+BmscBul1OQbWsnL6YPJE8tO/0y6S79hDCvs6OY5VI093/9+1pYY3j31Zet9yaDZjA==",
"dependencies": {
"Microsoft.OpenApi": "1.2.3"
}
},
"Swashbuckle.AspNetCore.SwaggerGen": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "+uoBV4h/6NhCPLoTofSmuOnZ+usu4PW1jP6l4OHwPyu2frbYXGNpJsHs5uUXXn929OiVQkT8wo3Lj/o+P99Ejg==",
"dependencies": {
"Swashbuckle.AspNetCore.Swagger": "6.3.1"
}
},
"Swashbuckle.AspNetCore.SwaggerUI": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JLm9hN67jh7RHsX3H30+tb432Li8xm/qV5lRyMMkyHYMfWitIuKAAdrpo2ILcHOIeH7CLMuOO2hp/iLBmE+Bkw=="
},
"System.AppContext": {
"type": "Transitive",
"resolved": "4.3.0",
@ -3452,37 +3400,20 @@
"NETStandard.Library": "1.6.1"
}
},
"api": {
"type": "Project",
"dependencies": {
"Azure.Messaging.EventGrid": "4.10.0",
"Commercial.Core": "2022.8.0",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Swashbuckle.AspNetCore": "6.3.1"
}
},
"billing": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.VisualStudio.Web.CodeGeneration.Design": "6.0.3",
"SharedWeb": "2022.8.0"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
"SharedWeb": "2022.8.4"
}
},
"common": {
"type": "Project",
"dependencies": {
"Api": "2022.8.0",
"AutoFixture.AutoNSubstitute": "4.17.0",
"AutoFixture.Xunit2": "4.17.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0",
"Microsoft.NET.Test.Sdk": "17.1.0",
"NSubstitute": "4.3.0",
@ -3532,7 +3463,7 @@
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -3541,7 +3472,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -3551,9 +3482,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -1,30 +1,7 @@
using System.Reflection;
using AutoFixture;
using AutoFixture.Kernel;
using AutoFixture.Xunit2;
using Bit.Test.Common.Helpers.Factories;
using AutoFixture;
namespace Bit.Test.Common.AutoFixture
{
public class GlobalSettingsBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var pi = request as ParameterInfo;
var fixture = new Fixture();
if (pi == null || pi.ParameterType != typeof(Bit.Core.Settings.GlobalSettings))
return new NoSpecimen();
return GlobalSettingsFactory.GlobalSettings;
}
}
public class GlobalSettings : ICustomization
{
public void Customize(IFixture fixture)
@ -36,9 +13,4 @@ namespace Bit.Test.Common.AutoFixture
.Without(s => s.DataProtection));
}
}
public class GlobalSettingsCustomizeAttribute : CustomizeAttribute
{
public override ICustomization GetCustomization(ParameterInfo parameter) => new GlobalSettings();
}
}

View File

@ -14,10 +14,9 @@
<PackageReference Include="AutoFixture.Xunit2" Version="$(AutoFixtureXUnit2Version)" />
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="$(AutoFixtureAutoNSubstituteVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="Kralizek.AutoFixture.Extensions.MockHttp" Version="1.2.0"/>
<PackageReference Include="Kralizek.AutoFixture.Extensions.MockHttp" Version="1.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Core\Core.csproj"/>
<ProjectReference Include="..\..\src\Api\Api.csproj"/>
<ProjectReference Include="..\..\src\Core\Core.csproj" />
</ItemGroup>
</Project>

View File

@ -1,16 +0,0 @@
using Bit.Core.Settings;
using Microsoft.Extensions.Configuration;
namespace Bit.Test.Common.Helpers.Factories
{
public static class GlobalSettingsFactory
{
public static GlobalSettings GlobalSettings { get; } = new GlobalSettings();
static GlobalSettingsFactory()
{
var configBuilder = new ConfigurationBuilder().AddUserSecrets<Bit.Api.Startup>();
var Configuration = configBuilder.Build();
ConfigurationBinder.Bind(Configuration.GetSection("GlobalSettings"), GlobalSettings);
}
}
}

View File

@ -97,23 +97,6 @@
"System.ComponentModel.Annotations": "4.3.0"
}
},
"AutoMapper": {
"type": "Transitive",
"resolved": "11.0.0",
"contentHash": "+596AnKykYCk9RxXCEF4GYuapSebQtFVvIA1oVG1rrRkCLAC7AkWehJ0brCfYUbdDW3v1H/p0W3hob7JoXGjMw==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"AutoMapper.Extensions.Microsoft.DependencyInjection": {
"type": "Transitive",
"resolved": "11.0.0",
"contentHash": "0asw5WxdCFh2OTi9Gv+oKyH9SzxwYQSnO8TV5Dd0GggovILzJW4UimP26JAcxc3yB5NnC5urooZ1BBs8ElpiBw==",
"dependencies": {
"AutoMapper": "11.0.0",
"Microsoft.Extensions.Options": "6.0.0"
}
},
"AWSSDK.Core": {
"type": "Transitive",
"resolved": "3.7.10.11",
@ -137,8 +120,8 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.24.0",
"contentHash": "+/qI1j2oU1S4/nvxb2k/wDsol00iGf1AyJX5g3epV7eOpQEP/2xcgh/cxgKMeFgn3U2fmgSiBnQZdkV+l5y0Uw==",
"resolved": "1.22.0",
"contentHash": "ze/xRCHSSDe5TIk5vBDbVrauW1EN7UIbnBvIBfMH8KSt/I9+/7yPAjTBDgNBk0IwG6WBV+BBHp4IUtS/PGAQwQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.Diagnostics.DiagnosticSource": "4.6.0",
@ -173,16 +156,6 @@
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"Azure.Messaging.EventGrid": {
"type": "Transitive",
"resolved": "4.10.0",
"contentHash": "X3dh3Cek/7wFPUrBJ2KbnkJteGjWvKBoSBmD/uQm8reMIavCFTKhnl95F937eLn/2cSsm5l3oPHtYPFtDerA7Q==",
"dependencies": {
"Azure.Core": "1.24.0",
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
}
},
"Azure.Storage.Blobs": {
"type": "Transitive",
"resolved": "12.11.0",
@ -245,11 +218,6 @@
"System.Xml.XmlDocument": "4.3.0"
}
},
"Dapper": {
"type": "Transitive",
"resolved": "2.0.123",
"contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
},
"Fare": {
"type": "Transitive",
"resolved": "2.1.1",
@ -345,23 +313,6 @@
"Microsoft.NETCore.Platforms": "1.0.1"
}
},
"linq2db": {
"type": "Transitive",
"resolved": "3.7.0",
"contentHash": "iDous2TbSchtALnTLNXQnprmNZF4GrXas0MBz6ZHWkSdilSJjcf26qFM7Qf98Mny0OXHEmNXG/jtIDhoVJ5KmQ==",
"dependencies": {
"System.ComponentModel.Annotations": "4.7.0"
}
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
"resolved": "6.7.1",
"contentHash": "Bb25vUDyFw3nKnf7KY+bauwKGD0hdM7/syodS+IgHdWlcbH9g7tHxYmMa9+DNuL0yy6DFvP6Q3BkClm7zbQdAw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "6.0.0",
"linq2db": "3.7.0"
}
},
"MailKit": {
"type": "Transitive",
"resolved": "3.2.0",
@ -596,44 +547,6 @@
"resolved": "4.0.0",
"contentHash": "wtLlRwQX7YoBUYm25xBjJ3UsuLgycme1xXqDn8t3S5kPCWiZrx8uOkyZHLKzH4kkCiQ9m2/J5JeCKNRbZNn3Qg=="
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "gTh3SJsF5WNjEmG32kYc3U4tjeTIv55QOrwHAJcF/xtrIVMteDHMArGC35N0dw86WFY0v8yFkKYKOIOln4jkfQ==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Abstractions": "6.0.4",
"Microsoft.EntityFrameworkCore.Analyzers": "6.0.4",
"Microsoft.Extensions.Caching.Memory": "6.0.1",
"Microsoft.Extensions.DependencyInjection": "6.0.0",
"Microsoft.Extensions.Logging": "6.0.0",
"System.Collections.Immutable": "6.0.0",
"System.Diagnostics.DiagnosticSource": "6.0.0"
}
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "jycTQF0FUJp10cGWBmtsyFhQNeISU9CltDRKCaNiX4QRSEFzgRgaFN4vAFK0T+G5etmXugyddijE4NWCGtgznQ=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "t12WodVyGGP2CuLo7R1qwcawHY5zlg+GiQzvkceZpsjcFJVyTFFBFDPg1isBtzurLzWsl+G3z5fVXeic90mPxg=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "E867NbEXYRTElBF5ff+1AN5Awa1jkORy/Rrm0ueibaTAV5uw89LsLoH6yTe+b9urZTWMHtLfGd1RDdNjk8+KzA==",
"dependencies": {
"Microsoft.EntityFrameworkCore": "6.0.4",
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w=="
},
"Microsoft.Extensions.Caching.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
@ -644,14 +557,13 @@
},
"Microsoft.Extensions.Caching.Memory": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "B4y+Cev05eMcjf1na0v9gza6GUtahXbtY1JCypIgx3B4Ea/KAgsWyXEmW4q6zMbmTMtKzmPVk09rvFJirvMwTg==",
"resolved": "3.1.8",
"contentHash": "u04q7+tgc8l6pQ5HOcr6scgapkQQHnrhpGoCaaAZd24R36/NxGsGxuhSmhHOrQx9CsBLe2CVBN/4CkLlxtnnXw==",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "6.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"Microsoft.Extensions.Options": "6.0.0",
"Microsoft.Extensions.Primitives": "6.0.0"
"Microsoft.Extensions.Caching.Abstractions": "3.1.8",
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.8",
"Microsoft.Extensions.Logging.Abstractions": "3.1.8",
"Microsoft.Extensions.Options": "3.1.8"
}
},
"Microsoft.Extensions.Caching.StackExchangeRedis": {
@ -943,11 +855,6 @@
"resolved": "7.6.4",
"contentHash": "MSSmA6kIfpgFTtNpOnnayoSj/6KSzHC1U9KOjF7cTA1PG4tZ7rIMi1pvjFc8CmYEvP4cxGl/+vrCn+HpK26HTQ=="
},
"Microsoft.OpenApi": {
"type": "Transitive",
"resolved": "1.2.3",
"contentHash": "Nug3rO+7Kl5/SBAadzSMAVgqDlfGjJZ0GenQrLywJ84XGKO0uRqkunz5Wyl0SDwcR71bAATXvSdbdzPrYRYKGw=="
},
"Microsoft.Spatial": {
"type": "Transitive",
"resolved": "7.6.4",
@ -1004,11 +911,6 @@
"System.Security.Cryptography.Pkcs": "6.0.0"
}
},
"MySqlConnector": {
"type": "Transitive",
"resolved": "2.1.2",
"contentHash": "JVokQTUNN3WHAu9Vw8ieeq1dXTFokJiig5P0VJ4f439UxRrsPo6SaVWC8Zdm6mkPeQFhZ0/9afdWa02EY/1j/w=="
},
"NETStandard.Library": {
"type": "Transitive",
"resolved": "1.6.1",
@ -1065,25 +967,6 @@
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
},
"Npgsql": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "SJMlOmFHr32oOzVXeHmarGaBKkhi0wHVN/rzuu2tUSJ4Qx2AkHCpr9R/DhLWwDiklqgzFU++9wkFyGJxbx/zzg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "fzgRmBd3nAFvKt/L70sJfFWAdobtwDEeOzOzruJq9og97O8/5B96inQOAgOpYyaUjPYpS4ZS5/bxm3vnOJ0+pQ==",
"dependencies": {
"Microsoft.EntityFrameworkCore": "6.0.4",
"Microsoft.EntityFrameworkCore.Abstractions": "6.0.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql": "6.0.4"
}
},
"NSec.Cryptography": {
"type": "Transitive",
"resolved": "20.2.0",
@ -1111,16 +994,6 @@
"System.IO.Pipelines": "5.0.1"
}
},
"Pomelo.EntityFrameworkCore.MySql": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "sFIo5e9RmQoCTEvH6EeSV8ptmX3dw/6XgyD8R93X/i7A9+XCeG9KTjSNjrszVjVOtCu/eyvYqqcv2uZ/BHhlYA==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "[6.0.1, 7.0.0)",
"Microsoft.Extensions.DependencyInjection": "6.0.0",
"MySqlConnector": "2.1.2"
}
},
"Portable.BouncyCastle": {
"type": "Transitive",
"resolved": "1.9.0",
@ -1165,16 +1038,6 @@
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "9kyFSIdN3T0qjDQ2R0HRXYIhS3l5psBzQi6qqhdLz+SzFyEy4sVxNOke+yyYv8Cu8rPER12c3RDjLT8wF3WBYQ==",
"dependencies": {
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni": "4.4.0",
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni": "4.4.0",
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni": "4.4.0"
}
},
"runtime.native.System.IO.Compression": {
"type": "Transitive",
"resolved": "4.3.0",
@ -1267,21 +1130,6 @@
"resolved": "4.3.2",
"contentHash": "leXiwfiIkW7Gmn7cgnNcdtNAU70SjmKW3jxGj1iKHOvdn0zRWsgv/l2OJUO5zdGdiv2VRFnAsxxhDgMzofPdWg=="
},
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "LbrynESTp3bm5O/+jGL8v0Qg5SJlTV08lpIpFesXjF6uGNMWqFnUQbYBJwZTeua6E/Y7FIM1C54Ey1btLWupdg=="
},
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "38ugOfkYJqJoX9g6EYRlZB5U2ZJH51UP8ptxZgdpS07FgOEToV+lS11ouNK2PM12Pr6X/PpT5jK82G3DwH/SxQ=="
},
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "YhEdSQUsTx+C8m8Bw7ar5/VesXvCFMItyZF7G1AUY+OM0VPZUOeAVpJ4Wl6fydBGUYZxojTDR3I6Bj/+BPkJNA=="
},
"SendGrid": {
"type": "Transitive",
"resolved": "9.27.0",
@ -1476,38 +1324,6 @@
"System.Configuration.ConfigurationManager": "6.0.0"
}
},
"Swashbuckle.AspNetCore": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JFk0+HHUPdjYuPhkpGBMLi2JtnEuWkE2pp0yXQp64DmeMe+Fb0hZyVNq/ENJ2vQNso7Zg+C758WmR/xyAl36bA==",
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
"Swashbuckle.AspNetCore.Swagger": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerUI": "6.3.1"
}
},
"Swashbuckle.AspNetCore.Swagger": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "idAFh4xhyJHYHfdLVOOn+BmscBul1OQbWsnL6YPJE8tO/0y6S79hDCvs6OY5VI093/9+1pYY3j31Zet9yaDZjA==",
"dependencies": {
"Microsoft.OpenApi": "1.2.3"
}
},
"Swashbuckle.AspNetCore.SwaggerGen": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "+uoBV4h/6NhCPLoTofSmuOnZ+usu4PW1jP6l4OHwPyu2frbYXGNpJsHs5uUXXn929OiVQkT8wo3Lj/o+P99Ejg==",
"dependencies": {
"Swashbuckle.AspNetCore.Swagger": "6.3.1"
}
},
"Swashbuckle.AspNetCore.SwaggerUI": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JLm9hN67jh7RHsX3H30+tb432Li8xm/qV5lRyMMkyHYMfWitIuKAAdrpo2ILcHOIeH7CLMuOO2hp/iLBmE+Bkw=="
},
"System.AppContext": {
"type": "Transitive",
"resolved": "4.3.0",
@ -1550,11 +1366,8 @@
},
"System.Collections.Immutable": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"resolved": "1.7.0",
"contentHash": "RVSM6wZUo6L2y6P3vN6gjUtyJ2IF2RVtrepF3J7nrDKfFQd5u/SnSUFclchYQis8/k5scHy9E+fVeKVQLnnkzw=="
},
"System.Collections.NonGeneric": {
"type": "Transitive",
@ -1593,8 +1406,21 @@
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "0YFqjhp/mYkDGpU0Ye1GjE53HMp9UVfGN7seGpAMttAC0C40v5gw598jCgpbBLMmCo0E5YRLBv5Z2doypO49ZQ=="
"resolved": "4.3.0",
"contentHash": "SY2RLItHt43rd8J9D8M8e8NM4m+9WLN2uUd9G0n1I4hj/7w+v3pzK6ZBjexlG1/2xvLKQsqir3UGVSyBTXMLWA==",
"dependencies": {
"System.Collections": "4.3.0",
"System.ComponentModel": "4.3.0",
"System.Globalization": "4.3.0",
"System.Linq": "4.3.0",
"System.Reflection": "4.3.0",
"System.Reflection.Extensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Text.RegularExpressions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.ComponentModel.Primitives": {
"type": "Transitive",
@ -1649,16 +1475,6 @@
"System.Text.Encoding": "4.3.0"
}
},
"System.Data.SqlClient": {
"type": "Transitive",
"resolved": "4.8.3",
"contentHash": "yERfVLXAY0QbylAgaGLByYN0hFxX28aeEQ0hUgJO+Ntn1AfmWl5HHUoYJA0Yl9HhIUUJHVaS/Sw/RLZr5aaC+A==",
"dependencies": {
"Microsoft.Win32.Registry": "4.7.0",
"System.Security.Principal.Windows": "4.7.0",
"runtime.native.System.Data.SqlClient.sni": "4.7.0"
}
},
"System.Diagnostics.Debug": {
"type": "Transitive",
"resolved": "4.3.0",
@ -2940,22 +2756,6 @@
"NETStandard.Library": "1.6.1"
}
},
"api": {
"type": "Project",
"dependencies": {
"Azure.Messaging.EventGrid": "4.10.0",
"Commercial.Core": "2022.8.0",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Swashbuckle.AspNetCore": "6.3.1"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
}
},
"core": {
"type": "Project",
"dependencies": {
@ -2995,33 +2795,6 @@
"Stripe.net": "40.0.0",
"YubicoDotNetClient": "1.2.0"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
"linq2db.EntityFrameworkCore": "6.7.1"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
}
}
}
}

View File

@ -1,15 +1,5 @@
using System.Text.Json;
using AutoFixture;
using AutoFixture.Kernel;
using AutoFixture;
using Bit.Core.Entities;
using Bit.Core.Models.Data;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.AutoFixture.OrganizationUserFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
using Core.Models.Data;
@ -43,92 +33,6 @@ namespace Bit.Core.Test.AutoFixture.CipherFixtures
}
}
internal class CipherBuilder : ISpecimenBuilder
{
public bool OrganizationOwned { get; set; }
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || (type != typeof(Cipher) && type != typeof(List<Cipher>)))
{
return new NoSpecimen();
}
var fixture = new Fixture();
fixture.Customizations.Insert(0, new MaxLengthStringRelay());
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
if (!OrganizationOwned)
{
fixture.Customize<Cipher>(composer => composer
.Without(c => c.OrganizationId));
}
// Can't test valid Favorites and Folders without creating those values inide each test,
// since we won't have any UserIds until the test is running & creating data
fixture.Customize<Cipher>(c => c
.Without(e => e.Favorites)
.Without(e => e.Folders));
//
var serializerOptions = new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};
if (type == typeof(Cipher))
{
var obj = fixture.WithAutoNSubstitutions().Create<Cipher>();
var cipherData = fixture.WithAutoNSubstitutions().Create<CipherLoginData>();
var cipherAttachements = fixture.WithAutoNSubstitutions().Create<List<CipherAttachment>>();
obj.Data = JsonSerializer.Serialize(cipherData, serializerOptions);
obj.Attachments = JsonSerializer.Serialize(cipherAttachements, serializerOptions);
return obj;
}
if (type == typeof(List<Cipher>))
{
var ciphers = fixture.WithAutoNSubstitutions().CreateMany<Cipher>().ToArray();
for (var i = 0; i < ciphers.Count(); i++)
{
var cipherData = fixture.WithAutoNSubstitutions().Create<CipherLoginData>();
var cipherAttachements = fixture.WithAutoNSubstitutions().Create<List<CipherAttachment>>();
ciphers[i].Data = JsonSerializer.Serialize(cipherData, serializerOptions);
ciphers[i].Attachments = JsonSerializer.Serialize(cipherAttachements, serializerOptions);
}
return ciphers;
}
return new NoSpecimen();
}
}
internal class EfCipher : ICustomization
{
public bool OrganizationOwned { get; set; }
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new CipherBuilder()
{
OrganizationOwned = OrganizationOwned
});
fixture.Customizations.Add(new UserBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new OrganizationUserBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<CipherRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<CollectionRepository>());
}
}
internal class UserCipherAutoDataAttribute : CustomAutoDataAttribute
{
public UserCipherAutoDataAttribute(string userId = null) : base(new SutProviderCustomization(),
@ -162,26 +66,4 @@ namespace Bit.Core.Test.AutoFixture.CipherFixtures
typeof(OrganizationCipher) }, values)
{ }
}
internal class EfUserCipherAutoDataAttribute : CustomAutoDataAttribute
{
public EfUserCipherAutoDataAttribute() : base(new SutProviderCustomization(), new EfCipher())
{ }
}
internal class EfOrganizationCipherAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationCipherAutoDataAttribute() : base(new SutProviderCustomization(), new EfCipher()
{
OrganizationOwned = true,
})
{ }
}
internal class InlineEfCipherAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfCipherAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfCipher) }, values)
{ }
}
}

View File

@ -1,63 +1,8 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.CollectionFixtures
{
internal class CollectionBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Collection))
{
return new NoSpecimen();
}
var fixture = new Fixture();
fixture.Customizations.Insert(0, new MaxLengthStringRelay());
var obj = fixture.WithAutoNSubstitutions().Create<Collection>();
return obj;
}
}
internal class EfCollection : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new CollectionBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<CollectionRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfCollectionAutoDataAttribute : CustomAutoDataAttribute
{
public EfCollectionAutoDataAttribute() : base(new SutProviderCustomization(), new EfCollection())
{ }
}
internal class InlineEfCollectionAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfCollectionAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfCollection) }, values)
{ }
}
internal class CollectionAutoDataAttribute : CustomAutoDataAttribute
{
public CollectionAutoDataAttribute() : base(new SutProviderCustomization(), new OrganizationCustomization())

View File

@ -0,0 +1,32 @@
using System.Reflection;
using AutoFixture;
using AutoFixture.Kernel;
using AutoFixture.Xunit2;
using Bit.Core.Test.Helpers.Factories;
namespace Bit.Test.Common.AutoFixture
{
public class GlobalSettingsBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var pi = request as ParameterInfo;
var fixture = new Fixture();
if (pi == null || pi.ParameterType != typeof(Bit.Core.Settings.GlobalSettings))
return new NoSpecimen();
return GlobalSettingsFactory.GlobalSettings;
}
}
public class GlobalSettingsCustomizeAttribute : CustomizeAttribute
{
public override ICustomization GetCustomization(ParameterInfo parameter) => new GlobalSettings();
}
}

View File

@ -1,11 +1,4 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.GroupFixtures
@ -23,52 +16,4 @@ namespace Bit.Core.Test.AutoFixture.GroupFixtures
new SutProviderCustomization(), new OrganizationCustomization { UseGroups = false })
{ }
}
internal class GroupBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Group))
{
return new NoSpecimen();
}
var fixture = new Fixture();
fixture.Customizations.Insert(0, new MaxLengthStringRelay());
var obj = fixture.WithAutoNSubstitutions().Create<Group>();
return obj;
}
}
internal class EfGroup : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new GroupBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<GroupRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfGroupAutoDataAttribute : CustomAutoDataAttribute
{
public EfGroupAutoDataAttribute() : base(new SutProviderCustomization(), new EfGroup())
{ }
}
internal class InlineEfGroupAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfGroupAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfGroup) }, values)
{ }
}
}

View File

@ -6,9 +6,7 @@ using Bit.Core.Enums;
using Bit.Core.Models;
using Bit.Core.Models.Business;
using Bit.Core.Models.Data;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Utilities;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
@ -128,17 +126,6 @@ namespace Bit.Core.Test.AutoFixture.OrganizationFixtures
}
}
internal class EfOrganization : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class PaidOrganizationAutoDataAttribute : CustomAutoDataAttribute
{
public PaidOrganizationAutoDataAttribute(PlanType planType) : base(new SutProviderCustomization(),
@ -196,17 +183,4 @@ namespace Bit.Core.Test.AutoFixture.OrganizationFixtures
typeof(OrganizationInvite) }, values)
{ }
}
internal class EfOrganizationAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationAutoDataAttribute() : base(new SutProviderCustomization(), new EfOrganization())
{ }
}
internal class InlineEfOrganizationAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfOrganizationAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfOrganization) }, values)
{ }
}
}

View File

@ -1,11 +1,5 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.AutoFixture.OrganizationUserFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.OrganizationSponsorshipFixtures
@ -36,51 +30,4 @@ namespace Bit.Core.Test.AutoFixture.OrganizationSponsorshipFixtures
.With(s => s.ToDelete, true));
}
}
internal class OrganizationSponsorshipBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(OrganizationSponsorship))
{
return new NoSpecimen();
}
var fixture = new Fixture();
var obj = fixture.WithAutoNSubstitutions().Create<OrganizationSponsorship>();
return obj;
}
}
internal class EfOrganizationSponsorship : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new OrganizationSponsorshipBuilder());
fixture.Customizations.Add(new OrganizationUserBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationSponsorshipRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfOrganizationSponsorshipAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationSponsorshipAutoDataAttribute() : base(new SutProviderCustomization(), new EfOrganizationSponsorship(), new EfOrganization())
{ }
}
internal class InlineEfOrganizationSponsorshipAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfOrganizationSponsorshipAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfOrganizationSponsorship), typeof(EfOrganization) }, values)
{ }
}
}

View File

@ -1,62 +1,12 @@
using System.Reflection;
using System.Text.Json;
using AutoFixture;
using AutoFixture.Kernel;
using AutoFixture.Xunit2;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models;
using Bit.Core.Models.Data;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.OrganizationUserFixtures
{
internal class OrganizationUserBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == typeof(OrganizationUserCustomization))
{
var fixture = new Fixture();
var orgUser = fixture.WithAutoNSubstitutions().Create<OrganizationUser>();
var orgUserPermissions = fixture.WithAutoNSubstitutions().Create<Permissions>();
orgUser.Permissions = JsonSerializer.Serialize(orgUserPermissions, new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
});
return orgUser;
}
else if (type == typeof(List<OrganizationUserCustomization>))
{
var fixture = new Fixture();
var orgUsers = fixture.WithAutoNSubstitutions().CreateMany<OrganizationUser>(2);
foreach (var orgUser in orgUsers)
{
var providers = fixture.Create<Dictionary<TwoFactorProviderType, TwoFactorProvider>>();
var orgUserPermissions = fixture.WithAutoNSubstitutions().Create<Permissions>();
orgUser.Permissions = JsonSerializer.Serialize(orgUserPermissions, new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
});
}
return orgUsers;
}
return new NoSpecimen();
}
}
internal class OrganizationUserCustomization : ICustomization
public class OrganizationUserCustomization : ICustomization
{
public OrganizationUserStatusType Status { get; set; }
public OrganizationUserType Type { get; set; }
@ -93,32 +43,4 @@ namespace Bit.Core.Test.AutoFixture.OrganizationUserFixtures
return new OrganizationUserCustomization(_status, _type);
}
}
internal class EfOrganizationUser : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new OrganizationUserBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new UserBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfOrganizationUserAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationUserAutoDataAttribute() : base(new SutProviderCustomization(), new EfOrganizationUser())
{ }
}
internal class InlineEfOrganizationUserAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfOrganizationUserAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfOrganizationUser) }, values)
{ }
}
}

View File

@ -1,14 +1,8 @@
using System.Reflection;
using AutoFixture;
using AutoFixture.Kernel;
using AutoFixture.Xunit2;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.PolicyFixtures
{
@ -44,75 +38,4 @@ namespace Bit.Core.Test.AutoFixture.PolicyFixtures
return new PolicyCustomization(_type);
}
}
internal class PolicyBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Policy))
{
return new NoSpecimen();
}
var fixture = new Fixture();
var obj = fixture.WithAutoNSubstitutions().Create<Policy>();
return obj;
}
}
internal class EfPolicy : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new PolicyBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<PolicyRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfPolicyApplicableToUser : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new PolicyBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<PolicyRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<ProviderRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<ProviderUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<ProviderOrganizationRepository>());
}
}
internal class EfPolicyAutoDataAttribute : CustomAutoDataAttribute
{
public EfPolicyAutoDataAttribute() : base(new SutProviderCustomization(), new EfPolicy())
{ }
}
internal class EfPolicyApplicableToUserInlineAutoDataAttribute : InlineCustomAutoDataAttribute
{
public EfPolicyApplicableToUserInlineAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization), typeof(EfPolicyApplicableToUser) }, values)
{ }
}
internal class InlineEfPolicyAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfPolicyAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfPolicy) }, values)
{ }
}
}

View File

@ -1,12 +1,5 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.SendFixtures
@ -68,63 +61,4 @@ namespace Bit.Core.Test.AutoFixture.SendFixtures
typeof(SutProviderCustomization), typeof(OrganizationSend) }, values)
{ }
}
internal class SendBuilder : ISpecimenBuilder
{
public bool OrganizationOwned { get; set; }
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Send))
{
return new NoSpecimen();
}
var fixture = new Fixture();
fixture.Customizations.Insert(0, new MaxLengthStringRelay());
if (!OrganizationOwned)
{
fixture.Customize<Send>(composer => composer
.Without(c => c.OrganizationId));
}
var obj = fixture.WithAutoNSubstitutions().Create<Send>();
return obj;
}
}
internal class EfSend : ICustomization
{
public bool OrganizationOwned { get; set; }
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new SendBuilder());
fixture.Customizations.Add(new UserBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<SendRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfUserSendAutoDataAttribute : CustomAutoDataAttribute
{
public EfUserSendAutoDataAttribute() : base(new SutProviderCustomization(), new EfSend())
{ }
}
internal class EfOrganizationSendAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationSendAutoDataAttribute() : base(new SutProviderCustomization(), new EfSend()
{
OrganizationOwned = true,
})
{ }
}
}

View File

@ -3,15 +3,12 @@ using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.UserFixtures
{
internal class UserBuilder : ISpecimenBuilder
public class UserBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
@ -45,38 +42,13 @@ namespace Bit.Core.Test.AutoFixture.UserFixtures
}
}
internal class UserFixture : ICustomization
public class UserFixture : ICustomization
{
public virtual void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new UserBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
}
}
internal class EfUser : UserFixture
{
public override void Customize(IFixture fixture)
{
base.Customize(fixture);
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<SsoUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfUserAutoDataAttribute : CustomAutoDataAttribute
{
public EfUserAutoDataAttribute() : base(new SutProviderCustomization(), new EfUser())
{ }
}
internal class InlineEfUserAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfUserAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfUser) }, values)
{ }
}
}

View File

@ -18,17 +18,16 @@
</PackageReference>
<PackageReference Include="AutoFixture.Xunit2" Version="$(AutoFixtureXUnit2Version)" />
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="$(AutoFixtureAutoNSubstituteVersion)" />
<PackageReference Include="Kralizek.AutoFixture.Extensions.MockHttp" Version="1.2.0"/>
<PackageReference Include="Kralizek.AutoFixture.Extensions.MockHttp" Version="1.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Core\Core.csproj" />
<ProjectReference Include="..\..\src\Api\Api.csproj" />
<ProjectReference Include="..\Common\Common.csproj" />
</ItemGroup>
<ItemGroup>
<None Remove="Utilities\data\embeddedResource.txt"/>
<None Remove="Utilities\data\embeddedResource.txt" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Utilities\data\embeddedResource.txt"/>
<EmbeddedResource Include="Utilities\data\embeddedResource.txt" />
</ItemGroup>
</Project>

View File

@ -1,26 +1,16 @@
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.Helpers.Factories;
using Microsoft.EntityFrameworkCore;
using Bit.Core.Settings;
using Microsoft.Extensions.Configuration;
namespace Bit.Core.Test.Helpers.Factories
{
public static class DatabaseOptionsFactory
public static class GlobalSettingsFactory
{
public static List<DbContextOptions<DatabaseContext>> Options { get; } = new();
static DatabaseOptionsFactory()
public static GlobalSettings GlobalSettings { get; } = new();
static GlobalSettingsFactory()
{
var globalSettings = GlobalSettingsFactory.GlobalSettings;
if (!string.IsNullOrWhiteSpace(GlobalSettingsFactory.GlobalSettings.PostgreSql?.ConnectionString))
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
Options.Add(new DbContextOptionsBuilder<DatabaseContext>().UseNpgsql(globalSettings.PostgreSql.ConnectionString).Options);
}
if (!string.IsNullOrWhiteSpace(GlobalSettingsFactory.GlobalSettings.MySql?.ConnectionString))
{
var mySqlConnectionString = globalSettings.MySql.ConnectionString;
Options.Add(new DbContextOptionsBuilder<DatabaseContext>().UseMySql(mySqlConnectionString, ServerVersion.AutoDetect(mySqlConnectionString)).Options);
}
var configBuilder = new ConfigurationBuilder().AddUserSecrets("bitwarden-Api");
var Configuration = configBuilder.Build();
ConfigurationBinder.Bind(Configuration.GetSection("GlobalSettings"), GlobalSettings);
}
}
}

View File

@ -6,7 +6,6 @@ using Bit.Core.Enums;
using Bit.Core.Enums.Provider;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Core.Utilities;
using Bit.Infrastructure.Dapper;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
using IdentityModel;
@ -96,6 +95,7 @@ namespace Bit.Core.Test.Utilities
Assert.Equal(batches.Last().Count(), remainder == 0 ? batchSize : remainder);
}
/*
[Fact]
public void ToGuidIdArrayTVP_Success()
{
@ -115,6 +115,7 @@ namespace Bit.Core.Test.Utilities
Assert.Equal(item0, dt.Rows[0][0]);
Assert.Equal(item1, dt.Rows[1][0]);
}
*/
// TODO: Test the other ToArrayTVP Methods

View File

@ -113,23 +113,6 @@
"System.ComponentModel.Annotations": "4.3.0"
}
},
"AutoMapper": {
"type": "Transitive",
"resolved": "11.0.0",
"contentHash": "+596AnKykYCk9RxXCEF4GYuapSebQtFVvIA1oVG1rrRkCLAC7AkWehJ0brCfYUbdDW3v1H/p0W3hob7JoXGjMw==",
"dependencies": {
"Microsoft.CSharp": "4.7.0"
}
},
"AutoMapper.Extensions.Microsoft.DependencyInjection": {
"type": "Transitive",
"resolved": "11.0.0",
"contentHash": "0asw5WxdCFh2OTi9Gv+oKyH9SzxwYQSnO8TV5Dd0GggovILzJW4UimP26JAcxc3yB5NnC5urooZ1BBs8ElpiBw==",
"dependencies": {
"AutoMapper": "11.0.0",
"Microsoft.Extensions.Options": "6.0.0"
}
},
"AWSSDK.Core": {
"type": "Transitive",
"resolved": "3.7.10.11",
@ -153,8 +136,8 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.24.0",
"contentHash": "+/qI1j2oU1S4/nvxb2k/wDsol00iGf1AyJX5g3epV7eOpQEP/2xcgh/cxgKMeFgn3U2fmgSiBnQZdkV+l5y0Uw==",
"resolved": "1.22.0",
"contentHash": "ze/xRCHSSDe5TIk5vBDbVrauW1EN7UIbnBvIBfMH8KSt/I9+/7yPAjTBDgNBk0IwG6WBV+BBHp4IUtS/PGAQwQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.Diagnostics.DiagnosticSource": "4.6.0",
@ -189,16 +172,6 @@
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"Azure.Messaging.EventGrid": {
"type": "Transitive",
"resolved": "4.10.0",
"contentHash": "X3dh3Cek/7wFPUrBJ2KbnkJteGjWvKBoSBmD/uQm8reMIavCFTKhnl95F937eLn/2cSsm5l3oPHtYPFtDerA7Q==",
"dependencies": {
"Azure.Core": "1.24.0",
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
}
},
"Azure.Storage.Blobs": {
"type": "Transitive",
"resolved": "12.11.0",
@ -261,11 +234,6 @@
"System.Xml.XmlDocument": "4.3.0"
}
},
"Dapper": {
"type": "Transitive",
"resolved": "2.0.123",
"contentHash": "RDFF4rBLLmbpi6pwkY7q/M6UXHRJEOerplDGE5jwEkP/JGJnBauAClYavNKJPW1yOTWRPIyfj4is3EaJxQXILQ=="
},
"Fare": {
"type": "Transitive",
"resolved": "2.1.1",
@ -361,23 +329,6 @@
"Microsoft.NETCore.Platforms": "1.0.1"
}
},
"linq2db": {
"type": "Transitive",
"resolved": "3.7.0",
"contentHash": "iDous2TbSchtALnTLNXQnprmNZF4GrXas0MBz6ZHWkSdilSJjcf26qFM7Qf98Mny0OXHEmNXG/jtIDhoVJ5KmQ==",
"dependencies": {
"System.ComponentModel.Annotations": "4.7.0"
}
},
"linq2db.EntityFrameworkCore": {
"type": "Transitive",
"resolved": "6.7.1",
"contentHash": "Bb25vUDyFw3nKnf7KY+bauwKGD0hdM7/syodS+IgHdWlcbH9g7tHxYmMa9+DNuL0yy6DFvP6Q3BkClm7zbQdAw==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "6.0.0",
"linq2db": "3.7.0"
}
},
"MailKit": {
"type": "Transitive",
"resolved": "3.2.0",
@ -612,44 +563,6 @@
"resolved": "4.0.0",
"contentHash": "wtLlRwQX7YoBUYm25xBjJ3UsuLgycme1xXqDn8t3S5kPCWiZrx8uOkyZHLKzH4kkCiQ9m2/J5JeCKNRbZNn3Qg=="
},
"Microsoft.EntityFrameworkCore": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "gTh3SJsF5WNjEmG32kYc3U4tjeTIv55QOrwHAJcF/xtrIVMteDHMArGC35N0dw86WFY0v8yFkKYKOIOln4jkfQ==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Abstractions": "6.0.4",
"Microsoft.EntityFrameworkCore.Analyzers": "6.0.4",
"Microsoft.Extensions.Caching.Memory": "6.0.1",
"Microsoft.Extensions.DependencyInjection": "6.0.0",
"Microsoft.Extensions.Logging": "6.0.0",
"System.Collections.Immutable": "6.0.0",
"System.Diagnostics.DiagnosticSource": "6.0.0"
}
},
"Microsoft.EntityFrameworkCore.Abstractions": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "jycTQF0FUJp10cGWBmtsyFhQNeISU9CltDRKCaNiX4QRSEFzgRgaFN4vAFK0T+G5etmXugyddijE4NWCGtgznQ=="
},
"Microsoft.EntityFrameworkCore.Analyzers": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "t12WodVyGGP2CuLo7R1qwcawHY5zlg+GiQzvkceZpsjcFJVyTFFBFDPg1isBtzurLzWsl+G3z5fVXeic90mPxg=="
},
"Microsoft.EntityFrameworkCore.Relational": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "E867NbEXYRTElBF5ff+1AN5Awa1jkORy/Rrm0ueibaTAV5uw89LsLoH6yTe+b9urZTWMHtLfGd1RDdNjk8+KzA==",
"dependencies": {
"Microsoft.EntityFrameworkCore": "6.0.4",
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w=="
},
"Microsoft.Extensions.Caching.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
@ -660,14 +573,13 @@
},
"Microsoft.Extensions.Caching.Memory": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "B4y+Cev05eMcjf1na0v9gza6GUtahXbtY1JCypIgx3B4Ea/KAgsWyXEmW4q6zMbmTMtKzmPVk09rvFJirvMwTg==",
"resolved": "3.1.8",
"contentHash": "u04q7+tgc8l6pQ5HOcr6scgapkQQHnrhpGoCaaAZd24R36/NxGsGxuhSmhHOrQx9CsBLe2CVBN/4CkLlxtnnXw==",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "6.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0",
"Microsoft.Extensions.Logging.Abstractions": "6.0.0",
"Microsoft.Extensions.Options": "6.0.0",
"Microsoft.Extensions.Primitives": "6.0.0"
"Microsoft.Extensions.Caching.Abstractions": "3.1.8",
"Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.8",
"Microsoft.Extensions.Logging.Abstractions": "3.1.8",
"Microsoft.Extensions.Options": "3.1.8"
}
},
"Microsoft.Extensions.Caching.StackExchangeRedis": {
@ -959,11 +871,6 @@
"resolved": "7.6.4",
"contentHash": "MSSmA6kIfpgFTtNpOnnayoSj/6KSzHC1U9KOjF7cTA1PG4tZ7rIMi1pvjFc8CmYEvP4cxGl/+vrCn+HpK26HTQ=="
},
"Microsoft.OpenApi": {
"type": "Transitive",
"resolved": "1.2.3",
"contentHash": "Nug3rO+7Kl5/SBAadzSMAVgqDlfGjJZ0GenQrLywJ84XGKO0uRqkunz5Wyl0SDwcR71bAATXvSdbdzPrYRYKGw=="
},
"Microsoft.Spatial": {
"type": "Transitive",
"resolved": "7.6.4",
@ -1020,11 +927,6 @@
"System.Security.Cryptography.Pkcs": "6.0.0"
}
},
"MySqlConnector": {
"type": "Transitive",
"resolved": "2.1.2",
"contentHash": "JVokQTUNN3WHAu9Vw8ieeq1dXTFokJiig5P0VJ4f439UxRrsPo6SaVWC8Zdm6mkPeQFhZ0/9afdWa02EY/1j/w=="
},
"NETStandard.Library": {
"type": "Transitive",
"resolved": "1.6.1",
@ -1081,25 +983,6 @@
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
},
"Npgsql": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "SJMlOmFHr32oOzVXeHmarGaBKkhi0wHVN/rzuu2tUSJ4Qx2AkHCpr9R/DhLWwDiklqgzFU++9wkFyGJxbx/zzg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"type": "Transitive",
"resolved": "6.0.4",
"contentHash": "fzgRmBd3nAFvKt/L70sJfFWAdobtwDEeOzOzruJq9og97O8/5B96inQOAgOpYyaUjPYpS4ZS5/bxm3vnOJ0+pQ==",
"dependencies": {
"Microsoft.EntityFrameworkCore": "6.0.4",
"Microsoft.EntityFrameworkCore.Abstractions": "6.0.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql": "6.0.4"
}
},
"NSec.Cryptography": {
"type": "Transitive",
"resolved": "20.2.0",
@ -1127,16 +1010,6 @@
"System.IO.Pipelines": "5.0.1"
}
},
"Pomelo.EntityFrameworkCore.MySql": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "sFIo5e9RmQoCTEvH6EeSV8ptmX3dw/6XgyD8R93X/i7A9+XCeG9KTjSNjrszVjVOtCu/eyvYqqcv2uZ/BHhlYA==",
"dependencies": {
"Microsoft.EntityFrameworkCore.Relational": "[6.0.1, 7.0.0)",
"Microsoft.Extensions.DependencyInjection": "6.0.0",
"MySqlConnector": "2.1.2"
}
},
"Portable.BouncyCastle": {
"type": "Transitive",
"resolved": "1.9.0",
@ -1181,16 +1054,6 @@
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "9kyFSIdN3T0qjDQ2R0HRXYIhS3l5psBzQi6qqhdLz+SzFyEy4sVxNOke+yyYv8Cu8rPER12c3RDjLT8wF3WBYQ==",
"dependencies": {
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni": "4.4.0",
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni": "4.4.0",
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni": "4.4.0"
}
},
"runtime.native.System.IO.Compression": {
"type": "Transitive",
"resolved": "4.3.0",
@ -1283,21 +1146,6 @@
"resolved": "4.3.2",
"contentHash": "leXiwfiIkW7Gmn7cgnNcdtNAU70SjmKW3jxGj1iKHOvdn0zRWsgv/l2OJUO5zdGdiv2VRFnAsxxhDgMzofPdWg=="
},
"runtime.win-arm64.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "LbrynESTp3bm5O/+jGL8v0Qg5SJlTV08lpIpFesXjF6uGNMWqFnUQbYBJwZTeua6E/Y7FIM1C54Ey1btLWupdg=="
},
"runtime.win-x64.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "38ugOfkYJqJoX9g6EYRlZB5U2ZJH51UP8ptxZgdpS07FgOEToV+lS11ouNK2PM12Pr6X/PpT5jK82G3DwH/SxQ=="
},
"runtime.win-x86.runtime.native.System.Data.SqlClient.sni": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "YhEdSQUsTx+C8m8Bw7ar5/VesXvCFMItyZF7G1AUY+OM0VPZUOeAVpJ4Wl6fydBGUYZxojTDR3I6Bj/+BPkJNA=="
},
"SendGrid": {
"type": "Transitive",
"resolved": "9.27.0",
@ -1492,38 +1340,6 @@
"System.Configuration.ConfigurationManager": "6.0.0"
}
},
"Swashbuckle.AspNetCore": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JFk0+HHUPdjYuPhkpGBMLi2JtnEuWkE2pp0yXQp64DmeMe+Fb0hZyVNq/ENJ2vQNso7Zg+C758WmR/xyAl36bA==",
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
"Swashbuckle.AspNetCore.Swagger": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerUI": "6.3.1"
}
},
"Swashbuckle.AspNetCore.Swagger": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "idAFh4xhyJHYHfdLVOOn+BmscBul1OQbWsnL6YPJE8tO/0y6S79hDCvs6OY5VI093/9+1pYY3j31Zet9yaDZjA==",
"dependencies": {
"Microsoft.OpenApi": "1.2.3"
}
},
"Swashbuckle.AspNetCore.SwaggerGen": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "+uoBV4h/6NhCPLoTofSmuOnZ+usu4PW1jP6l4OHwPyu2frbYXGNpJsHs5uUXXn929OiVQkT8wo3Lj/o+P99Ejg==",
"dependencies": {
"Swashbuckle.AspNetCore.Swagger": "6.3.1"
}
},
"Swashbuckle.AspNetCore.SwaggerUI": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JLm9hN67jh7RHsX3H30+tb432Li8xm/qV5lRyMMkyHYMfWitIuKAAdrpo2ILcHOIeH7CLMuOO2hp/iLBmE+Bkw=="
},
"System.AppContext": {
"type": "Transitive",
"resolved": "4.3.0",
@ -1566,11 +1382,8 @@
},
"System.Collections.Immutable": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"resolved": "1.7.0",
"contentHash": "RVSM6wZUo6L2y6P3vN6gjUtyJ2IF2RVtrepF3J7nrDKfFQd5u/SnSUFclchYQis8/k5scHy9E+fVeKVQLnnkzw=="
},
"System.Collections.NonGeneric": {
"type": "Transitive",
@ -1609,8 +1422,21 @@
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "0YFqjhp/mYkDGpU0Ye1GjE53HMp9UVfGN7seGpAMttAC0C40v5gw598jCgpbBLMmCo0E5YRLBv5Z2doypO49ZQ=="
"resolved": "4.3.0",
"contentHash": "SY2RLItHt43rd8J9D8M8e8NM4m+9WLN2uUd9G0n1I4hj/7w+v3pzK6ZBjexlG1/2xvLKQsqir3UGVSyBTXMLWA==",
"dependencies": {
"System.Collections": "4.3.0",
"System.ComponentModel": "4.3.0",
"System.Globalization": "4.3.0",
"System.Linq": "4.3.0",
"System.Reflection": "4.3.0",
"System.Reflection.Extensions": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Text.RegularExpressions": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.ComponentModel.Primitives": {
"type": "Transitive",
@ -1665,16 +1491,6 @@
"System.Text.Encoding": "4.3.0"
}
},
"System.Data.SqlClient": {
"type": "Transitive",
"resolved": "4.8.3",
"contentHash": "yERfVLXAY0QbylAgaGLByYN0hFxX28aeEQ0hUgJO+Ntn1AfmWl5HHUoYJA0Yl9HhIUUJHVaS/Sw/RLZr5aaC+A==",
"dependencies": {
"Microsoft.Win32.Registry": "4.7.0",
"System.Security.Principal.Windows": "4.7.0",
"runtime.native.System.Data.SqlClient.sni": "4.7.0"
}
},
"System.Diagnostics.Debug": {
"type": "Transitive",
"resolved": "4.3.0",
@ -2956,29 +2772,12 @@
"NETStandard.Library": "1.6.1"
}
},
"api": {
"type": "Project",
"dependencies": {
"Azure.Messaging.EventGrid": "4.10.0",
"Commercial.Core": "2022.8.0",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Swashbuckle.AspNetCore": "6.3.1"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
}
},
"common": {
"type": "Project",
"dependencies": {
"Api": "2022.8.0",
"AutoFixture.AutoNSubstitute": "4.17.0",
"AutoFixture.Xunit2": "4.17.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0",
"Microsoft.NET.Test.Sdk": "17.1.0",
"NSubstitute": "4.3.0",
@ -3024,33 +2823,6 @@
"Stripe.net": "40.0.0",
"YubicoDotNetClient": "1.2.0"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
},
"infrastructure.entityframework": {
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
"linq2db.EntityFrameworkCore": "6.7.1"
}
},
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
}
}
}
}

View File

@ -2895,14 +2895,14 @@
"type": "Project",
"dependencies": {
"AngleSharp": "0.16.1",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0"
"Core": "2022.8.4",
"SharedWeb": "2022.8.4"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -2911,7 +2911,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -2921,9 +2921,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -143,8 +143,8 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.24.0",
"contentHash": "+/qI1j2oU1S4/nvxb2k/wDsol00iGf1AyJX5g3epV7eOpQEP/2xcgh/cxgKMeFgn3U2fmgSiBnQZdkV+l5y0Uw==",
"resolved": "1.22.0",
"contentHash": "ze/xRCHSSDe5TIk5vBDbVrauW1EN7UIbnBvIBfMH8KSt/I9+/7yPAjTBDgNBk0IwG6WBV+BBHp4IUtS/PGAQwQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.Diagnostics.DiagnosticSource": "4.6.0",
@ -179,16 +179,6 @@
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"Azure.Messaging.EventGrid": {
"type": "Transitive",
"resolved": "4.10.0",
"contentHash": "X3dh3Cek/7wFPUrBJ2KbnkJteGjWvKBoSBmD/uQm8reMIavCFTKhnl95F937eLn/2cSsm5l3oPHtYPFtDerA7Q==",
"dependencies": {
"Azure.Core": "1.24.0",
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
}
},
"Azure.Storage.Blobs": {
"type": "Transitive",
"resolved": "12.11.0",
@ -660,11 +650,6 @@
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w=="
},
"Microsoft.Extensions.Caching.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
@ -1612,17 +1597,6 @@
"System.Configuration.ConfigurationManager": "6.0.0"
}
},
"Swashbuckle.AspNetCore": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JFk0+HHUPdjYuPhkpGBMLi2JtnEuWkE2pp0yXQp64DmeMe+Fb0hZyVNq/ENJ2vQNso7Zg+C758WmR/xyAl36bA==",
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
"Swashbuckle.AspNetCore.Swagger": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerUI": "6.3.1"
}
},
"Swashbuckle.AspNetCore.Swagger": {
"type": "Transitive",
"resolved": "6.3.1",
@ -1639,11 +1613,6 @@
"Swashbuckle.AspNetCore.Swagger": "6.3.1"
}
},
"Swashbuckle.AspNetCore.SwaggerUI": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JLm9hN67jh7RHsX3H30+tb432Li8xm/qV5lRyMMkyHYMfWitIuKAAdrpo2ILcHOIeH7CLMuOO2hp/iLBmE+Bkw=="
},
"System.AppContext": {
"type": "Transitive",
"resolved": "4.3.0",
@ -3081,29 +3050,12 @@
"NETStandard.Library": "1.6.1"
}
},
"api": {
"type": "Project",
"dependencies": {
"Azure.Messaging.EventGrid": "4.10.0",
"Commercial.Core": "2022.8.0",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Swashbuckle.AspNetCore": "6.3.1"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
}
},
"common": {
"type": "Project",
"dependencies": {
"Api": "2022.8.0",
"AutoFixture.AutoNSubstitute": "4.17.0",
"AutoFixture.Xunit2": "4.17.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0",
"Microsoft.NET.Test.Sdk": "17.1.0",
"NSubstitute": "4.3.0",
@ -3153,15 +3105,15 @@
"identity": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Core": "2022.8.4",
"SharedWeb": "2022.8.4",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -3170,7 +3122,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -3180,8 +3132,8 @@
"integrationtestcommon": {
"type": "Project",
"dependencies": {
"Common": "2022.8.0",
"Identity": "2022.8.0",
"Common": "2022.8.4",
"Identity": "2022.8.4",
"Microsoft.AspNetCore.Mvc.Testing": "6.0.5",
"Microsoft.EntityFrameworkCore.InMemory": "6.0.5",
"Microsoft.Extensions.Configuration": "6.0.1"
@ -3190,9 +3142,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -132,8 +132,8 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.24.0",
"contentHash": "+/qI1j2oU1S4/nvxb2k/wDsol00iGf1AyJX5g3epV7eOpQEP/2xcgh/cxgKMeFgn3U2fmgSiBnQZdkV+l5y0Uw==",
"resolved": "1.22.0",
"contentHash": "ze/xRCHSSDe5TIk5vBDbVrauW1EN7UIbnBvIBfMH8KSt/I9+/7yPAjTBDgNBk0IwG6WBV+BBHp4IUtS/PGAQwQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.Diagnostics.DiagnosticSource": "4.6.0",
@ -168,16 +168,6 @@
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"Azure.Messaging.EventGrid": {
"type": "Transitive",
"resolved": "4.10.0",
"contentHash": "X3dh3Cek/7wFPUrBJ2KbnkJteGjWvKBoSBmD/uQm8reMIavCFTKhnl95F937eLn/2cSsm5l3oPHtYPFtDerA7Q==",
"dependencies": {
"Azure.Core": "1.24.0",
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
}
},
"Azure.Storage.Blobs": {
"type": "Transitive",
"resolved": "12.11.0",
@ -633,11 +623,6 @@
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w=="
},
"Microsoft.Extensions.Caching.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
@ -1480,17 +1465,6 @@
"System.Configuration.ConfigurationManager": "6.0.0"
}
},
"Swashbuckle.AspNetCore": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JFk0+HHUPdjYuPhkpGBMLi2JtnEuWkE2pp0yXQp64DmeMe+Fb0hZyVNq/ENJ2vQNso7Zg+C758WmR/xyAl36bA==",
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
"Swashbuckle.AspNetCore.Swagger": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerUI": "6.3.1"
}
},
"Swashbuckle.AspNetCore.Swagger": {
"type": "Transitive",
"resolved": "6.3.1",
@ -1507,11 +1481,6 @@
"Swashbuckle.AspNetCore.Swagger": "6.3.1"
}
},
"Swashbuckle.AspNetCore.SwaggerUI": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JLm9hN67jh7RHsX3H30+tb432Li8xm/qV5lRyMMkyHYMfWitIuKAAdrpo2ILcHOIeH7CLMuOO2hp/iLBmE+Bkw=="
},
"System.AppContext": {
"type": "Transitive",
"resolved": "4.3.0",
@ -2944,29 +2913,12 @@
"NETStandard.Library": "1.6.1"
}
},
"api": {
"type": "Project",
"dependencies": {
"Azure.Messaging.EventGrid": "4.10.0",
"Commercial.Core": "2022.8.0",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Swashbuckle.AspNetCore": "6.3.1"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
}
},
"common": {
"type": "Project",
"dependencies": {
"Api": "2022.8.0",
"AutoFixture.AutoNSubstitute": "4.17.0",
"AutoFixture.Xunit2": "4.17.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0",
"Microsoft.NET.Test.Sdk": "17.1.0",
"NSubstitute": "4.3.0",
@ -3016,15 +2968,15 @@
"identity": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Core": "2022.8.4",
"SharedWeb": "2022.8.4",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -3033,7 +2985,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -3043,9 +2995,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -0,0 +1,120 @@
using System.Text.Json;
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Models.Data;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class CipherBuilder : ISpecimenBuilder
{
public bool OrganizationOwned { get; set; }
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || (type != typeof(Cipher) && type != typeof(List<Cipher>)))
{
return new NoSpecimen();
}
var fixture = new Fixture();
fixture.Customizations.Insert(0, new MaxLengthStringRelay());
if (!OrganizationOwned)
{
fixture.Customize<Cipher>(composer => composer
.Without(c => c.OrganizationId));
}
// Can't test valid Favorites and Folders without creating those values inide each test,
// since we won't have any UserIds until the test is running & creating data
fixture.Customize<Cipher>(c => c
.Without(e => e.Favorites)
.Without(e => e.Folders));
//
var serializerOptions = new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};
if (type == typeof(Cipher))
{
var obj = fixture.WithAutoNSubstitutions().Create<Cipher>();
var cipherData = fixture.WithAutoNSubstitutions().Create<CipherLoginData>();
var cipherAttachements = fixture.WithAutoNSubstitutions().Create<List<CipherAttachment>>();
obj.Data = JsonSerializer.Serialize(cipherData, serializerOptions);
obj.Attachments = JsonSerializer.Serialize(cipherAttachements, serializerOptions);
return obj;
}
if (type == typeof(List<Cipher>))
{
var ciphers = fixture.WithAutoNSubstitutions().CreateMany<Cipher>().ToArray();
for (var i = 0; i < ciphers.Count(); i++)
{
var cipherData = fixture.WithAutoNSubstitutions().Create<CipherLoginData>();
var cipherAttachements = fixture.WithAutoNSubstitutions().Create<List<CipherAttachment>>();
ciphers[i].Data = JsonSerializer.Serialize(cipherData, serializerOptions);
ciphers[i].Attachments = JsonSerializer.Serialize(cipherAttachements, serializerOptions);
}
return ciphers;
}
return new NoSpecimen();
}
}
internal class EfCipher : ICustomization
{
public bool OrganizationOwned { get; set; }
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new CipherBuilder()
{
OrganizationOwned = OrganizationOwned
});
fixture.Customizations.Add(new UserBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new OrganizationUserBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<CipherRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<CollectionRepository>());
}
}
internal class EfUserCipherAutoDataAttribute : CustomAutoDataAttribute
{
public EfUserCipherAutoDataAttribute() : base(new SutProviderCustomization(), new EfCipher())
{ }
}
internal class EfOrganizationCipherAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationCipherAutoDataAttribute() : base(new SutProviderCustomization(), new EfCipher()
{
OrganizationOwned = true,
})
{ }
}
internal class InlineEfCipherAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfCipherAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfCipher) }, values)
{ }
}
}

View File

@ -1,16 +1,13 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.CipherFixtures;
using Bit.Core.Test.AutoFixture.CollectionFixtures;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.CollectionCipherFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class CollectionCipherBuilder : ISpecimenBuilder
{

View File

@ -0,0 +1,58 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class CollectionBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Collection))
{
return new NoSpecimen();
}
var fixture = new Fixture();
fixture.Customizations.Insert(0, new MaxLengthStringRelay());
var obj = fixture.WithAutoNSubstitutions().Create<Collection>();
return obj;
}
}
internal class EfCollection : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new CollectionBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<CollectionRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfCollectionAutoDataAttribute : CustomAutoDataAttribute
{
public EfCollectionAutoDataAttribute() : base(new SutProviderCustomization(), new EfCollection())
{ }
}
internal class InlineEfCollectionAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfCollectionAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfCollection) }, values)
{ }
}
}

View File

@ -1,14 +1,13 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.DeviceFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class DeviceBuilder : ISpecimenBuilder
{

View File

@ -1,14 +1,13 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.EmergencyAccessFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class EmergencyAccessBuilder : ISpecimenBuilder
{

View File

@ -3,14 +3,14 @@ using AutoFixture;
using AutoFixture.Kernel;
using AutoMapper;
using Bit.Core.Settings;
using Bit.Core.Test.Helpers.Factories;
using Bit.Infrastructure.EFIntegration.Test.Helpers;
using Bit.Infrastructure.EntityFramework.Models;
using Bit.Infrastructure.EntityFramework.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Moq;
namespace Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class ServiceScopeFactoryBuilder : ISpecimenBuilder
{

View File

@ -1,13 +1,12 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.EventFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class EventBuilder : ISpecimenBuilder
{

View File

@ -1,14 +1,13 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.FolderFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class FolderBuilder : ISpecimenBuilder
{

View File

@ -1,13 +1,12 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.GrantFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class GrantBuilder : ISpecimenBuilder
{

View File

@ -0,0 +1,58 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class GroupBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Group))
{
return new NoSpecimen();
}
var fixture = new Fixture();
fixture.Customizations.Insert(0, new MaxLengthStringRelay());
var obj = fixture.WithAutoNSubstitutions().Create<Group>();
return obj;
}
}
internal class EfGroup : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new GroupBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<GroupRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfGroupAutoDataAttribute : CustomAutoDataAttribute
{
public EfGroupAutoDataAttribute() : base(new SutProviderCustomization(), new EfGroup())
{ }
}
internal class InlineEfGroupAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfGroupAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfGroup) }, values)
{ }
}
}

View File

@ -1,12 +1,11 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.GroupUserFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class GroupUserBuilder : ISpecimenBuilder
{

View File

@ -1,12 +1,11 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.InstallationFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class InstallationBuilder : ISpecimenBuilder
{

View File

@ -0,0 +1,58 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class OrganizationBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Organization))
{
return new NoSpecimen();
}
var fixture = new Fixture();
var providers = fixture.Create<Dictionary<TwoFactorProviderType, TwoFactorProvider>>();
var organization = new Fixture().WithAutoNSubstitutions().Create<Organization>();
organization.SetTwoFactorProviders(providers);
return organization;
}
}
internal class EfOrganization : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfOrganizationAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationAutoDataAttribute() : base(new SutProviderCustomization(), new EfOrganization())
{ }
}
internal class InlineEfOrganizationAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfOrganizationAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfOrganization) }, values)
{ }
}
}

View File

@ -0,0 +1,56 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class OrganizationSponsorshipBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(OrganizationSponsorship))
{
return new NoSpecimen();
}
var fixture = new Fixture();
var obj = fixture.WithAutoNSubstitutions().Create<OrganizationSponsorship>();
return obj;
}
}
internal class EfOrganizationSponsorship : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new OrganizationSponsorshipBuilder());
fixture.Customizations.Add(new OrganizationUserBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationSponsorshipRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfOrganizationSponsorshipAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationSponsorshipAutoDataAttribute() : base(new SutProviderCustomization(), new EfOrganizationSponsorship(), new EfOrganization())
{ }
}
internal class InlineEfOrganizationSponsorshipAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfOrganizationSponsorshipAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfOrganizationSponsorship), typeof(EfOrganization) }, values)
{ }
}
}

View File

@ -0,0 +1,83 @@
using System.Text.Json;
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Enums;
using Bit.Core.Models;
using Bit.Core.Models.Data;
using Bit.Core.Test.AutoFixture.OrganizationUserFixtures;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class OrganizationUserBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == typeof(OrganizationUserCustomization))
{
var fixture = new Fixture();
var orgUser = fixture.WithAutoNSubstitutions().Create<OrganizationUser>();
var orgUserPermissions = fixture.WithAutoNSubstitutions().Create<Permissions>();
orgUser.Permissions = JsonSerializer.Serialize(orgUserPermissions, new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
});
return orgUser;
}
else if (type == typeof(List<OrganizationUserCustomization>))
{
var fixture = new Fixture();
var orgUsers = fixture.WithAutoNSubstitutions().CreateMany<OrganizationUser>(2);
foreach (var orgUser in orgUsers)
{
var providers = fixture.Create<Dictionary<TwoFactorProviderType, TwoFactorProvider>>();
var orgUserPermissions = fixture.WithAutoNSubstitutions().Create<Permissions>();
orgUser.Permissions = JsonSerializer.Serialize(orgUserPermissions, new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
});
}
return orgUsers;
}
return new NoSpecimen();
}
}
internal class EfOrganizationUser : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new OrganizationUserBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new UserBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfOrganizationUserAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationUserAutoDataAttribute() : base(new SutProviderCustomization(), new EfOrganizationUser())
{ }
}
internal class InlineEfOrganizationUserAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfOrganizationUserAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfOrganizationUser) }, values)
{ }
}
}

View File

@ -0,0 +1,80 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class PolicyBuilder : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Policy))
{
return new NoSpecimen();
}
var fixture = new Fixture();
var obj = fixture.WithAutoNSubstitutions().Create<Policy>();
return obj;
}
}
internal class EfPolicy : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new PolicyBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<PolicyRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfPolicyApplicableToUser : ICustomization
{
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new PolicyBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<PolicyRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<ProviderRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<ProviderUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<ProviderOrganizationRepository>());
}
}
internal class EfPolicyAutoDataAttribute : CustomAutoDataAttribute
{
public EfPolicyAutoDataAttribute() : base(new SutProviderCustomization(), new EfPolicy())
{ }
}
internal class EfPolicyApplicableToUserInlineAutoDataAttribute : InlineCustomAutoDataAttribute
{
public EfPolicyApplicableToUserInlineAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization), typeof(EfPolicyApplicableToUser) }, values)
{ }
}
internal class InlineEfPolicyAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfPolicyAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfPolicy) }, values)
{ }
}
}

View File

@ -2,12 +2,12 @@
using System.Reflection;
using AutoFixture.Kernel;
namespace Bit.Core.Test.AutoFixture.Relays
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays
{
// Creates a string the same length as any availible MaxLength data annotation
// Modified version of the StringLenfthRelay provided by AutoFixture
// https://github.com/AutoFixture/AutoFixture/blob/master/Src/AutoFixture/DataAnnotations/StringLengthAttributeRelay.cs
internal class MaxLengthStringRelay : ISpecimenBuilder
public class MaxLengthStringRelay : ISpecimenBuilder
{
public object Create(object request, ISpecimenContext context)
{

View File

@ -0,0 +1,70 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class SendBuilder : ISpecimenBuilder
{
public bool OrganizationOwned { get; set; }
public object Create(object request, ISpecimenContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var type = request as Type;
if (type == null || type != typeof(Send))
{
return new NoSpecimen();
}
var fixture = new Fixture();
fixture.Customizations.Insert(0, new MaxLengthStringRelay());
if (!OrganizationOwned)
{
fixture.Customize<Send>(composer => composer
.Without(c => c.OrganizationId));
}
var obj = fixture.WithAutoNSubstitutions().Create<Send>();
return obj;
}
}
internal class EfSend : ICustomization
{
public bool OrganizationOwned { get; set; }
public void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
fixture.Customizations.Add(new GlobalSettingsBuilder());
fixture.Customizations.Add(new SendBuilder());
fixture.Customizations.Add(new UserBuilder());
fixture.Customizations.Add(new OrganizationBuilder());
fixture.Customizations.Add(new EfRepositoryListBuilder<SendRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfUserSendAutoDataAttribute : CustomAutoDataAttribute
{
public EfUserSendAutoDataAttribute() : base(new SutProviderCustomization(), new EfSend())
{ }
}
internal class EfOrganizationSendAutoDataAttribute : CustomAutoDataAttribute
{
public EfOrganizationSendAutoDataAttribute() : base(new SutProviderCustomization(), new EfSend()
{
OrganizationOwned = true,
})
{ }
}
}

View File

@ -2,13 +2,11 @@
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Models.Data;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.SsoConfigFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class SsoConfigBuilder : ISpecimenBuilder
{

View File

@ -1,13 +1,11 @@
using AutoFixture;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.SsoUserFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class EfSsoUser : ICustomization
{

View File

@ -1,13 +1,12 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.TaxRateFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class TaxRateBuilder : ISpecimenBuilder
{

View File

@ -1,15 +1,13 @@
using AutoFixture;
using AutoFixture.Kernel;
using Bit.Core.Test.AutoFixture.EntityFrameworkRepositoryFixtures;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.AutoFixture.Relays;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture.Relays;
using Bit.Infrastructure.EntityFramework.Models;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Core.Test.AutoFixture.TransactionFixtures
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class TransactionBuilder : ISpecimenBuilder
{

View File

@ -0,0 +1,32 @@
using AutoFixture;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Test.Common.AutoFixture.Attributes;
namespace Bit.Infrastructure.EFIntegration.Test.AutoFixture
{
internal class EfUser : UserFixture
{
public override void Customize(IFixture fixture)
{
fixture.Customizations.Add(new IgnoreVirtualMembersCustomization());
base.Customize(fixture);
fixture.Customizations.Add(new EfRepositoryListBuilder<UserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<SsoUserRepository>());
fixture.Customizations.Add(new EfRepositoryListBuilder<OrganizationRepository>());
}
}
internal class EfUserAutoDataAttribute : CustomAutoDataAttribute
{
public EfUserAutoDataAttribute() : base(new SutProviderCustomization(), new EfUser())
{ }
}
internal class InlineEfUserAutoDataAttribute : InlineCustomAutoDataAttribute
{
public InlineEfUserAutoDataAttribute(params object[] values) : base(new[] { typeof(SutProviderCustomization),
typeof(EfUser) }, values)
{ }
}
}

View File

@ -0,0 +1,26 @@
using Bit.Core.Test.Helpers.Factories;
using Bit.Infrastructure.EntityFramework.Repositories;
using Microsoft.EntityFrameworkCore;
namespace Bit.Infrastructure.EFIntegration.Test.Helpers
{
public static class DatabaseOptionsFactory
{
public static List<DbContextOptions<DatabaseContext>> Options { get; } = new();
static DatabaseOptionsFactory()
{
var globalSettings = GlobalSettingsFactory.GlobalSettings;
if (!string.IsNullOrWhiteSpace(GlobalSettingsFactory.GlobalSettings.PostgreSql?.ConnectionString))
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
Options.Add(new DbContextOptionsBuilder<DatabaseContext>().UseNpgsql(globalSettings.PostgreSql.ConnectionString).Options);
}
if (!string.IsNullOrWhiteSpace(GlobalSettingsFactory.GlobalSettings.MySql?.ConnectionString))
{
var mySqlConnectionString = globalSettings.MySql.ConnectionString;
Options.Add(new DbContextOptionsBuilder<DatabaseContext>().UseMySql(mySqlConnectionString, ServerVersion.AutoDetect(mySqlConnectionString)).Options);
}
}
}
}

View File

@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="Moq" Version="4.17.2" />
<PackageReference Include="NSubstitute" Version="$(NSubstitueVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitRunnerVisualStudioVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="AutoFixture.Xunit2" Version="$(AutoFixtureXUnit2Version)" />
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="$(AutoFixtureAutoNSubstituteVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Infrastructure.Dapper\Infrastructure.Dapper.csproj" />
<ProjectReference Include="..\..\src\Infrastructure.EntityFramework\Infrastructure.EntityFramework.csproj" />
<ProjectReference Include="..\Common\Common.csproj" />
<ProjectReference Include="..\Core.Test\Core.Test.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="AutoFixture" />
</ItemGroup>
</Project>

View File

@ -1,15 +1,15 @@
using Bit.Core.Entities;
using Bit.Core.Models.Data;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.CipherFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
using LinqToDB;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class CipherRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.CollectionFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class CollectionRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.DeviceFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class DeviceRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.EmergencyAccessFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class EmergencyAccessRepositoryTests
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class CipherCompare : IEqualityComparer<Cipher>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class CollectionCompare : IEqualityComparer<Collection>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class DeviceCompare : IEqualityComparer<Device>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class EmergencyAccessCompare : IEqualityComparer<EmergencyAccess>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class EventCompare : IEqualityComparer<Event>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class FolderCompare : IEqualityComparer<Folder>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class GrantCompare : IEqualityComparer<Grant>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class GroupCompare : IEqualityComparer<Group>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class InstallationCompare : IEqualityComparer<Installation>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class OrganizationCompare : IEqualityComparer<Organization>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class OrganizationSponsorshipCompare : IEqualityComparer<OrganizationSponsorship>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class OrganizationUserCompare : IEqualityComparer<OrganizationUser>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class PolicyCompare : IEqualityComparer<Policy>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class SendCompare : IEqualityComparer<Send>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class SsoConfigCompare : IEqualityComparer<SsoConfig>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class SsoUserCompare : IEqualityComparer<SsoUser>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class TaxRateCompare : IEqualityComparer<TaxRate>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class TransactionCompare : IEqualityComparer<Transaction>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Entities;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class UserCompare : IEqualityComparer<User>
{

View File

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Bit.Core.Models.Data;
namespace Bit.Core.Test.Repositories.EntityFramework.EqualityComparers
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
{
public class UserKdfInformationCompare : IEqualityComparer<UserKdfInformation>
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.FolderFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class FolderRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.InstallationFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class InstallationRepositoryTests
{

View File

@ -1,13 +1,13 @@
using Bit.Core.Models.Data.Organizations;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.OrganizationFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using Organization = Bit.Core.Entities.Organization;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class OrganizationRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.OrganizationSponsorshipFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class OrganizationSponsorshipRepositoryTests
{

View File

@ -1,13 +1,13 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.OrganizationUserFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using OrganizationUser = Bit.Core.Entities.OrganizationUser;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class OrganizationUserRepositoryTests
{

View File

@ -5,14 +5,14 @@ using Bit.Core.Enums;
using Bit.Core.Models.Data;
using Bit.Core.Repositories;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.PolicyFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using Policy = Bit.Core.Entities.Policy;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class PolicyRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.SendFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class SendRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.SsoConfigFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class SsoConfigRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.SsoUserFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class SsoUserRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.TaxRateFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class TaxRateRepositoryTests
{

View File

@ -1,12 +1,12 @@
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.TransactionFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class TransactionRepositoryTests
{

View File

@ -1,13 +1,13 @@
using Bit.Core.Entities;
using Bit.Core.Models.Data;
using Bit.Core.Test.AutoFixture.Attributes;
using Bit.Core.Test.AutoFixture.UserFixtures;
using Bit.Core.Test.Repositories.EntityFramework.EqualityComparers;
using Bit.Infrastructure.EFIntegration.Test.AutoFixture;
using Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
using Xunit;
using EfRepo = Bit.Infrastructure.EntityFramework.Repositories;
using SqlRepo = Bit.Infrastructure.Dapper.Repositories;
namespace Bit.Core.Test.Repositories.EntityFramework
namespace Bit.Infrastructure.EFIntegration.Test.Repositories
{
public class UserRepositoryTests
{

File diff suppressed because it is too large Load Diff

View File

@ -119,8 +119,8 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.24.0",
"contentHash": "+/qI1j2oU1S4/nvxb2k/wDsol00iGf1AyJX5g3epV7eOpQEP/2xcgh/cxgKMeFgn3U2fmgSiBnQZdkV+l5y0Uw==",
"resolved": "1.22.0",
"contentHash": "ze/xRCHSSDe5TIk5vBDbVrauW1EN7UIbnBvIBfMH8KSt/I9+/7yPAjTBDgNBk0IwG6WBV+BBHp4IUtS/PGAQwQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.1",
"System.Diagnostics.DiagnosticSource": "4.6.0",
@ -155,16 +155,6 @@
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"Azure.Messaging.EventGrid": {
"type": "Transitive",
"resolved": "4.10.0",
"contentHash": "X3dh3Cek/7wFPUrBJ2KbnkJteGjWvKBoSBmD/uQm8reMIavCFTKhnl95F937eLn/2cSsm5l3oPHtYPFtDerA7Q==",
"dependencies": {
"Azure.Core": "1.24.0",
"System.Memory.Data": "1.0.2",
"System.Text.Json": "4.7.2"
}
},
"Azure.Storage.Blobs": {
"type": "Transitive",
"resolved": "12.11.0",
@ -628,11 +618,6 @@
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
}
},
"Microsoft.Extensions.ApiDescription.Server": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "LH4OE/76F6sOCslif7+Xh3fS/wUUrE5ryeXAMcoCnuwOQGT5Smw0p57IgDh/pHgHaGz/e+AmEQb7pRgb++wt0w=="
},
"Microsoft.Extensions.Caching.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
@ -1588,17 +1573,6 @@
"System.Configuration.ConfigurationManager": "6.0.0"
}
},
"Swashbuckle.AspNetCore": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JFk0+HHUPdjYuPhkpGBMLi2JtnEuWkE2pp0yXQp64DmeMe+Fb0hZyVNq/ENJ2vQNso7Zg+C758WmR/xyAl36bA==",
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
"Swashbuckle.AspNetCore.Swagger": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1",
"Swashbuckle.AspNetCore.SwaggerUI": "6.3.1"
}
},
"Swashbuckle.AspNetCore.Swagger": {
"type": "Transitive",
"resolved": "6.3.1",
@ -1615,11 +1589,6 @@
"Swashbuckle.AspNetCore.Swagger": "6.3.1"
}
},
"Swashbuckle.AspNetCore.SwaggerUI": {
"type": "Transitive",
"resolved": "6.3.1",
"contentHash": "JLm9hN67jh7RHsX3H30+tb432Li8xm/qV5lRyMMkyHYMfWitIuKAAdrpo2ILcHOIeH7CLMuOO2hp/iLBmE+Bkw=="
},
"System.AppContext": {
"type": "Transitive",
"resolved": "4.3.0",
@ -3067,29 +3036,12 @@
"NETStandard.Library": "1.6.1"
}
},
"api": {
"type": "Project",
"dependencies": {
"Azure.Messaging.EventGrid": "4.10.0",
"Commercial.Core": "2022.8.0",
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Swashbuckle.AspNetCore": "6.3.1"
}
},
"commercial.core": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0"
}
},
"common": {
"type": "Project",
"dependencies": {
"Api": "2022.8.0",
"AutoFixture.AutoNSubstitute": "4.17.0",
"AutoFixture.Xunit2": "4.17.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Kralizek.AutoFixture.Extensions.MockHttp": "1.2.0",
"Microsoft.NET.Test.Sdk": "17.1.0",
"NSubstitute": "4.3.0",
@ -3139,15 +3091,15 @@
"identity": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"SharedWeb": "2022.8.0",
"Core": "2022.8.4",
"SharedWeb": "2022.8.4",
"Swashbuckle.AspNetCore.SwaggerGen": "6.3.1"
}
},
"infrastructure.dapper": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Core": "2022.8.4",
"Dapper": "2.0.123",
"System.Data.SqlClient": "4.8.3"
}
@ -3156,7 +3108,7 @@
"type": "Project",
"dependencies": {
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Core": "2022.8.0",
"Core": "2022.8.4",
"Microsoft.EntityFrameworkCore.Relational": "6.0.4",
"Npgsql.EntityFrameworkCore.PostgreSQL": "6.0.4",
"Pomelo.EntityFrameworkCore.MySql": "6.0.1",
@ -3166,9 +3118,9 @@
"sharedweb": {
"type": "Project",
"dependencies": {
"Core": "2022.8.0",
"Infrastructure.Dapper": "2022.8.0",
"Infrastructure.EntityFramework": "2022.8.0"
"Core": "2022.8.4",
"Infrastructure.Dapper": "2022.8.4",
"Infrastructure.EntityFramework": "2022.8.4"
}
}
}

View File

@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Identity.IntegrationTest",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTestCommon", "IntegrationTestCommon\IntegrationTestCommon.csproj", "{41188BB8-1FAF-45F6-8DC8-F316B8A6C56B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure.EFIntegration.Test", "Infrastructure.EFIntegration.Test\Infrastructure.EFIntegration.Test.csproj", "{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -114,5 +116,17 @@ Global
{41188BB8-1FAF-45F6-8DC8-F316B8A6C56B}.Release|x64.Build.0 = Release|Any CPU
{41188BB8-1FAF-45F6-8DC8-F316B8A6C56B}.Release|x86.ActiveCfg = Release|Any CPU
{41188BB8-1FAF-45F6-8DC8-F316B8A6C56B}.Release|x86.Build.0 = Release|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Debug|x64.ActiveCfg = Debug|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Debug|x64.Build.0 = Debug|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Debug|x86.ActiveCfg = Debug|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Debug|x86.Build.0 = Debug|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Release|Any CPU.Build.0 = Release|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Release|x64.ActiveCfg = Release|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Release|x64.Build.0 = Release|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Release|x86.ActiveCfg = Release|Any CPU
{8DEA714E-567C-4F4A-B424-568C8EC2CDA1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

Some files were not shown because too many files have changed in this diff Show More