From 01523613d09abb3d7ba21d3ed81ff5e0b7cdcf3f Mon Sep 17 00:00:00 2001 From: Jitca Beniamin Date: Sun, 12 Mar 2023 14:26:39 +0000 Subject: [PATCH] remove codecoverage --- .gitignore | 2 + ...rShop.Application_ActivateUserCommand.html | 184 --- ...pplication_ActivateUserCommandHandler.html | 230 --- ...lication_ActivateUserCommandValidator.html | 188 --- ...p.Application_AssignUserToRoleCommand.html | 191 --- ...cation_AssignUserToRoleCommandHandler.html | 230 --- ...tion_AssignUserToRoleCommandValidator.html | 191 --- .../BlazorShop.Application_CartResponse.html | 260 --- ...hop.Application_ChangePasswordCommand.html | 205 --- ...lication_ChangePasswordCommandHandler.html | 230 --- ...cation_ChangePasswordCommandValidator.html | 202 --- ...BlazorShop.Application_ClotheResponse.html | 252 --- ...zorShop.Application_CreateCartCommand.html | 212 --- ....Application_CreateCartCommandHandler.html | 259 --- ...pplication_CreateCartCommandValidator.html | 228 --- ...rShop.Application_CreateClotheCommand.html | 226 --- ...pplication_CreateClotheCommandHandler.html | 243 --- ...lication_CreateClotheCommandValidator.html | 237 --- ...Shop.Application_CreateInvoiceCommand.html | 212 --- ...plication_CreateInvoiceCommandHandler.html | 241 --- ...ication_CreateInvoiceCommandValidator.html | 230 --- ...orShop.Application_CreateMusicCommand.html | 233 --- ...Application_CreateMusicCommandHandler.html | 251 --- ...plication_CreateMusicCommandValidator.html | 247 --- ...orShop.Application_CreateOrderCommand.html | 205 --- ...Application_CreateOrderCommandHandler.html | 241 --- ...plication_CreateOrderCommandValidator.html | 203 --- ...Shop.Application_CreateReceiptCommand.html | 205 --- ...plication_CreateReceiptCommandHandler.html | 240 --- ...ication_CreateReceiptCommandValidator.html | 205 --- ...zorShop.Application_CreateRoleCommand.html | 184 --- ....Application_CreateRoleCommandHandler.html | 230 --- ...pplication_CreateRoleCommandValidator.html | 190 --- ...p.Application_CreateSubscriberCommand.html | 219 --- ...cation_CreateSubscriberCommandHandler.html | 266 --- ...tion_CreateSubscriberCommandValidator.html | 208 --- ...Application_CreateSubscriptionCommand.html | 226 --- ...tion_CreateSubscriptionCommandHandler.html | 253 --- ...on_CreateSubscriptionCommandValidator.html | 241 --- ...hop.Application_CreateTodoItemCommand.html | 219 --- ...lication_CreateTodoItemCommandHandler.html | 266 --- ...cation_CreateTodoItemCommandValidator.html | 235 --- ...hop.Application_CreateTodoListCommand.html | 191 --- ...lication_CreateTodoListCommandHandler.html | 253 --- ...cation_CreateTodoListCommandValidator.html | 219 --- ...zorShop.Application_CreateUserCommand.html | 205 --- ....Application_CreateUserCommandHandler.html | 230 --- ...pplication_CreateUserCommandValidator.html | 228 --- ...hop.Application_DeleteAllCartsCommand.html | 184 --- ...lication_DeleteAllCartsCommandHandler.html | 235 --- ...cation_DeleteAllCartsCommandValidator.html | 188 --- ...zorShop.Application_DeleteCartCommand.html | 191 --- ....Application_DeleteCartCommandHandler.html | 240 --- ...pplication_DeleteCartCommandValidator.html | 191 --- ...rShop.Application_DeleteClotheCommand.html | 184 --- ...pplication_DeleteClotheCommandHandler.html | 242 --- ...lication_DeleteClotheCommandValidator.html | 188 --- ...Shop.Application_DeleteInvoiceCommand.html | 184 --- ...plication_DeleteInvoiceCommandHandler.html | 240 --- ...ication_DeleteInvoiceCommandValidator.html | 188 --- ...orShop.Application_DeleteMusicCommand.html | 184 --- ...Application_DeleteMusicCommandHandler.html | 240 --- ...plication_DeleteMusicCommandValidator.html | 188 --- ...orShop.Application_DeleteOrderCommand.html | 184 --- ...Application_DeleteOrderCommandHandler.html | 240 --- ...plication_DeleteOrderCommandValidator.html | 188 --- ...Shop.Application_DeleteReceiptCommand.html | 184 --- ...plication_DeleteReceiptCommandHandler.html | 240 --- ...ication_DeleteReceiptCommandValidator.html | 188 --- ...zorShop.Application_DeleteRoleCommand.html | 184 --- ....Application_DeleteRoleCommandHandler.html | 230 --- ...pplication_DeleteRoleCommandValidator.html | 188 --- ...p.Application_DeleteSubscriberCommand.html | 184 --- ...cation_DeleteSubscriberCommandHandler.html | 240 --- ...tion_DeleteSubscriberCommandValidator.html | 188 --- ...Application_DeleteSubscriptionCommand.html | 184 --- ...tion_DeleteSubscriptionCommandHandler.html | 240 --- ...on_DeleteSubscriptionCommandValidator.html | 188 --- ...hop.Application_DeleteTodoItemCommand.html | 184 --- ...lication_DeleteTodoItemCommandHandler.html | 241 --- ...cation_DeleteTodoItemCommandValidator.html | 188 --- ...hop.Application_DeleteTodoListCommand.html | 184 --- ...lication_DeleteTodoListCommandHandler.html | 241 --- ...cation_DeleteTodoListCommandValidator.html | 188 --- ...zorShop.Application_DeleteUserCommand.html | 184 --- ....Application_DeleteUserCommandHandler.html | 230 --- ...pplication_DeleteUserCommandValidator.html | 188 --- ...rShop.Application_DependencyInjection.html | 196 --- .../BlazorShop.Application_EmailSettings.html | 219 --- ...azorShop.Application_GetCartByIdQuery.html | 191 --- ...p.Application_GetCartByIdQueryHandler.html | 252 --- ...Application_GetCartByIdQueryValidator.html | 191 --- ...orShop.Application_GetCartsCountQuery.html | 184 --- ...Application_GetCartsCountQueryHandler.html | 231 --- ...plication_GetCartsCountQueryValidator.html | 188 --- .../BlazorShop.Application_GetCartsQuery.html | 184 --- ...Shop.Application_GetCartsQueryHandler.html | 252 --- ...op.Application_GetCartsQueryValidator.html | 188 --- ...orShop.Application_GetClotheByIdQuery.html | 184 --- ...Application_GetClotheByIdQueryHandler.html | 252 --- ...plication_GetClotheByIdQueryValidator.html | 188 --- ...op.Application_GetClothesQueryHandler.html | 252 --- ...rShop.Application_GetInvoiceByIdQuery.html | 184 --- ...pplication_GetInvoiceByIdQueryHandler.html | 252 --- ...lication_GetInvoiceByIdQueryValidator.html | 188 --- ...p.Application_GetInvoicesQueryHandler.html | 251 --- ...zorShop.Application_GetMusicByIdQuery.html | 184 --- ....Application_GetMusicByIdQueryHandler.html | 251 --- ...pplication_GetMusicByIdQueryValidator.html | 188 --- ...hop.Application_GetMusicsQueryHandler.html | 251 --- ...zorShop.Application_GetOrderByIdQuery.html | 191 --- ....Application_GetOrderByIdQueryHandler.html | 252 --- ...pplication_GetOrderByIdQueryValidator.html | 193 --- ...BlazorShop.Application_GetOrdersQuery.html | 184 --- ...hop.Application_GetOrdersQueryHandler.html | 252 --- ...p.Application_GetOrdersQueryValidator.html | 190 --- ...rShop.Application_GetReceiptByIdQuery.html | 191 --- ...pplication_GetReceiptByIdQueryHandler.html | 252 --- ...lication_GetReceiptByIdQueryValidator.html | 193 --- ...azorShop.Application_GetReceiptsQuery.html | 184 --- ...p.Application_GetReceiptsQueryHandler.html | 252 --- ...Application_GetReceiptsQueryValidator.html | 190 --- ...azorShop.Application_GetRoleByIdQuery.html | 184 --- ...p.Application_GetRoleByIdQueryHandler.html | 239 --- ...Application_GetRoleByIdQueryValidator.html | 188 --- ...lication_GetRoleByNormalizedNameQuery.html | 184 --- ...n_GetRoleByNormalizedNameQueryHandler.html | 239 --- ...GetRoleByNormalizedNameQueryValidator.html | 190 --- ...lication_GetRolesForAdminQueryHandler.html | 239 --- ...Shop.Application_GetRolesQueryHandler.html | 239 --- ...op.Application_GetSubscriberByIdQuery.html | 184 --- ...ication_GetSubscriberByIdQueryHandler.html | 251 --- ...ation_GetSubscriberByIdQueryValidator.html | 188 --- ...pplication_GetSubscribersQueryHandler.html | 251 --- ....Application_GetSubscriptionByIdQuery.html | 184 --- ...ation_GetSubscriptionByIdQueryHandler.html | 251 --- ...ion_GetSubscriptionByIdQueryValidator.html | 188 --- ...lication_GetSubscriptionsQueryHandler.html | 251 --- ...Shop.Application_GetTodoItemByIdQuery.html | 184 --- ...plication_GetTodoItemByIdQueryHandler.html | 251 --- ...ication_GetTodoItemByIdQueryValidator.html | 188 --- ....Application_GetTodoItemsQueryHandler.html | 251 --- ...Shop.Application_GetTodoListByIdQuery.html | 184 --- ...plication_GetTodoListByIdQueryHandler.html | 251 --- ...ication_GetTodoListByIdQueryValidator.html | 188 --- ....Application_GetTodoListsQueryHandler.html | 251 --- ...rShop.Application_GetUserByEmailQuery.html | 184 --- ...pplication_GetUserByEmailQueryHandler.html | 239 --- ...lication_GetUserByEmailQueryValidator.html | 213 --- ...azorShop.Application_GetUserByIdQuery.html | 184 --- ...p.Application_GetUserByIdQueryHandler.html | 239 --- ...Application_GetUserByIdQueryValidator.html | 188 --- ...p.Application_GetUserSubscribersQuery.html | 184 --- ...cation_GetUserSubscribersQueryHandler.html | 252 --- ...tion_GetUserSubscribersQueryValidator.html | 188 --- ...lication_GetUsersInactiveQueryHandler.html | 239 --- ...Shop.Application_GetUsersQueryHandler.html | 239 --- .../BlazorShop.Application_IMapFrom_1.html | 186 --- ...lazorShop.Application_InvoiceResponse.html | 236 --- ...BlazorShop.Application_JwtTokenConfig.html | 212 --- ...azorShop.Application_JwtTokenResponse.html | 234 --- .../BlazorShop.Application_LoginCommand.html | 191 --- ...rShop.Application_LoginCommandHandler.html | 230 --- ...hop.Application_LoginCommandValidator.html | 218 --- ...zorShop.Application_MappingExtensions.html | 189 --- ...BlazorShop.Application_MappingProfile.html | 206 --- .../BlazorShop.Application_MusicResponse.html | 252 --- .../BlazorShop.Application_OrderResponse.html | 236 --- ...lazorShop.Application_ReceiptResponse.html | 228 --- ...lazorShop.Application_RegisterCommand.html | 219 --- ...op.Application_RegisterCommandHandler.html | 230 --- ....Application_RegisterCommandValidator.html | 234 --- ...lazorShop.Application_RequestResponse.html | 223 --- ...Shop.Application_ResetPasswordCommand.html | 198 --- ...plication_ResetPasswordCommandHandler.html | 230 --- ...ication_ResetPasswordCommandValidator.html | 224 --- .../BlazorShop.Application_Result_1.html | 207 --- .../BlazorShop.Application_RoleResponse.html | 212 --- ...orShop.Application_SubscriberResponse.html | 308 ---- ...Shop.Application_SubscriptionResponse.html | 268 --- ...azorShop.Application_TodoItemResponse.html | 252 --- ...azorShop.Application_TodoListResponse.html | 212 --- ...ication_UnhandledExceptionBehaviour_2.html | 221 --- ...zorShop.Application_UpdateCartCommand.html | 219 --- ....Application_UpdateCartCommandHandler.html | 244 --- ...pplication_UpdateCartCommandValidator.html | 231 --- ...rShop.Application_UpdateClotheCommand.html | 226 --- ...pplication_UpdateClotheCommandHandler.html | 247 --- ...lication_UpdateClotheCommandValidator.html | 240 --- ...cation_UpdateCreatedSubscriberCommand.html | 212 --- ...UpdateCreatedSubscriberCommandHandler.html | 261 --- ...dateCreatedSubscriberCommandValidator.html | 209 --- ...Shop.Application_UpdateInvoiceCommand.html | 219 --- ...plication_UpdateInvoiceCommandHandler.html | 246 --- ...ication_UpdateInvoiceCommandValidator.html | 233 --- ...orShop.Application_UpdateMusicCommand.html | 233 --- ...Application_UpdateMusicCommandHandler.html | 248 --- ...plication_UpdateMusicCommandValidator.html | 247 --- ...orShop.Application_UpdateOrderCommand.html | 212 --- ...Application_UpdateOrderCommandHandler.html | 245 --- ...plication_UpdateOrderCommandValidator.html | 206 --- ...Shop.Application_UpdateReceiptCommand.html | 212 --- ...plication_UpdateReceiptCommandHandler.html | 244 --- ...ication_UpdateReceiptCommandValidator.html | 208 --- ...zorShop.Application_UpdateRoleCommand.html | 191 --- ....Application_UpdateRoleCommandHandler.html | 230 --- ...pplication_UpdateRoleCommandValidator.html | 193 --- ...p.Application_UpdateSubscriberCommand.html | 226 --- ...cation_UpdateSubscriberCommandHandler.html | 252 --- ...tion_UpdateSubscriberCommandValidator.html | 213 --- ...ication_UpdateSubscriberStatusCommand.html | 184 --- ..._UpdateSubscriberStatusCommandHandler.html | 242 --- ...pdateSubscriberStatusCommandValidator.html | 190 --- ...Application_UpdateSubscriptionCommand.html | 226 --- ...tion_UpdateSubscriptionCommandHandler.html | 247 --- ...on_UpdateSubscriptionCommandValidator.html | 241 --- ...hop.Application_UpdateTodoItemCommand.html | 219 --- ...lication_UpdateTodoItemCommandHandler.html | 247 --- ...cation_UpdateTodoItemCommandValidator.html | 236 --- ...hop.Application_UpdateTodoListCommand.html | 191 --- ...lication_UpdateTodoListCommandHandler.html | 243 --- ...cation_UpdateTodoListCommandValidator.html | 219 --- ...zorShop.Application_UpdateUserCommand.html | 205 --- ....Application_UpdateUserCommandHandler.html | 231 --- ...pplication_UpdateUserCommandValidator.html | 203 --- ...op.Application_UpdateUserEmailCommand.html | 198 --- ...ication_UpdateUserEmailCommandHandler.html | 231 --- ...ation_UpdateUserEmailCommandValidator.html | 223 --- .../BlazorShop.Application_UserResponse.html | 254 --- ...hop.Application_ValidationBehaviour_2.html | 228 --- ...rShop.Application_ValidationException.html | 208 --- .../codecoverage/BlazorShop.Domain_Cart.html | 212 --- .../BlazorShop.Domain_Clothe.html | 226 --- .../BlazorShop.Domain_EntityBase.html | 184 --- .../BlazorShop.Domain_Invoice.html | 212 --- .../codecoverage/BlazorShop.Domain_Music.html | 226 --- .../codecoverage/BlazorShop.Domain_Order.html | 212 --- .../BlazorShop.Domain_Receipt.html | 205 --- .../codecoverage/BlazorShop.Domain_Role.html | 191 --- .../BlazorShop.Domain_RoleClaim.html | 184 --- .../BlazorShop.Domain_Subscriber.html | 233 --- .../BlazorShop.Domain_Subscription.html | 240 --- .../BlazorShop.Domain_TodoItem.html | 219 --- .../BlazorShop.Domain_TodoList.html | 191 --- .../codecoverage/BlazorShop.Domain_User.html | 226 --- .../BlazorShop.Domain_UserClaim.html | 184 --- .../BlazorShop.Domain_UserLogin.html | 184 --- .../BlazorShop.Domain_UserRole.html | 191 --- .../BlazorShop.Domain_UserToken.html | 184 --- ...zorShop.Infrastructure_AccountService.html | 368 ----- ...zorShop.Infrastructure_AdminSeedModel.html | 212 --- ...p.Infrastructure_ApplicationDbContext.html | 303 ---- ...ure_ApplicationDbContextModelSnapshot.html | 923 ----------- ...frastructure_ApplicationDbContextSeed.html | 562 ------- ...Shop.Infrastructure_CartConfiguration.html | 198 --- ...op.Infrastructure_ClotheConfiguration.html | 209 --- ...orShop.Infrastructure_DateTimeService.html | 184 --- ...op.Infrastructure_DependencyInjection.html | 226 --- ...lazorShop.Infrastructure_EmailService.html | 274 ---- ...p.Infrastructure_InvoiceConfiguration.html | 202 --- ...BlazorShop.Infrastructure_Migration12.html | 1009 ------------ ...BlazorShop.Infrastructure_Migration13.html | 982 ----------- ...BlazorShop.Infrastructure_Migration_1.html | 1158 ------------- ...lazorShop.Infrastructure_Migration_10.html | 1449 ----------------- ...lazorShop.Infrastructure_Migration_11.html | 944 ----------- ...BlazorShop.Infrastructure_Migration_2.html | 977 ----------- ...BlazorShop.Infrastructure_Migration_3.html | 847 ---------- ...BlazorShop.Infrastructure_Migration_4.html | 853 ---------- ...BlazorShop.Infrastructure_Migration_5.html | 856 ---------- ...BlazorShop.Infrastructure_Migration_6.html | 889 ---------- ...BlazorShop.Infrastructure_Migration_7.html | 870 ---------- ...BlazorShop.Infrastructure_Migration_8.html | 889 ---------- ...BlazorShop.Infrastructure_Migration_9.html | 924 ----------- ...hop.Infrastructure_MusicConfiguration.html | 209 --- ...hop.Infrastructure_OrderConfiguration.html | 204 --- ...p.Infrastructure_ReceiptConfiguration.html | 201 --- ...Infrastructure_RoleClaimConfiguration.html | 199 --- ...Shop.Infrastructure_RoleConfiguration.html | 195 --- ...BlazorShop.Infrastructure_RoleService.html | 420 ----- ...zorShop.Infrastructure_RolesSeedModel.html | 219 --- ...nfrastructure_SubscriberConfiguration.html | 205 --- ...rastructure_SubscriptionConfiguration.html | 215 --- ....Infrastructure_TodoItemConfiguration.html | 195 --- ....Infrastructure_TodoListConfiguration.html | 193 --- ...Infrastructure_UserClaimConfiguration.html | 199 --- ...Shop.Infrastructure_UserConfiguration.html | 210 --- ...Infrastructure_UserLoginConfiguration.html | 192 --- ....Infrastructure_UserRoleConfiguration.html | 195 --- ...BlazorShop.Infrastructure_UserService.html | 424 ----- ...Infrastructure_UserTokenConfiguration.html | 192 --- .../BlazorShop.WebApi_AccountsController.html | 288 ---- .../BlazorShop.WebApi_ApiBaseController.html | 198 --- ...op.WebApi_ApiExceptionFilterAttribute.html | 295 ---- .../BlazorShop.WebApi_CartsController.html | 301 ---- .../BlazorShop.WebApi_ClothesController.html | 273 ---- .../BlazorShop.WebApi_HomeController.html | 238 --- .../BlazorShop.WebApi_InvoicesController.html | 268 --- .../BlazorShop.WebApi_JwtTokenMiddleware.html | 260 --- .../BlazorShop.WebApi_MusicsController.html | 272 ---- .../BlazorShop.WebApi_OrdersController.html | 274 ---- .../BlazorShop.WebApi_PaymentsController.html | 489 ------ .../BlazorShop.WebApi_Program.html | 339 ---- .../BlazorShop.WebApi_ReceiptsController.html | 274 ---- .../BlazorShop.WebApi_RolesController.html | 283 ---- ...azorShop.WebApi_SubscribersController.html | 289 ---- ...orShop.WebApi_SubscriptionsController.html | 272 ---- ...BlazorShop.WebApi_TodoItemsController.html | 253 --- ...BlazorShop.WebApi_TodoListsController.html | 268 --- .../BlazorShop.WebApi_UsersController.html | 322 ---- .../BlazorShop.WebClient_AccountService.html | 263 --- .../BlazorShop.WebClient_AddEditClothe.html | 320 ---- .../BlazorShop.WebClient_AddEditMusic.html | 322 ---- .../BlazorShop.WebClient_AddEditRole.html | 278 ---- ...zorShop.WebClient_AddEditSubscription.html | 319 ---- .../BlazorShop.WebClient_AddEditUser.html | 306 ---- ...BlazorShop.WebClient_AdminRoleHandler.html | 200 --- ...orShop.WebClient_AdminRoleRequirement.html | 195 --- .../BlazorShop.WebClient_AppState.html | 213 --- ...lazorShop.WebClient_AuthStateProvider.html | 271 --- ...rShop.WebClient_AuthenticationService.html | 317 ---- .../BlazorShop.WebClient_Cart.html | 341 ---- .../BlazorShop.WebClient_CartService.html | 390 ----- .../BlazorShop.WebClient_ClotheDetails.html | 410 ----- .../BlazorShop.WebClient_ClotheService.html | 318 ---- .../BlazorShop.WebClient_Clothes.html | 397 ----- ...zorShop.WebClient_CustomerRoleHandler.html | 205 --- ...hop.WebClient_CustomerRoleRequirement.html | 204 --- ...azorShop.WebClient_DefaultRoleHandler.html | 200 --- ...Shop.WebClient_DefaultRoleRequirement.html | 195 --- ...Shop.WebClient_HttpInterceptorService.html | 261 --- ...rShop.WebClient_HttpResponseException.html | 222 --- .../BlazorShop.WebClient_Index.2.html | 493 ------ .../BlazorShop.WebClient_Index.html | 381 ----- .../BlazorShop.WebClient_JwtTokenParser.html | 249 --- .../BlazorShop.WebClient_Login.html | 283 ---- .../BlazorShop.WebClient_Logout.html | 190 --- .../BlazorShop.WebClient_MainLayout.html | 290 ---- .../BlazorShop.WebClient_MusicDetails.html | 351 ---- .../BlazorShop.WebClient_MusicService.html | 318 ---- .../BlazorShop.WebClient_Musics.html | 356 ---- .../BlazorShop.WebClient_MyOrders.html | 343 ---- .../BlazorShop.WebClient_MySubscriptions.html | 553 ------- .../BlazorShop.WebClient_NavMenu.html | 300 ---- .../BlazorShop.WebClient_Not_found.html | 195 --- .../BlazorShop.WebClient_OrderService.html | 318 ---- .../BlazorShop.WebClient_OrderSuccess.html | 261 --- .../BlazorShop.WebClient_OrderView.html | 322 ---- .../BlazorShop.WebClient_Profile.html | 455 ------ .../BlazorShop.WebClient_Program.html | 239 --- .../BlazorShop.WebClient_ReceiptService.html | 318 ---- .../BlazorShop.WebClient_Receipts.html | 327 ---- .../BlazorShop.WebClient_Register.html | 272 ---- .../BlazorShop.WebClient_ResetPassword.html | 255 --- .../BlazorShop.WebClient_RoleService.html | 343 ---- .../BlazorShop.WebClient_Roles.html | 388 ----- .../BlazorShop.WebClient_Server_error.html | 195 --- ...rShop.WebClient_SessionStorageService.html | 255 --- .../BlazorShop.WebClient_StripeService.html | 232 --- ...lazorShop.WebClient_SubscriberService.html | 338 ---- .../BlazorShop.WebClient_Subscribers.html | 334 ---- ...zorShop.WebClient_SubscriptionService.html | 318 ---- ...zorShop.WebClient_SubscriptionSuccess.html | 261 --- .../BlazorShop.WebClient_Subscriptions.html | 356 ---- .../BlazorShop.WebClient_TodoItemService.html | 300 ---- .../BlazorShop.WebClient_TodoItems.html | 419 ----- .../BlazorShop.WebClient_TodoListService.html | 321 ---- .../BlazorShop.WebClient_TodoLists.html | 333 ---- .../BlazorShop.WebClient_TodoState.html | 309 ---- .../BlazorShop.WebClient_Unauthorized.html | 195 --- ...p.WebClient_UpdateSubscriptionSuccess.html | 261 --- .../BlazorShop.WebClient_UserRoleHandler.html | 200 --- ...zorShop.WebClient_UserRoleRequirement.html | 195 --- .../BlazorShop.WebClient_UserService.html | 403 ----- .../BlazorShop.WebClient_Users.html | 472 ------ .../BlazorShop.WebClient_VerifyAuth.html | 248 --- .../BlazorShop.WorkerService_Program.html | 195 --- .../BlazorShop.WorkerService_Worker.html | 252 --- BlazorShop.UnitTests/codecoverage/class.js | 218 --- .../codecoverage/icon_cog.svg | 1 - .../codecoverage/icon_cog_dark.svg | 1 - .../codecoverage/icon_cube.svg | 2 - .../codecoverage/icon_cube_dark.svg | 1 - .../codecoverage/icon_down-dir_active.svg | 2 - .../icon_down-dir_active_dark.svg | 1 - .../codecoverage/icon_fork.svg | 2 - .../codecoverage/icon_fork_dark.svg | 1 - .../codecoverage/icon_info-circled.svg | 2 - .../codecoverage/icon_info-circled_dark.svg | 2 - .../codecoverage/icon_minus.svg | 2 - .../codecoverage/icon_minus_dark.svg | 1 - .../codecoverage/icon_plus.svg | 2 - .../codecoverage/icon_plus_dark.svg | 1 - .../codecoverage/icon_search-minus.svg | 2 - .../codecoverage/icon_search-minus_dark.svg | 1 - .../codecoverage/icon_search-plus.svg | 2 - .../codecoverage/icon_search-plus_dark.svg | 1 - .../codecoverage/icon_sponsor.svg | 2 - .../codecoverage/icon_star.svg | 2 - .../codecoverage/icon_star_dark.svg | 2 - .../codecoverage/icon_up-dir.svg | 2 - .../codecoverage/icon_up-dir_active.svg | 2 - .../codecoverage/icon_wrench.svg | 2 - .../codecoverage/icon_wrench_dark.svg | 1 - BlazorShop.UnitTests/codecoverage/index.htm | 560 ------- BlazorShop.UnitTests/codecoverage/index.html | 560 ------- BlazorShop.UnitTests/codecoverage/main.js | 682 -------- BlazorShop.UnitTests/codecoverage/report.css | 772 --------- 407 files changed, 2 insertions(+), 102636 deletions(-) delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CartResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ClotheResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DependencyInjection.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_EmailSettings.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClothesQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoicesQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicsQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRolesForAdminQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRolesQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscribersQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionsQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemsQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListsQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQuery.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQueryValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUsersInactiveQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUsersQueryHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_IMapFrom_1.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_InvoiceResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_JwtTokenConfig.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_JwtTokenResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MappingExtensions.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MappingProfile.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MusicResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_OrderResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ReceiptResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RequestResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_Result_1.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RoleResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_SubscriberResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_SubscriptionResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_TodoItemResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_TodoListResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UnhandledExceptionBehaviour_2.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommand.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommandHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommandValidator.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UserResponse.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ValidationBehaviour_2.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ValidationException.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Cart.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Clothe.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_EntityBase.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Invoice.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Music.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Order.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Receipt.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Role.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_RoleClaim.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Subscriber.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Subscription.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_TodoItem.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_TodoList.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_User.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserClaim.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserLogin.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserRole.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserToken.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_AccountService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_AdminSeedModel.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContext.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContextModelSnapshot.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContextSeed.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_CartConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ClotheConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_DateTimeService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_DependencyInjection.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_EmailService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_InvoiceConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration12.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration13.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_1.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_10.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_11.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_2.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_3.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_4.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_5.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_6.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_7.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_8.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_9.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_MusicConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_OrderConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ReceiptConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleClaimConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RolesSeedModel.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_SubscriberConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_SubscriptionConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_TodoItemConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_TodoListConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserClaimConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserLoginConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserRoleConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserTokenConfiguration.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_AccountsController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ApiBaseController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ApiExceptionFilterAttribute.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_CartsController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ClothesController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_HomeController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_InvoicesController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_JwtTokenMiddleware.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_MusicsController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_OrdersController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_PaymentsController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_Program.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ReceiptsController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_RolesController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_SubscribersController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_SubscriptionsController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_TodoItemsController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_TodoListsController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_UsersController.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AccountService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditClothe.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditMusic.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditRole.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditSubscription.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditUser.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AdminRoleHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AdminRoleRequirement.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AppState.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AuthStateProvider.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AuthenticationService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Cart.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CartService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ClotheDetails.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ClotheService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Clothes.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CustomerRoleHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CustomerRoleRequirement.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_DefaultRoleHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_DefaultRoleRequirement.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_HttpInterceptorService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_HttpResponseException.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Index.2.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Index.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_JwtTokenParser.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Login.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Logout.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MainLayout.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MusicDetails.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MusicService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Musics.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MyOrders.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MySubscriptions.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_NavMenu.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Not_found.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderSuccess.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderView.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Profile.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Program.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ReceiptService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Receipts.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Register.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ResetPassword.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_RoleService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Roles.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Server_error.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SessionStorageService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_StripeService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriberService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Subscribers.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriptionService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriptionSuccess.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Subscriptions.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoItemService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoItems.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoListService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoLists.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoState.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Unauthorized.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UpdateSubscriptionSuccess.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserRoleHandler.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserRoleRequirement.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserService.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Users.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_VerifyAuth.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WorkerService_Program.html delete mode 100644 BlazorShop.UnitTests/codecoverage/BlazorShop.WorkerService_Worker.html delete mode 100644 BlazorShop.UnitTests/codecoverage/class.js delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_cog.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_cog_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_cube.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_cube_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_down-dir_active.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_down-dir_active_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_fork.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_fork_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_info-circled.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_info-circled_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_minus.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_minus_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_plus.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_plus_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_search-minus.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_search-minus_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_search-plus.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_search-plus_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_sponsor.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_star.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_star_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_up-dir.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_up-dir_active.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_wrench.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/icon_wrench_dark.svg delete mode 100644 BlazorShop.UnitTests/codecoverage/index.htm delete mode 100644 BlazorShop.UnitTests/codecoverage/index.html delete mode 100644 BlazorShop.UnitTests/codecoverage/main.js delete mode 100644 BlazorShop.UnitTests/codecoverage/report.css diff --git a/.gitignore b/.gitignore index b043ae74..48d5bf32 100644 --- a/.gitignore +++ b/.gitignore @@ -373,3 +373,5 @@ FodyWeavers.xsd # Remove Logs /BlazorShop.Logs + +/BlazorShop.UnitTests/codecoverage diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommand.html deleted file mode 100644 index 0da1bb0d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.UserCommand.ActivateUserCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.UserCommand.ActivateUserCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\ActivateUserCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1
Uncovered lines:0
Coverable lines:1
Total lines:17
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\ActivateUserCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ActivateUserCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.UserCommand
 6{
 7    /// <summary>
 8    /// A model to activate an user.
 9    /// </summary>
 10    public class ActivateUserCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 115        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommandHandler.html deleted file mode 100644 index a87c410a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.UserHandler.ActivateUserCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.UserHandler.ActivateUserCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\ActivateUserCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:57
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\ActivateUserCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ActivateUserCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{ActivateUserCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class ActivateUserCommandHandler : IRequestHandler<ActivateUserCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ActivateUserCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{ActivateUserCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public ActivateUserCommandHandler(IUserService userService, ILogger<ActivateUserCommandHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 227        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{ActivateUserCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<ActivateUserCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="ActivateUserCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(ActivateUserCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                response = await this.UserService.ActivateUserAsync(request);
 147            }
 148            catch (Exception ex)
 149            {
 150                this.Logger.LogError(ex, ErrorsManager.ActivateUserCommand);
 151                response = RequestResponse.Failure($"{ErrorsManager.ActivateUserCommand}. {ex.Message}. {ex.InnerExcepti
 152            }
 53
 254            return response;
 255        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommandValidator.html deleted file mode 100644 index 7f0d1614..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ActivateUserCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.UserValidator.ActivateUserCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.UserValidator.ActivateUserCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\ActivateUserCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\ActivateUserCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ActivateUserCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.UserValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{ActivateUserCommand}"/>.
 9    /// </summary>
 10    public class ActivateUserCommandValidator : AbstractValidator<ActivateUserCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ActivateUserCommandValidator"/> class.
 14        /// </summary>
 015        public ActivateUserCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommand.html deleted file mode 100644 index 141b00f8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommand.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.UserCommand.AssignUserToRoleCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.UserCommand.AssignUserToRoleCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\AssignUserToRoleCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:2
Uncovered lines:0
Coverable lines:2
Total lines:22
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%1100%
get_RoleId()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\AssignUserToRoleCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AssignUserToRoleCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.UserCommand
 6{
 7    /// <summary>
 8    /// A model to assign an user to role.
 9    /// </summary>
 10    public class AssignUserToRoleCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 115        public int UserId { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the role.
 19        /// </summary>
 120        public int RoleId { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_UserId()
-get_RoleId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommandHandler.html deleted file mode 100644 index d1ddf01d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.UserHandler.AssignUserToRoleCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.UserHandler.AssignUserToRoleCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\AssignUserToRoleCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:57
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\AssignUserToRoleCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AssignUserToRoleCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{AssignUserToRoleCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class AssignUserToRoleCommandHandler : IRequestHandler<AssignUserToRoleCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="AssignUserToRoleCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{AssignUserToRoleCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public AssignUserToRoleCommandHandler(IUserService userService, ILogger<AssignUserToRoleCommandHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 227        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{AssignUserToRoleCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<AssignUserToRoleCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="AssignUserToRoleCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(AssignUserToRoleCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                response = await this.UserService.AssignUserToRoleAsync(request);
 147            }
 148            catch (Exception ex)
 149            {
 150                this.Logger.LogError(ex, ErrorsManager.AssignUserToRoleCommand);
 151                response = RequestResponse.Failure($"{ErrorsManager.AssignUserToRoleCommand}. {ex.Message}. {ex.InnerExc
 152            }
 53
 254            return response;
 255        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommandValidator.html deleted file mode 100644 index b8a9b683..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_AssignUserToRoleCommandValidator.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.UserValidator.AssignUserToRoleCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.UserValidator.AssignUserToRoleCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\AssignUserToRoleCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:24
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\AssignUserToRoleCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AssignUserToRoleCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.UserValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{AssignUserToRoleCommand}"/>.
 9    /// </summary>
 10    public class AssignUserToRoleCommandValidator : AbstractValidator<AssignUserToRoleCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="AssignUserToRoleCommandValidator"/> class.
 14        /// </summary>
 015        public AssignUserToRoleCommandValidator()
 016        {
 017            this.RuleFor(v => v.UserId)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 19
 020            this.RuleFor(v => v.RoleId)
 021                .GreaterThan(0).WithMessage("RoleId must be greater than 0");
 022        }
 23    }
 24}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CartResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CartResponse.html deleted file mode 100644 index 4f6f4ae8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CartResponse.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.CartResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.CartResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\CartResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:75
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Name()100%10%
get_Price()100%10%
get_Amount()100%10%
get_ClotheId()100%10%
get_ClotheName()100%10%
get_ClotheImageName()100%10%
get_ClotheImagePath()100%10%
get_UserId()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\CartResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CartResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A Cart response model.
 9    /// </summary>
 10    public class CartResponse : IMapFrom<Cart>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the cart.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The name of the cart.
 19        /// </summary>
 020        public string? Name { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The price of the cart.
 24        /// </summary>
 025        public decimal Price { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The amount of the cart.
 29        /// </summary>
 030        public int Amount { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The id of the clothe.
 34        /// </summary>
 035        public int ClotheId { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The name of the clothe.
 39        /// </summary>
 040        public string ClotheName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The image name of the clothe.
 44        /// </summary>
 045        public string ClotheImageName { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets The image path of the clothe.
 49        /// </summary>
 050        public string ClotheImagePath { get; set; }
 51
 52        /// <summary>
 53        /// Gets or sets The id of the user.
 54        /// </summary>
 055        public int UserId { get; set; }
 56
 57        /// <summary>
 58        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 59        /// </summary>
 60        /// <param name="profile">The profile to use for the mapping operation.</param>
 61        public void Mapping(Profile profile)
 062        {
 063            profile.CreateMap<Cart, CartResponse>()
 064                .ForMember(d => d.Id, opt => opt.MapFrom(s => s.Id))
 065                .ForMember(d => d.Name, opt => opt.MapFrom(s => s.Name))
 066                .ForMember(d => d.Price, opt => opt.MapFrom(s => s.Price))
 067                .ForMember(d => d.Amount, opt => opt.MapFrom(s => s.Amount))
 068                .ForMember(d => d.ClotheId, opt => opt.MapFrom(s => s.Clothe.Id))
 069                .ForMember(d => d.ClotheName, opt => opt.MapFrom(s => s.Clothe.Name))
 070                .ForMember(d => d.ClotheImageName, opt => opt.MapFrom(s => s.Clothe.ImageName))
 071                .ForMember(d => d.ClotheImagePath, opt => opt.MapFrom(s => s.Clothe.ImagePath))
 072                .ForMember(d => d.UserId, opt => opt.MapFrom(s => s.User.Id));
 073        }
 74    }
 75}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommand.html deleted file mode 100644 index 636fbdb0..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommand.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.AccountCommand.ChangePasswordCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.AccountCommand.ChangePasswordCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\AccountCommand\ChangePasswordCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:32
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%1100%
get_OldPassword()100%1100%
get_NewPassword()100%1100%
get_ConfirmNewPassword()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\AccountCommand\ChangePasswordCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ChangePasswordCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.AccountCommand
 6{
 7    /// <summary>
 8    /// A model to change the passwword.
 9    /// </summary>
 10    public class ChangePasswordCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 115        public int UserId { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The old password used.
 19        /// </summary>
 120        public string? OldPassword { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The new password to be used.
 24        /// </summary>
 125        public string? NewPassword { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The confirmed password to be used.
 29        /// </summary>
 130        public string? ConfirmNewPassword { get; set; }
 31    }
 32}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommandHandler.html deleted file mode 100644 index ad3d42ae..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.AccountHandler.ChangePasswordCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.AccountHandler.ChangePasswordCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\AccountHandler\ChangePasswordCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:57
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_AccountService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\AccountHandler\ChangePasswordCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ChangePasswordCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.AccountHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{ChangePasswordCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class ChangePasswordCommandHandler : IRequestHandler<ChangePasswordCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ChangePasswordCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="accountService">Gets An instance of <see cref="IAccountService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{ChangePasswordCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public ChangePasswordCommandHandler(IAccountService accountService, ILogger<ChangePasswordCommandHandler> logger
 219        {
 220            this.AccountService = accountService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IAccountService"/>.
 26        /// </summary>
 227        private IAccountService AccountService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{ChangePasswordCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<ChangePasswordCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="ChangePasswordCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(ChangePasswordCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                response = await this.AccountService.ChangePasswordUserAsync(request);
 147            }
 148            catch (Exception ex)
 149            {
 150                this.Logger.LogError(ex, ErrorsManager.ChangePasswordCommand);
 151                response = RequestResponse.Failure($"{ErrorsManager.ChangePasswordCommand}. {ex.Message}. {ex.InnerExcep
 152            }
 53
 254            return response;
 255        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommandValidator.html deleted file mode 100644 index 787af064..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ChangePasswordCommandValidator.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.AccountValidator.ChangePasswordCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.AccountValidator.ChangePasswordCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\AccountValidator\ChangePasswordCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:35
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\AccountValidator\ChangePasswordCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ChangePasswordCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.AccountValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{ChangePasswordCommand}"/>.
 9    /// </summary>
 10    public class ChangePasswordCommandValidator : AbstractValidator<ChangePasswordCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ChangePasswordCommandValidator"/> class.
 14        /// </summary>
 015        public ChangePasswordCommandValidator()
 016        {
 017            _ = this.RuleFor(v => v.UserId)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 19
 020            _ = this.RuleFor(v => v.OldPassword)
 021                .NotEmpty().WithMessage("OldPassword must not be empty")
 022                .NotNull().WithMessage("OldPassword must not be null")
 023                .NotEqual(v => v.NewPassword).WithMessage("OldPassword must not be equal with NewPassword");
 24
 025            _ = this.RuleFor(v => v.NewPassword)
 026                .NotEmpty().WithMessage("NewPassword must not be empty")
 027                .NotNull().WithMessage("NewPassword must not be null");
 28
 029            _ = this.RuleFor(v => v.ConfirmNewPassword)
 030                .NotEmpty().WithMessage("ConfirmNewPassword must not be empty")
 031                .NotNull().WithMessage("ConfirmNewPassword must not be null")
 032                .Equal(v => v.NewPassword).WithMessage("NewPassword must be equal with ConfirmNewPassword");
 033        }
 34    }
 35}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ClotheResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ClotheResponse.html deleted file mode 100644 index 2bf2153b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ClotheResponse.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.ClotheResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.ClotheResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\ClotheResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
42%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:8
Uncovered lines:11
Coverable lines:19
Total lines:69
Line coverage:42.1%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%1100%
get_Name()100%1100%
get_Description()100%1100%
get_Price()100%1100%
get_Amount()100%1100%
get_ImageName()100%1100%
get_ImagePath()100%1100%
get_IsActive()100%1100%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\ClotheResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ClotheResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A Clothe response model.
 9    /// </summary>
 10    public class ClotheResponse : IMapFrom<Clothe>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the clothe.
 14        /// </summary>
 815        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The name of the clothe.
 19        /// </summary>
 720        public string? Name { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The description of the clothe.
 24        /// </summary>
 725        public string? Description { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The price of the clothe.
 29        /// </summary>
 730        public decimal Price { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The amount of the clothe.
 34        /// </summary>
 735        public int Amount { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The image name of the clothe.
 39        /// </summary>
 740        public string? ImageName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The image path of the clothe.
 44        /// </summary>
 745        public string? ImagePath { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets a value indicating whether the clothe is active or not.
 49        /// </summary>
 1050        public bool? IsActive { get; set; }
 51
 52        /// <summary>
 53        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 54        /// </summary>
 55        /// <param name="profile">The profile to use for the mapping operation.</param>
 56        public void Mapping(Profile profile)
 057        {
 058            profile.CreateMap<Clothe, ClotheResponse>()
 059                .ForMember(d => d.Id, opt => opt.MapFrom(s => s.Id))
 060                .ForMember(d => d.Name, opt => opt.MapFrom(s => s.Name))
 061                .ForMember(d => d.Description, opt => opt.MapFrom(s => s.Description))
 062                .ForMember(d => d.Price, opt => opt.MapFrom(s => s.Price))
 063                .ForMember(d => d.Amount, opt => opt.MapFrom(s => s.Amount))
 064                .ForMember(d => d.ImageName, opt => opt.MapFrom(s => s.ImageName))
 065                .ForMember(d => d.ImagePath, opt => opt.MapFrom(s => s.ImagePath))
 066                .ForMember(d => d.IsActive, opt => opt.MapFrom(s => s.IsActive));
 067        }
 68    }
 69}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommand.html deleted file mode 100644 index 78776287..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommand.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.CartCommand.CreateCartCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.CartCommand.CreateCartCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\CartCommand\CreateCartCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:0
Coverable lines:5
Total lines:37
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%1100%
get_ClotheId()100%1100%
get_Name()100%1100%
get_Price()100%1100%
get_Amount()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\CartCommand\CreateCartCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateCartCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.CartCommand
 6{
 7    /// <summary>
 8    /// A model to create a cart.
 9    /// </summary>
 10    public class CreateCartCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 115        public int UserId { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the clothe.
 19        /// </summary>
 120        public int ClotheId { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The name of the cart.
 24        /// </summary>
 125        public string? Name { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The price of the cart.
 29        /// </summary>
 130        public decimal Price { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The amount of the cart.
 34        /// </summary>
 135        public int Amount { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommandHandler.html deleted file mode 100644 index 3507beac..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommandHandler.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.CartHandler.CreateCartCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.CartHandler.CreateCartCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\CartHandler\CreateCartCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:37
Coverable lines:37
Total lines:84
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
get_UserManager()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\CartHandler\CreateCartCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateCartCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.CartHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateCartCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateCartCommandHandler : IRequestHandler<CreateCartCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateCartCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="userManager">Gets An instance of <see cref="UserManager{User}"/>.</param>
 17        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateCartCommandHandler}"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 019        public CreateCartCommandHandler(IApplicationDbContext dbContext, ILogger<CreateCartCommandHandler> logger, UserM
 020        {
 021            this.DbContext = dbContext;
 022            this.UserManager = userManager;
 023            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 024        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{CreateCartCommandHandler}"/>.
 33        /// </summary>
 034        private ILogger<CreateCartCommandHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="UserManager{User}"/>.
 38        /// </summary>
 039        private UserManager<User> UserManager { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="CreateCartCommand"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 47        public async Task<RequestResponse> Handle(CreateCartCommand request, CancellationToken cancellationToken)
 048        {
 49            RequestResponse? response;
 50
 51            try
 052            {
 053                var clothe = this.DbContext.Clothes
 054                    .TagWith(nameof(CreateCartCommandHandler))
 055                    .FirstOrDefault(x => x.Id == request.ClotheId);
 056                var user = await this.UserManager.FindByIdAsync(request.UserId.ToString());
 057                if (user == null)
 058                {
 059                    throw new Exception("The user does not exists");
 60                }
 61
 062                var entity = new Cart
 063                {
 064                    Name = request.Name,
 065                    Price = request.Price,
 066                    Amount = request.Amount,
 067                    Clothe = clothe,
 068                    User = user,
 069                };
 70
 071                this.DbContext.Carts.Add(entity);
 072                await this.DbContext.SaveChangesAsync(cancellationToken);
 073                response = RequestResponse.Success(entity.Id);
 074            }
 075            catch (Exception ex)
 076            {
 077                this.Logger.LogError(ex, ErrorsManager.CreateCartCommand);
 078                response = RequestResponse.Failure($"{ErrorsManager.CreateCartCommand}. {ex.Message}. {ex.InnerException
 079            }
 80
 081            return response;
 082        }
 83    }
 84}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommandValidator.html deleted file mode 100644 index cf02123c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateCartCommandValidator.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.CartValidator.CreateCartCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.CartValidator.CreateCartCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\CreateCartCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:57
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\CreateCartCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateCartCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.CartValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateCartCommand}"/>.
 9    /// </summary>
 10    public class CreateCartCommandValidator : AbstractValidator<CreateCartCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateCartCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public CreateCartCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(v => v.UserId)
 021                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 22
 023            this.RuleFor(v => v.ClotheId)
 024                .GreaterThan(0).WithMessage("ClotheId must be greater than 0");
 25
 026            this.RuleFor(v => v.Name)
 027                .MaximumLength(200).WithMessage("Name maximum length exceeded")
 028                .NotEmpty().WithMessage("Name must not be empty")
 029                .NotNull().WithMessage("Name must not be null")
 030                .MustAsync(this.HaveUniqueName).WithMessage("The specified name already exists.");
 31
 032            this.RuleFor(v => v.Price)
 033                .GreaterThan(0).WithMessage("Price must be greater than 0");
 34
 035            this.RuleFor(v => v.Amount)
 036                .GreaterThan(0).WithMessage("Amount must be greater than 0");
 037        }
 38
 39        /// <summary>
 40        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 41        /// </summary>
 042        private IApplicationDbContext Context { get; }
 43
 44        /// <summary>
 45        /// Gets a value indicating whether the cart has an unique name or not.
 46        /// </summary>
 47        /// <param name="name">The name of the cart.</param>
 48        /// <param name="cancellationToken">The cancellation token.</param>
 49        /// <returns>A boolean value.</returns>
 50        public async Task<bool> HaveUniqueName(string name, CancellationToken cancellationToken)
 051        {
 052            return await this.Context.Carts
 053                .TagWith(nameof(this.HaveUniqueName))
 054                .AllAsync(l => l.Name != name, cancellationToken);
 055        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommand.html deleted file mode 100644 index 98cd0c31..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommand.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.ClotheCommand.CreateClotheCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.ClotheCommand.CreateClotheCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ClotheCommand\CreateClotheCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:47
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Name()100%1100%
get_Description()100%1100%
get_Price()100%1100%
get_Amount()100%1100%
get_ImageName()100%1100%
get_ImagePath()100%1100%
get_IsActive()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ClotheCommand\CreateClotheCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateClotheCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.ClotheCommand
 6{
 7    /// <summary>
 8    /// A model to create a clothe.
 9    /// </summary>
 10    public class CreateClotheCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The name of the clothe.
 14        /// </summary>
 315        public string? Name { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The description of the clothe.
 19        /// </summary>
 320        public string? Description { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The price of the clothe.
 24        /// </summary>
 325        public decimal? Price { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The amount of the clothe.
 29        /// </summary>
 130        public int Amount { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The image name of the clothe.
 34        /// </summary>
 335        public string? ImageName { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The image path of the clothe.
 39        /// </summary>
 340        public string? ImagePath { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The active status of the clothe.
 44        /// </summary>
 245        public bool? IsActive { get; set; }
 46    }
 47}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommandHandler.html deleted file mode 100644 index 93aec962..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommandHandler.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.ClotheHandler.CreateClotheCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.ClotheHandler.CreateClotheCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ClotheHandler\CreateClotheCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:30
Uncovered lines:0
Coverable lines:30
Total lines:70
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ClotheHandler\CreateClotheCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateClotheCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.ClotheHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateClotheCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateClotheCommandHandler : IRequestHandler<CreateClotheCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateClotheCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateClotheCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public CreateClotheCommandHandler(IApplicationDbContext dbContext, ILogger<CreateClotheCommandHandler> logger)
 219        {
 220            this.DbContext = dbContext;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 227        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{CreateClotheCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<CreateClotheCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="CreateClotheCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(CreateClotheCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                var entity = new Clothe
 247                {
 248                    Name = request.Name,
 249                    Description = request.Description,
 250                    Price = request.Price,
 251                    Amount = request.Amount,
 252                    ImageName = request.ImageName,
 253                    ImagePath = request.ImagePath,
 254                    IsActive = true,
 255                };
 56
 157                this.DbContext.Clothes.Add(entity);
 158                await this.DbContext.SaveChangesAsync(cancellationToken);
 159                response = RequestResponse.Success(entity.Id);
 160            }
 161            catch (Exception ex)
 162            {
 163                this.Logger.LogError(ex, ErrorsManager.CreateClotheCommand);
 164                response = RequestResponse.Failure($"{ErrorsManager.CreateClotheCommand}. {ex.Message}. {ex.InnerExcepti
 165            }
 66
 267            return response;
 268        }
 69    }
 70}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommandValidator.html deleted file mode 100644 index ff628e77..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateClotheCommandValidator.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ClotheValidator.CreateClotheCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ClotheValidator.CreateClotheCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ClotheValidator\CreateClotheCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:31
Coverable lines:31
Total lines:66
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ClotheValidator\CreateClotheCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateClotheCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ClotheValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateClotheCommand}"/>.
 9    /// </summary>
 10    public class CreateClotheCommandValidator : AbstractValidator<CreateClotheCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateClotheCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public CreateClotheCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            _ = this.RuleFor(v => v.Name)
 021                .NotEmpty().WithMessage("Name must not be empty")
 022                .NotNull().WithMessage("Name must not be null")
 023                .MaximumLength(200).WithMessage("Name must not exceed 200 characters.")
 024                .MustAsync(this.HaveUniqueName).WithMessage("The name already exists.");
 25
 026            _ = this.RuleFor(v => v.Description)
 027                .MaximumLength(1000).WithMessage("Description maximum length exceeded")
 028                .NotEmpty().WithMessage("Description must not be empty")
 029                .NotNull().WithMessage("Description must not be null");
 30
 031            _ = this.RuleFor(v => v.Price)
 032                .GreaterThan(0).WithMessage("Price must be greater than 0");
 33
 034            _ = this.RuleFor(v => v.Amount)
 035                .GreaterThan(0).WithMessage("Price must be greater than 0");
 36
 037            _ = this.RuleFor(v => v.ImageName)
 038                .MaximumLength(200).WithMessage("ImageName maximum length exceeded")
 039                .NotEmpty().WithMessage("ImageName must not be empty")
 040                .NotNull().WithMessage("ImageName must not be null");
 41
 042            _ = this.RuleFor(v => v.ImagePath)
 043                .MaximumLength(200).WithMessage("ImagePath maximum length exceeded")
 044                .NotEmpty().WithMessage("ImagePath must not be empty")
 045                .NotNull().WithMessage("ImagePath must not be null");
 046        }
 47
 48        /// <summary>
 49        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 50        /// </summary>
 051        private IApplicationDbContext Context { get; }
 52
 53        /// <summary>
 54        /// Gets a value indicating whether the clothe has an unique name or not.
 55        /// </summary>
 56        /// <param name="name">The name of the clothe.</param>
 57        /// <param name="cancellationToken">The cancellation token.</param>
 58        /// <returns>A boolean value.</returns>
 59        public async Task<bool> HaveUniqueName(string name, CancellationToken cancellationToken)
 060        {
 061            return await this.Context.Clothes
 062                .TagWith(nameof(this.HaveUniqueName))
 063                .AllAsync(l => l.Name != name, cancellationToken);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommand.html deleted file mode 100644 index 7266e557..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommand.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.InvoiceCommand.CreateInvoiceCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.InvoiceCommand.CreateInvoiceCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\InvoiceCommand\CreateInvoiceCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserEmail()100%10%
get_Name()100%10%
get_AmountSubTotal()100%10%
get_AmountTotal()100%10%
get_Quantity()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\InvoiceCommand\CreateInvoiceCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateInvoiceCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.InvoiceCommand
 6{
 7    /// <summary>
 8    /// A model to create an invoice.
 9    /// </summary>
 10    public class CreateInvoiceCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 015        public string UserEmail { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The name of the invoice.
 19        /// </summary>
 020        public string Name { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The sub total amount of the invoice.
 24        /// </summary>
 025        public int AmountSubTotal { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The total amount of the invoice.
 29        /// </summary>
 030        public int AmountTotal { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The quantity of the invoice.
 34        /// </summary>
 035        public int Quantity { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommandHandler.html deleted file mode 100644 index 7b0f3ea1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommandHandler.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.InvoiceHandler.CreateInvoiceCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.InvoiceHandler.CreateInvoiceCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\InvoiceHandler\CreateInvoiceCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:28
Coverable lines:28
Total lines:68
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\InvoiceHandler\CreateInvoiceCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateInvoiceCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.InvoiceHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateInvoiceCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateInvoiceCommandHandler : IRequestHandler<CreateInvoiceCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateInvoiceCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateInvoiceCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public CreateInvoiceCommandHandler(IApplicationDbContext dbContext, ILogger<CreateInvoiceCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{CreateInvoiceCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<CreateInvoiceCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="CreateInvoiceCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(CreateInvoiceCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = new Invoice
 047                {
 048                    UserEmail = request.UserEmail,
 049                    Name = request.Name,
 050                    AmountSubTotal = request.AmountSubTotal,
 051                    AmountTotal = request.AmountTotal,
 052                    Quantity = request.Quantity,
 053                };
 54
 055                this.DbContext.Invoices.Add(entity);
 056                await this.DbContext.SaveChangesAsync(cancellationToken);
 057                response = RequestResponse.Success(entity.Id);
 058            }
 059            catch (Exception ex)
 060            {
 061                this.Logger.LogError(ex, ErrorsManager.CreateInvoiceCommand);
 062                response = RequestResponse.Failure($"{ErrorsManager.CreateInvoiceCommand}. {ex.Message}. {ex.InnerExcept
 063            }
 64
 065            return response;
 066        }
 67    }
 68}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommandValidator.html deleted file mode 100644 index 48e27a4e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateInvoiceCommandValidator.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.InvoiceValidator.CreateInvoiceCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.InvoiceValidator.CreateInvoiceCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\InvoiceValidator\CreateInvoiceCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:25
Coverable lines:25
Total lines:59
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\InvoiceValidator\CreateInvoiceCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateInvoiceCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.InvoiceValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateInvoiceCommand}"/>.
 9    /// </summary>
 10    public class CreateInvoiceCommandValidator : AbstractValidator<CreateInvoiceCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateInvoiceCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public CreateInvoiceCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(v => v.UserEmail)
 021                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 022                .NotEmpty().WithMessage("UserEmail must not be empty")
 023                .NotNull().WithMessage("UserEmail must not be null");
 24
 025            this.RuleFor(v => v.Name)
 026                .MaximumLength(200).WithMessage("Name maximum length exceeded")
 027                .NotEmpty().WithMessage("Name must not be empty")
 028                .NotNull().WithMessage("Name must not be null")
 029                .MustAsync(this.HaveUniqueName).WithMessage("The specified name already exists.");
 30
 031            this.RuleFor(v => v.AmountSubTotal)
 032                .GreaterThan(0).WithMessage("AmountSubTotal must be greater than 0");
 33
 034            this.RuleFor(v => v.AmountTotal)
 035                .GreaterThan(0).WithMessage("AmountTotal must be greater than 0");
 36
 037            this.RuleFor(v => v.Quantity)
 038                .GreaterThan(0).WithMessage("Quantity must be greater than 0");
 039        }
 40
 41        /// <summary>
 42        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 43        /// </summary>
 044        private IApplicationDbContext Context { get; }
 45
 46        /// <summary>
 47        /// Gets a value indicating whether the invoice has an unique name or not.
 48        /// </summary>
 49        /// <param name="name">The name of the invoice.</param>
 50        /// <param name="cancellationToken">The cancellation token.</param>
 51        /// <returns>A boolean value.</returns>
 52        public async Task<bool> HaveUniqueName(string name, CancellationToken cancellationToken)
 053        {
 054            return await this.Context.Invoices
 055                .TagWith(nameof(this.HaveUniqueName))
 056                .AllAsync(l => l.Name != name, cancellationToken);
 057        }
 58    }
 59}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommand.html deleted file mode 100644 index 5ad313cb..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommand.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.MusicCommand.CreateMusicCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.MusicCommand.CreateMusicCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\MusicCommand\CreateMusicCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:52
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Title()100%10%
get_Description()100%10%
get_Author()100%10%
get_DateRelease()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
get_AccessLevel()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\MusicCommand\CreateMusicCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateMusicCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.MusicCommand
 6{
 7    /// <summary>
 8    /// A model to create a music.
 9    /// </summary>
 10    public class CreateMusicCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the music.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The title of the music.
 19        /// </summary>
 020        public string Title { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The description of the music.
 24        /// </summary>
 025        public string Description { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The author of the music.
 29        /// </summary>
 030        public string Author { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The release date of the music.
 34        /// </summary>
 035        public DateTime DateRelease { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The image name of the music.
 39        /// </summary>
 040        public string ImageName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The image path of the music.
 44        /// </summary>
 045        public string ImagePath { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets The access level of the music.
 49        /// </summary>
 050        public int AccessLevel { get; set; }
 51    }
 52}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommandHandler.html deleted file mode 100644 index b1f1cc6d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommandHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.MusicHandler.CreateMusicCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.MusicHandler.CreateMusicCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\MusicHandler\CreateMusicCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:36
Coverable lines:36
Total lines:78
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\MusicHandler\CreateMusicCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateMusicCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.MusicHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateMusicCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateMusicCommandHandler : IRequestHandler<CreateMusicCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateMusicCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateMusicCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public CreateMusicCommandHandler(IApplicationDbContext dbContext, ILogger<CreateMusicCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{CreateMusicCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<CreateMusicCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="CreateMusicCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(CreateMusicCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Musics
 047                    .TagWith(nameof(CreateMusicCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity != null)
 050                {
 051                    throw new Exception("The entity already exists");
 52                }
 53
 054                entity = new Music
 055                {
 056                    Title = request.Title,
 057                    Description = request.Description,
 058                    Author = request.Author,
 059                    DateRelease = request.DateRelease,
 060                    ImageName = request.ImageName,
 061                    ImagePath = request.ImagePath,
 062                    AccessLevel = request.AccessLevel,
 063                };
 64
 065                this.DbContext.Musics.Add(entity);
 066                await this.DbContext.SaveChangesAsync(cancellationToken);
 067                response = RequestResponse.Success(entity.Id);
 068            }
 069            catch (Exception ex)
 070            {
 071                this.Logger.LogError(ex, ErrorsManager.CreateMusicCommand);
 072                response = RequestResponse.Failure($"{ErrorsManager.CreateMusicCommand}. {ex.Message}. {ex.InnerExceptio
 073            }
 74
 075            return response;
 076        }
 77    }
 78}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommandValidator.html deleted file mode 100644 index 8bd857fa..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateMusicCommandValidator.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.MusicValidator.CreateMusicCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.MusicValidator.CreateMusicCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\MusicValidator\CreateMusicCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:39
Coverable lines:39
Total lines:76
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueTitle()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\MusicValidator\CreateMusicCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateMusicCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.MusicValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateMusicCommand}"/>.
 9    /// </summary>
 10    public class CreateMusicCommandValidator : AbstractValidator<CreateMusicCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateMusicCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public CreateMusicCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(x => x.Id)
 021                .Equal(0).WithMessage("Id must be equal with 0");
 22
 023            this.RuleFor(x => x.Title)
 024                .MaximumLength(200).WithMessage("Title maximum length exceeded")
 025                .NotEmpty().WithMessage("Title must not be empty")
 026                .NotNull().WithMessage("Title must not be null")
 027                .MustAsync(this.HaveUniqueTitle).WithMessage("The specified title already exists.");
 28
 029            this.RuleFor(x => x.Description)
 030                .MaximumLength(1000).WithMessage("Description maximum length exceeded")
 031                .NotEmpty().WithMessage("Description must not be empty")
 032                .NotNull().WithMessage("Description must not be null");
 33
 034            this.RuleFor(x => x.Author)
 035                .MaximumLength(200).WithMessage("Author maximum length exceeded")
 036                .NotEmpty().WithMessage("Author must not be empty")
 037                .NotNull().WithMessage("Author must not be null");
 38
 039            this.RuleFor(x => x.DateRelease)
 040                .GreaterThan(new DateTime(1950, 1, 1)).WithMessage("DateRelease must be greater than 1 January 1950")
 041                .NotEmpty().WithMessage("DateRelease must not be empty")
 042                .NotNull().WithMessage("DateRelease must not be null");
 43
 044            this.RuleFor(x => x.ImageName)
 045                .MaximumLength(200).WithMessage("ImageName maximum length exceeded")
 046                .NotEmpty().WithMessage("ImageName must not be empty")
 047                .NotNull().WithMessage("ImageName must not be null");
 48
 049            this.RuleFor(x => x.ImagePath)
 050                .MaximumLength(200).WithMessage("ImagePath maximum length exceeded")
 051                 .NotEmpty().WithMessage("ImagePath must not be empty")
 052                .NotNull().WithMessage("ImagePath must not be null");
 53
 054            this.RuleFor(x => x.AccessLevel)
 055                .GreaterThan(0).WithMessage("AccessLevel must be greater than 0");
 056        }
 57
 58        /// <summary>
 59        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 60        /// </summary>
 061        private IApplicationDbContext Context { get; }
 62
 63        /// <summary>
 64        /// Gets a value indicating whether the music has an unique title or not.
 65        /// </summary>
 66        /// <param name="title">The title of the music.</param>
 67        /// <param name="cancellationToken">The cancellation token.</param>
 68        /// <returns>A boolean value.</returns>
 69        public async Task<bool> HaveUniqueTitle(string title, CancellationToken cancellationToken)
 070        {
 071            return await this.Context.Musics
 072                .TagWith(nameof(this.HaveUniqueTitle))
 073                .AllAsync(l => l.Title != title, cancellationToken);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommand.html deleted file mode 100644 index 6e05b2f1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommand.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.OrderCommand.CreateOrderCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.OrderCommand.CreateOrderCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\OrderCommand\CreateOrderCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:4
Coverable lines:4
Total lines:32
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserEmail()100%10%
get_OrderDate()100%10%
get_LineItems()100%10%
get_AmountTotal()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\OrderCommand\CreateOrderCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateOrderCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.OrderCommand
 6{
 7    /// <summary>
 8    /// A model to create an order.
 9    /// </summary>
 10    public class CreateOrderCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 015        public string UserEmail { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The date when the order was placed.
 19        /// </summary>
 020        public DateTime OrderDate { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The items placed in the current order.
 24        /// </summary>
 025        public string LineItems { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The total amount of the items from the order.
 29        /// </summary>
 030        public int AmountTotal { get; set; }
 31    }
 32}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommandHandler.html deleted file mode 100644 index c16abca6..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommandHandler.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.OrderHandler.CreateOrderCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.OrderHandler.CreateOrderCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\OrderHandler\CreateOrderCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:28
Coverable lines:28
Total lines:68
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\OrderHandler\CreateOrderCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateOrderCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.OrderHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateOrderCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateOrderCommandHandler : IRequestHandler<CreateOrderCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateOrderCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateOrderCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public CreateOrderCommandHandler(IApplicationDbContext dbContext, ILogger<CreateOrderCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{CreateOrderCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<CreateOrderCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="CreateOrderCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(CreateOrderCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = new Order
 047                {
 048                    UserEmail = request.UserEmail,
 049                    OrderName = "Order reference " + Guid.NewGuid(),
 050                    OrderDate = request.OrderDate,
 051                    LineItems = request.LineItems,
 052                    AmountTotal = request.AmountTotal,
 053                };
 54
 055                this.DbContext.Orders.Add(entity);
 056                await this.DbContext.SaveChangesAsync(cancellationToken);
 057                response = RequestResponse.Success(entity.Id);
 058            }
 059            catch (Exception ex)
 060            {
 061                this.Logger.LogError(ex, ErrorsManager.CreateOrderCommand);
 062                response = RequestResponse.Failure($"{ErrorsManager.CreateOrderCommand}. {ex.Message}. {ex.InnerExceptio
 063            }
 64
 065            return response;
 066        }
 67    }
 68}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommandValidator.html deleted file mode 100644 index 038f99a7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateOrderCommandValidator.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.OrderValidator.CreateOrderCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.OrderValidator.CreateOrderCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\CreateOrderCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:36
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\CreateOrderCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateOrderCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.OrderValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateOrderCommand}"/>.
 9    /// </summary>
 10    public class CreateOrderCommandValidator : AbstractValidator<CreateOrderCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateOrderCommandValidator"/> class.
 14        /// </summary>
 015        public CreateOrderCommandValidator()
 016        {
 017            this.RuleFor(v => v.UserEmail)
 018                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 019                .NotEmpty().WithMessage("UserEmail must not be empty")
 020                .NotNull().WithMessage("UserEmail must not be null");
 21
 022            this.RuleFor(v => v.OrderDate)
 023                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("OrderDate must be greater or equal with Cur
 024                .NotEmpty().WithMessage("OrderDate must not be empty")
 025                .NotNull().WithMessage("OrderDate must not be null");
 26
 027            this.RuleFor(v => v.LineItems)
 028                .MaximumLength(10000).WithMessage("LineItems maximum length exceeded")
 029                .NotEmpty().WithMessage("LineItems must not be empty")
 030                .NotNull().WithMessage("LineItems must not be null");
 31
 032            this.RuleFor(v => v.AmountTotal)
 033                .GreaterThan(0).WithMessage("AmountTotal must be greater than 0");
 034        }
 35    }
 36}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommand.html deleted file mode 100644 index abe95c19..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommand.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.ReceiptCommand.CreateReceiptCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.ReceiptCommand.CreateReceiptCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ReceiptCommand\CreateReceiptCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:4
Coverable lines:4
Total lines:32
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserEmail()100%10%
get_ReceiptDate()100%10%
get_ReceiptName()100%10%
get_ReceiptUrl()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ReceiptCommand\CreateReceiptCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateReceiptCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.ReceiptCommand
 6{
 7    /// <summary>
 8    /// A model to create a receipt.
 9    /// </summary>
 10    public class CreateReceiptCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 015        public string UserEmail { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The date when the receipt was generated.
 19        /// </summary>
 020        public DateTime ReceiptDate { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The name of the receipt.
 24        /// </summary>
 025        public string ReceiptName { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The url of the receipt.
 29        /// </summary>
 030        public string ReceiptUrl { get; set; }
 31    }
 32}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommandHandler.html deleted file mode 100644 index 3fe3754e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommandHandler.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.ReceiptHandler.CreateReceiptCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.ReceiptHandler.CreateReceiptCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ReceiptHandler\CreateReceiptCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:67
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ReceiptHandler\CreateReceiptCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateReceiptCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.ReceiptHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateReceiptCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateReceiptCommandHandler : IRequestHandler<CreateReceiptCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateReceiptCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateReceiptCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public CreateReceiptCommandHandler(IApplicationDbContext dbContext, ILogger<CreateReceiptCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{CreateReceiptCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<CreateReceiptCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="CreateReceiptCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(CreateReceiptCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = new Receipt
 047                {
 048                    UserEmail = request.UserEmail,
 049                    ReceiptDate = request.ReceiptDate,
 050                    ReceiptName = request.ReceiptName,
 051                    ReceiptUrl = request.ReceiptUrl,
 052                };
 53
 054                this.DbContext.Receipts.Add(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 056                response = RequestResponse.Success(entity.Id);
 057            }
 058            catch (Exception ex)
 059            {
 060                this.Logger.LogError(ex, ErrorsManager.CreateReceiptCommand);
 061                response = RequestResponse.Failure($"{ErrorsManager.CreateReceiptCommand}. {ex.Message}. {ex.InnerExcept
 062            }
 63
 064            return response;
 065        }
 66    }
 67}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommandValidator.html deleted file mode 100644 index 4f840c34..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateReceiptCommandValidator.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ReceiptValidator.CreateReceiptCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ReceiptValidator.CreateReceiptCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\CreateReceiptCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:19
Coverable lines:19
Total lines:38
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\CreateReceiptCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateReceiptCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ReceiptValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateReceiptCommand}"/>.
 9    /// </summary>
 10    public class CreateReceiptCommandValidator : AbstractValidator<CreateReceiptCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateReceiptCommandValidator"/> class.
 14        /// </summary>
 015        public CreateReceiptCommandValidator()
 016        {
 017            this.RuleFor(v => v.UserEmail)
 018                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 019                .NotEmpty().WithMessage("UserEmail must not be empty")
 020                .NotNull().WithMessage("UserEmail must not be null");
 21
 022            this.RuleFor(v => v.ReceiptDate)
 023                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("ReceiptDate must be greater or equal than C
 024                .NotEmpty().WithMessage("ReceiptDate must not be empty")
 025                .NotNull().WithMessage("ReceiptDate must not be null");
 26
 027            this.RuleFor(v => v.ReceiptName)
 028                .MaximumLength(200).WithMessage("ReceiptName maximum length exceeded")
 029                .NotEmpty().WithMessage("ReceiptName must not be empty")
 030                .NotNull().WithMessage("ReceiptName must not be null");
 31
 032            this.RuleFor(v => v.ReceiptUrl)
 033                .MaximumLength(500).WithMessage("ReceiptUrl maximum length exceeded")
 034                .NotEmpty().WithMessage("ReceiptUrl must not be empty")
 035                .NotNull().WithMessage("ReceiptUrl must not be null");
 036        }
 37    }
 38}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommand.html deleted file mode 100644 index 3d3f3826..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.RoleCommand.CreateRoleCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.RoleCommand.CreateRoleCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\RoleCommand\CreateRoleCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Name()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\RoleCommand\CreateRoleCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateRoleCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.RoleCommand
 6{
 7    /// <summary>
 8    /// A model to create a role.
 9    /// </summary>
 10    public class CreateRoleCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The name of the role.
 14        /// </summary>
 015        public string? Name { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Name()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommandHandler.html deleted file mode 100644 index 3c65f84a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.RoleHandler.CreateRoleCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.RoleHandler.CreateRoleCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\RoleHandler\CreateRoleCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:18
Coverable lines:18
Total lines:57
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_RoleService()100%10%
get_Logger()100%10%
Handle()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\RoleHandler\CreateRoleCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateRoleCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.RoleHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateRoleCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateRoleCommandHandler : IRequestHandler<CreateRoleCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateRoleCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="roleService">Gets An instance of <see cref="IRoleService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateRoleCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public CreateRoleCommandHandler(IRoleService roleService, ILogger<CreateRoleCommandHandler> logger)
 019        {
 020            this.RoleService = roleService;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IRoleService"/>.
 26        /// </summary>
 027        private IRoleService RoleService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{CreateRoleCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<CreateRoleCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="CreateRoleCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(CreateRoleCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                response = await this.RoleService.CreateRoleAsync(request);
 047            }
 048            catch (Exception ex)
 049            {
 050                this.Logger.LogError(ex, ErrorsManager.CreateRoleCommand);
 051                response = RequestResponse.Failure($"{ErrorsManager.CreateRoleCommand}. {ex.Message}. {ex.InnerException
 052            }
 53
 054            return response;
 055        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommandValidator.html deleted file mode 100644 index 1ebe2cbd..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateRoleCommandValidator.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.RoleValidator.CreateRoleCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.RoleValidator.CreateRoleCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\CreateRoleCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:23
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\CreateRoleCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateRoleCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.RoleValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateRoleCommand}"/>.
 9    /// </summary>
 10    public class CreateRoleCommandValidator : AbstractValidator<CreateRoleCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateRoleCommandValidator"/> class.
 14        /// </summary>
 015        public CreateRoleCommandValidator()
 016        {
 017            this.RuleFor(v => v.Name)
 018                .MaximumLength(100).WithMessage("Name maximum length exceeded")
 019                .NotEmpty().WithMessage("Name must not be empty")
 020                .NotNull().WithMessage("Name must not be null");
 021        }
 22    }
 23}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommand.html deleted file mode 100644 index 5bac6501..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommand.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.SubscriberCommand.CreateSubscriberCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.SubscriberCommand.CreateSubscriberCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\CreateSubscriberCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:42
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_DateStart()100%10%
get_CurrentPeriodEnd()100%10%
get_CustomerId()100%10%
get_SubscriptionId()100%10%
get_StripeSubscriptionId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\CreateSubscriberCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateSubscriberCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.SubscriberCommand
 6{
 7    /// <summary>
 8    /// A model to create a subscriber.
 9    /// </summary>
 10    public class CreateSubscriberCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the subscriber.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The started date of the subscriber.
 19        /// </summary>
 020        public DateTime DateStart { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The date when the current period ends.
 24        /// </summary>
 025        public DateTime CurrentPeriodEnd { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The customer id.
 29        /// </summary>
 030        public int CustomerId { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The subscription id.
 34        /// </summary>
 035        public int SubscriptionId { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The id of the stripe subscription.
 39        /// </summary>
 040        public string StripeSubscriptionId { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommandHandler.html deleted file mode 100644 index 317f9f3a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommandHandler.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.SubscriberHandler.CreateSubscriberCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.SubscriberHandler.CreateSubscriberCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\CreateSubscriberCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:43
Coverable lines:43
Total lines:91
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
get_UserService()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\CreateSubscriberCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateSubscriberCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.SubscriberHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateSubscriberCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateSubscriberCommandHandler : IRequestHandler<CreateSubscriberCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateSubscriberCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateSubscriberCommandHandler}"/>.</param>
 17        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 019        public CreateSubscriberCommandHandler(IApplicationDbContext dbContext, ILogger<CreateSubscriberCommandHandler> l
 020        {
 021            this.DbContext = dbContext;
 022            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 023            this.UserService = userService;
 024        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{CreateSubscriberCommandHandler}"/>.
 33        /// </summary>
 034        private ILogger<CreateSubscriberCommandHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IUserService"/>.
 38        /// </summary>
 039        private IUserService UserService { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="CreateSubscriberCommand"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 47        public async Task<RequestResponse> Handle(CreateSubscriberCommand request, CancellationToken cancellationToken)
 048        {
 49            RequestResponse? response;
 50
 51            try
 052            {
 053                Subscriber entity = this.DbContext.Subscribers
 054                    .TagWith(nameof(CreateSubscriberCommandHandler))
 055                    .FirstOrDefault(x => x.Id == request.Id);
 056                if (entity != null)
 057                {
 058                    throw new Exception("The subscriber already exists");
 59                }
 60
 061                var customer = await this.UserService.FindUserByIdAsync(request.CustomerId);
 062                var subscription = this.DbContext.Subscriptions
 063                    .TagWith(nameof(CreateSubscriberCommandHandler))
 064                    .FirstOrDefault(x => x.Id == request.SubscriptionId);
 65
 066                entity = new Subscriber
 067                {
 068                    Status = SubscriptionStatus.Inactive,
 069                    CurrentPeriodEnd = request.CurrentPeriodEnd,
 070                    CurrentPeriodStart = request.DateStart,
 071                    DateStart = request.DateStart,
 072                    Customer = customer,
 073                    Subscription = subscription,
 074                    StripeSubscriberSubscriptionId = string.Empty,
 075                    HostedInvoiceUrl = string.Empty,
 076                };
 77
 078                this.DbContext.Subscribers.Add(entity);
 079                await this.DbContext.SaveChangesAsync(cancellationToken);
 080                response = RequestResponse.Success(entity.Id);
 081            }
 082            catch (Exception ex)
 083            {
 084                this.Logger.LogError(ex, ErrorsManager.CreateSubscriberCommand);
 085                response = RequestResponse.Failure($"{ErrorsManager.CreateSubscriberCommand}. {ex.Message}. {ex.InnerExc
 086            }
 87
 088            return response;
 089        }
 90    }
 91}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommandValidator.html deleted file mode 100644 index 6ea5b83e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriberCommandValidator.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriberValidator.CreateSubscriberCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriberValidator.CreateSubscriberCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\CreateSubscriberCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:20
Coverable lines:20
Total lines:41
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\CreateSubscriberCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateSubscriberCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriberValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateSubscriberCommand}"/>.
 9    /// </summary>
 10    public class CreateSubscriberCommandValidator : AbstractValidator<CreateSubscriberCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateSubscriberCommandValidator"/> class.
 14        /// </summary>
 015        public CreateSubscriberCommandValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .Equal(0).WithMessage("Id must be equal with 0");
 19
 020            this.RuleFor(x => x.DateStart)
 021                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("DateStart must be greater or equal than Cur
 022                .NotEmpty().WithMessage("DateStart must not be empty")
 023                .NotNull().WithMessage("DateStart must not be null");
 24
 025            this.RuleFor(x => x.CurrentPeriodEnd)
 026                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("CurrentPeriodEnd must be greater or equal t
 027                .NotEmpty().WithMessage("CurrentPeriodEnd must not be empty")
 028                .NotNull().WithMessage("CurrentPeriodEnd must not be null");
 29
 030            this.RuleFor(x => x.CustomerId)
 031                .GreaterThan(0).WithMessage("CustomerId must be greater than 0");
 32
 033            this.RuleFor(x => x.SubscriptionId)
 034                .GreaterThan(0).WithMessage("SubscriptionId must be greater than 0");
 35
 036            this.RuleFor(x => x.StripeSubscriptionId)
 037                .NotEmpty().WithMessage("StripeSubscriptionId must not be empty")
 038                .NotNull().WithMessage("StripeSubscriptionId must not be null");
 039        }
 40    }
 41}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommand.html deleted file mode 100644 index bf9a1ae9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommand.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.SubscriptionCommand.CreateSubscriptionCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.SubscriptionCommand.CreateSubscriptionCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriptionCommand\CreateSubscriptionCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:47
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_StripeSubscriptionId()100%10%
get_Name()100%10%
get_Price()100%10%
get_Options()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriptionCommand\CreateSubscriptionCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateSubscriptionCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.SubscriptionCommand
 6{
 7    /// <summary>
 8    /// A model to create a subscription.
 9    /// </summary>
 10    public class CreateSubscriptionCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the subscription.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the stripe subscription.
 19        /// </summary>
 020        public string StripeSubscriptionId { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The name of the subscription.
 24        /// </summary>
 025        public string Name { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The price of the subscription.
 29        /// </summary>
 030        public int Price { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The options of the subscription.
 34        /// </summary>
 035        public string Options { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The image name of the subscription.
 39        /// </summary>
 040        public string ImageName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The image path of the subscription.
 44        /// </summary>
 045        public string ImagePath { get; set; }
 46    }
 47}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommandHandler.html deleted file mode 100644 index ee864204..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommandHandler.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.SubscriptionHandler.CreateSubscriptionCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.SubscriptionHandler.CreateSubscriptionCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriptionHandler\CreateSubscriptionCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:38
Coverable lines:38
Total lines:80
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriptionHandler\CreateSubscriptionCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateSubscriptionCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.SubscriptionHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateSubscriptionCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateSubscriptionCommandHandler : IRequestHandler<CreateSubscriptionCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateSubscriptionCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateSubscriptionCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public CreateSubscriptionCommandHandler(IApplicationDbContext dbContext, ILogger<CreateSubscriptionCommandHandle
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{CreateSubscriptionCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<CreateSubscriptionCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="CreateSubscriptionCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(CreateSubscriptionCommand request, CancellationToken cancellationToken
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Subscriptions
 047                    .TagWith(nameof(CreateSubscriptionCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity != null)
 050                {
 051                    throw new Exception("The subscription already exists");
 52                }
 53
 054                entity = new Subscription
 055                {
 056                    StripeSubscriptionId = request.StripeSubscriptionId,
 057                    Name = request.Name,
 058                    Price = request.Price,
 059                    Currency = "usd",
 060                    CurrencySymbol = "$",
 061                    ChargeType = "month",
 062                    Options = request.Options,
 063                    ImagePath = request.ImagePath,
 064                    ImageName = request.ImageName,
 065                };
 66
 067                this.DbContext.Subscriptions.Add(entity);
 068                await this.DbContext.SaveChangesAsync(cancellationToken);
 069                response = RequestResponse.Success(entity.Id);
 070            }
 071            catch (Exception ex)
 072            {
 073                this.Logger.LogError(ex, ErrorsManager.CreateSubscriptionCommand);
 074                response = RequestResponse.Failure($"{ErrorsManager.CreateSubscriptionCommand}. {ex.Message}. {ex.InnerE
 075            }
 76
 077            return response;
 078        }
 79    }
 80}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommandValidator.html deleted file mode 100644 index 825064cb..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateSubscriptionCommandValidator.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriptionValidator.CreateSubscriptionCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriptionValidator.CreateSubscriptionCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriptionValidator\CreateSubscriptionCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:34
Coverable lines:34
Total lines:70
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriptionValidator\CreateSubscriptionCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateSubscriptionCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriptionValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateSubscriptionCommand}"/>.
 9    /// </summary>
 10    public class CreateSubscriptionCommandValidator : AbstractValidator<CreateSubscriptionCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateSubscriptionCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public CreateSubscriptionCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(x => x.Id)
 021                .Equal(0).WithMessage("Id must be equal with 0");
 22
 023            this.RuleFor(x => x.StripeSubscriptionId)
 024                .NotEmpty().WithMessage("StripeSubscriptionId must not be empty")
 025                .NotNull().WithMessage("StripeSubscriptionId must not be null");
 26
 027            this.RuleFor(x => x.Name)
 028                .MaximumLength(200).WithMessage("Name maximum length exceeded")
 029                .NotEmpty().WithMessage("Name must not be empty")
 030                .NotNull().WithMessage("Name must not be null")
 031                .MustAsync(this.HaveUniqueName).WithMessage("The specified name already exists.");
 32
 033            this.RuleFor(x => x.Price)
 034                .GreaterThan(0).WithMessage("Price must be greater than 0");
 35
 036            this.RuleFor(x => x.Options)
 037                .MaximumLength(1000).WithMessage("Options maximum length exceeded")
 038                .NotEmpty().WithMessage("Options must not be empty")
 039                .NotNull().WithMessage("Options must not be null");
 40
 041            this.RuleFor(x => x.ImageName)
 042                .MaximumLength(200).WithMessage("ImageName maximum length exceeded")
 043                .NotEmpty().WithMessage("ImageName must not be empty")
 044                .NotNull().WithMessage("ImageName must not be null");
 45
 046            this.RuleFor(x => x.ImagePath)
 047                .MaximumLength(200).WithMessage("ImagePath maximum length exceeded")
 048                .NotEmpty().WithMessage("ImagePath must not be empty")
 049                .NotNull().WithMessage("ImagePath must not be null");
 050        }
 51
 52        /// <summary>
 53        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 54        /// </summary>
 055        private IApplicationDbContext Context { get; }
 56
 57        /// <summary>
 58        /// Gets a value indicating whether the subscription has an unique name or not.
 59        /// </summary>
 60        /// <param name="name">The name of the subscription.</param>
 61        /// <param name="cancellationToken">The cancellation token.</param>
 62        /// <returns>A boolean value.</returns>
 63        public async Task<bool> HaveUniqueName(string name, CancellationToken cancellationToken)
 064        {
 065            return await this.Context.Carts
 066                .TagWith(nameof(this.HaveUniqueName))
 067                .AllAsync(l => l.Name != name, cancellationToken);
 068        }
 69    }
 70}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommand.html deleted file mode 100644 index 5439e0b8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommand.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.TodoItemCommand.CreateTodoItemCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.TodoItemCommand.CreateTodoItemCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoItemCommand\CreateTodoItemCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:42
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_ListId()100%10%
get_Title()100%10%
get_Note()100%10%
get_Priority()100%10%
get_State()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoItemCommand\CreateTodoItemCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateTodoItemCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.TodoItemCommand
 6{
 7    /// <summary>
 8    /// A model to create an item.
 9    /// </summary>
 10    public class CreateTodoItemCommand : IRequest<Result<TodoItemResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the item.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the list.
 19        /// </summary>
 020        public int ListId { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The title of the item.
 24        /// </summary>
 025        public string? Title { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The note of the item.
 29        /// </summary>
 030        public string? Note { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The priority of the item.
 34        /// </summary>
 035        public TodoItemPriority Priority { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The state of the item.
 39        /// </summary>
 040        public TodoItemState State { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommandHandler.html deleted file mode 100644 index 8b2b101e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommandHandler.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.TodoItemHandler.CreateTodoItemCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.TodoItemHandler.CreateTodoItemCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoItemHandler\CreateTodoItemCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:44
Coverable lines:44
Total lines:91
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle()0%60%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoItemHandler\CreateTodoItemCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateTodoItemCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.TodoItemHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateTodoItemCommand, TodoItemResponse}"/>.
 9    /// </summary>
 10    public class CreateTodoItemCommandHandler : IRequestHandler<CreateTodoItemCommand, Result<TodoItemResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateTodoItemCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateTodoItemCommandHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 019        public CreateTodoItemCommandHandler(IApplicationDbContext dbContext, ILogger<CreateTodoItemCommandHandler> logge
 020        {
 021            this.DbContext = dbContext;
 022            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 023            this.Mapper = mapper;
 024        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{CreateTodoItemCommandHandler}"/>.
 33        /// </summary>
 034        private ILogger<CreateTodoItemCommandHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="CreateTodoItemCommand"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{TodoItemResponse}"/>.</returns>
 47        public async Task<Result<TodoItemResponse>> Handle(CreateTodoItemCommand request, CancellationToken cancellation
 048        {
 49            Result<TodoItemResponse>? response;
 50
 51            try
 052            {
 053                var list = this.DbContext.TodoLists
 054                    .TagWith(nameof(CreateTodoItemCommandHandler))
 055                    .FirstOrDefault(x => x.Id == request.ListId);
 056                if (list != null)
 057                {
 058                    throw new Exception("The todo list record already exists in the database");
 59                }
 60
 061                var entity = new TodoItem
 062                {
 063                    List = list,
 064                    Title = request.Title,
 065                    Note = request.Note,
 066                    Priority = request.Priority,
 067                    State = request.State,
 068                    Done = false,
 069                };
 70
 071                this.DbContext.TodoItems.Add(entity);
 072                await this.DbContext.SaveChangesAsync(cancellationToken);
 073                response = new Result<TodoItemResponse>
 074                {
 075                    Successful = true,
 076                    Item = this.Mapper.Map<TodoItemResponse>(entity) ?? new TodoItemResponse(),
 077                };
 078            }
 079            catch (Exception ex)
 080            {
 081                this.Logger.LogError(ex, ErrorsManager.CreateTodoItemCommand);
 082                response = new Result<TodoItemResponse>
 083                {
 084                    Error = $"{ErrorsManager.CreateTodoItemCommand}. {ex.Message}. {ex.InnerException?.Message}",
 085                };
 086            }
 87
 088            return response;
 089        }
 90    }
 91}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommandValidator.html deleted file mode 100644 index 30ebb059..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoItemCommandValidator.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.TodoItemValidator.CreateTodoItemCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.TodoItemValidator.CreateTodoItemCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoItemValidator\CreateTodoItemCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:29
Coverable lines:29
Total lines:64
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueTitle()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoItemValidator\CreateTodoItemCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateTodoItemCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.TodoItemValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateTodoItemCommand}"/>.
 9    /// </summary>
 10    public class CreateTodoItemCommandValidator : AbstractValidator<CreateTodoItemCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateTodoItemCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public CreateTodoItemCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(x => x.Id)
 021                .Equal(0).WithMessage("Id must be equal with 0");
 22
 023            this.RuleFor(x => x.ListId)
 024                .GreaterThan(0).WithMessage("ListId must be greater than 0");
 25
 026            this.RuleFor(x => x.Title)
 027                .MaximumLength(200).WithMessage("Title maximum length exceeded")
 028                .NotEmpty().WithMessage("Title must not be empty")
 029                .NotNull().WithMessage("Title must not be null")
 030                .MustAsync(this.HaveUniqueTitle).WithMessage("The specified title already exists.");
 31
 032            this.RuleFor(x => x.Note)
 033                .MaximumLength(1000).WithMessage("Note maximum length exceeded")
 034                .NotEmpty().WithMessage("Note must not be empty")
 035                .NotNull().WithMessage("Note must not be null");
 36
 037            this.RuleFor(x => x.Priority)
 038                .NotEmpty().WithMessage("Priority must not be empty")
 039                .NotNull().WithMessage("Priority must not be null");
 40
 041            this.RuleFor(x => x.State)
 042                .NotEmpty().WithMessage("State must not be empty")
 043                .NotNull().WithMessage("State must not be null");
 044        }
 45
 46        /// <summary>
 47        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 48        /// </summary>
 049        private IApplicationDbContext Context { get; }
 50
 51        /// <summary>
 52        /// Gets a value indicating whether the item has an unique title or not.
 53        /// </summary>
 54        /// <param name="title">The title of the item.</param>
 55        /// <param name="cancellationToken">The cancellation token.</param>
 56        /// <returns>A boolean value.</returns>
 57        public async Task<bool> HaveUniqueTitle(string title, CancellationToken cancellationToken)
 058        {
 059            return await this.Context.TodoItems
 060                .TagWith(nameof(this.HaveUniqueTitle))
 061                .AllAsync(l => l.Title != title, cancellationToken);
 062        }
 63    }
 64}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommand.html deleted file mode 100644 index f513b1d7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommand.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.TodoListCommand.CreateTodoListCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.TodoListCommand.CreateTodoListCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoListCommand\CreateTodoListCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Title()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoListCommand\CreateTodoListCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateTodoListCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.TodoListCommand
 6{
 7    /// <summary>
 8    /// A model to create a list.
 9    /// </summary>
 10    public class CreateTodoListCommand : IRequest<Result<TodoListResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the list.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The title of the list.
 19        /// </summary>
 020        public string? Title { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Id()
-get_Title()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommandHandler.html deleted file mode 100644 index f0080eaf..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommandHandler.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.TodoListHandler.CreateTodoListCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.TodoListHandler.CreateTodoListCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoListHandler\CreateTodoListCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:33
Coverable lines:33
Total lines:78
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoListHandler\CreateTodoListCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateTodoListCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.TodoListHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateTodoListCommand, TodoListResponse}"/>.
 9    /// </summary>
 10    public class CreateTodoListCommandHandler : IRequestHandler<CreateTodoListCommand, Result<TodoListResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateTodoListCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateTodoListCommandHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 019        public CreateTodoListCommandHandler(IApplicationDbContext dbContext, ILogger<CreateTodoListCommandHandler> logge
 020        {
 021            this.DbContext = dbContext;
 022            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 023            this.Mapper = mapper;
 024        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{CreateTodoListCommandHandler}"/>.
 33        /// </summary>
 034        private ILogger<CreateTodoListCommandHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="CreateTodoListCommand"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{TodoListResponse}"/>.</returns>
 47        public async Task<Result<TodoListResponse>> Handle(CreateTodoListCommand request, CancellationToken cancellation
 048        {
 49            Result<TodoListResponse>? response;
 50
 51            try
 052            {
 053                var entity = new TodoList
 054                {
 055                    Title = request.Title,
 056                };
 57
 058                this.DbContext.TodoLists.Add(entity);
 059                await this.DbContext.SaveChangesAsync(cancellationToken);
 060                response = new Result<TodoListResponse>
 061                {
 062                    Successful = true,
 063                    Item = this.Mapper.Map<TodoListResponse>(entity) ?? new TodoListResponse(),
 064                };
 065            }
 066            catch (Exception ex)
 067            {
 068                this.Logger.LogError(ex, ErrorsManager.CreateTodoListCommand);
 069                response = new Result<TodoListResponse>
 070                {
 071                    Error = $"{ErrorsManager.CreateTodoListCommand}. {ex.Message}. {ex.InnerException?.Message}",
 072                };
 073            }
 74
 075            return response;
 076        }
 77    }
 78}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommandValidator.html deleted file mode 100644 index 30a63777..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateTodoListCommandValidator.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.TodoListValidator.CreateTodoListCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.TodoListValidator.CreateTodoListCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoListValidator\CreateTodoListCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:48
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueTitle()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoListValidator\CreateTodoListCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateTodoListCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.TodoListValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateTodoListCommand}"/>.
 9    /// </summary>
 10    public class CreateTodoListCommandValidator : AbstractValidator<CreateTodoListCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateTodoListCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public CreateTodoListCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(x => x.Id)
 021                .Equal(0).WithMessage("Id must be equal with 0");
 22
 023            this.RuleFor(x => x.Title)
 024                .MaximumLength(200).WithMessage("Title maximum length exceeded")
 025                .NotEmpty().WithMessage("Title must not be empty")
 026                .NotNull().WithMessage("Title must not be null")
 027                .MustAsync(this.HaveUniqueTitle).WithMessage("The specified title already exists.");
 028        }
 29
 30        /// <summary>
 31        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 32        /// </summary>
 033        private IApplicationDbContext Context { get; }
 34
 35        /// <summary>
 36        /// Gets a value indicating whether the list has an unique title or not.
 37        /// </summary>
 38        /// <param name="name">The name of the list.</param>
 39        /// <param name="cancellationToken">The cancellation token.</param>
 40        /// <returns>A boolean value.</returns>
 41        public async Task<bool> HaveUniqueTitle(string name, CancellationToken cancellationToken)
 042        {
 043            return await this.Context.Carts
 044                .TagWith(nameof(this.HaveUniqueTitle))
 045                .AllAsync(l => l.Name != name, cancellationToken);
 046        }
 47    }
 48}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommand.html deleted file mode 100644 index d1cb1702..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommand.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.UserCommand.CreateUserCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.UserCommand.CreateUserCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\CreateUserCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
50%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:2
Uncovered lines:2
Coverable lines:4
Total lines:32
Line coverage:50%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Email()100%10%
get_FirstName()100%1100%
get_LastName()100%1100%
get_Role()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\CreateUserCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateUserCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.UserCommand
 6{
 7    /// <summary>
 8    /// A model to create an user.
 9    /// </summary>
 10    public class CreateUserCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 015        public string? Email { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The first name of the user.
 19        /// </summary>
 120        public string? FirstName { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The last name of the user.
 24        /// </summary>
 125        public string? LastName { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The role of the user.
 29        /// </summary>
 030        public string? Role { get; set; }
 31    }
 32}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommandHandler.html deleted file mode 100644 index c3f41e4e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.UserHandler.CreateUserCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.UserHandler.CreateUserCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\CreateUserCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:57
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\CreateUserCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateUserCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{CreateUserCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class CreateUserCommandHandler : IRequestHandler<CreateUserCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateUserCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateUserCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public CreateUserCommandHandler(IUserService userService, ILogger<CreateUserCommandHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 227        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{CreateUserCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<CreateUserCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="CreateUserCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(CreateUserCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                response = await this.UserService.CreateUserAsync(request);
 147            }
 148            catch (Exception ex)
 149            {
 150                this.Logger.LogError(ex, ErrorsManager.CreateUserCommand);
 151                response = RequestResponse.Failure($"{ErrorsManager.CreateUserCommand}. {ex.Message}. {ex.InnerException
 152            }
 53
 254            return response;
 255        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommandValidator.html deleted file mode 100644 index 2a3fde6f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_CreateUserCommandValidator.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.UserValidator.CreateUserCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.UserValidator.CreateUserCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\CreateUserCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:31
Coverable lines:31
Total lines:59
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
IsValidEmailAddress(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\CreateUserCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CreateUserCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.UserValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{CreateUserCommand}"/>.
 9    /// </summary>
 10    public class CreateUserCommandValidator : AbstractValidator<CreateUserCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CreateUserCommandValidator"/> class.
 14        /// </summary>
 015        public CreateUserCommandValidator()
 016        {
 017            this.RuleFor(v => v.Email)
 018                .MaximumLength(150).WithMessage("Email maximum length exceeded")
 019                .NotEmpty().WithMessage("Email must not be empty")
 020                .NotNull().WithMessage("Email must not be null")
 021                .Must(this.IsValidEmailAddress).WithMessage("The value is not a valid email address");
 22
 023            this.RuleFor(v => v.FirstName)
 024                .MaximumLength(100).WithMessage("FirstName maximum length exceeded")
 025                .NotEmpty().WithMessage("FirstName must not be empty")
 026                .NotNull().WithMessage("FirstName must not be null");
 27
 028            this.RuleFor(v => v.LastName)
 029                .MaximumLength(100).WithMessage("LastName maximum length exceeded")
 030                .NotEmpty().WithMessage("LastName must not be empty")
 031                .NotNull().WithMessage("LastName must not be null");
 32
 033            this.RuleFor(v => v.Role)
 034                .MaximumLength(25).WithMessage("Role maximum length exceeded")
 035                .NotEmpty().WithMessage("Role must not be empty")
 036                .NotNull().WithMessage("Role must not be null");
 037        }
 38
 39        /// <summary>
 40        /// Gets a value indicating whether the user has a valid email or not.
 41        /// </summary>
 42        /// <param name="emailAddress">The email address.</param>
 43        /// <returns>A boolean value.</returns>
 44        public bool IsValidEmailAddress(string emailAddress)
 045        {
 046            var isEmailValid = false;
 47            try
 048            {
 049                _ = new MailAddress(emailAddress);
 050                isEmailValid = true;
 051            }
 052            catch (Exception)
 053            {
 054            }
 55
 056            return isEmailValid;
 057        }
 58    }
 59}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommand.html deleted file mode 100644 index ca1fdc84..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.CartCommand.DeleteAllCartsCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.CartCommand.DeleteAllCartsCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\CartCommand\DeleteAllCartsCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\CartCommand\DeleteAllCartsCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteAllCartsCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.CartCommand
 6{
 7    /// <summary>
 8    /// A model to delete all the carts.
 9    /// </summary>
 10    public class DeleteAllCartsCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 015        public int UserId { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_UserId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommandHandler.html deleted file mode 100644 index a208f0e2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommandHandler.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.CartHandler.DeleteAllCartsCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.CartHandler.DeleteAllCartsCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\CartHandler\DeleteAllCartsCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:62
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\CartHandler\DeleteAllCartsCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteAllCartsCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.CartHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteAllCartsCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteAllCartsCommandHandler : IRequestHandler<DeleteAllCartsCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteAllCartsCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteAllCartsCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteAllCartsCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteAllCartsCommandHandler> logge
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteAllCartsCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteAllCartsCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteAllCartsCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteAllCartsCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                this.DbContext.Carts.RemoveRange(
 047                    this.DbContext.Carts
 048                        .TagWith(nameof(DeleteAllCartsCommandHandler))
 049                        .Where(x => x.User.Id == request.UserId));
 050                await this.DbContext.SaveChangesAsync(cancellationToken);
 051                response = RequestResponse.Success();
 052            }
 053            catch (Exception ex)
 054            {
 055                this.Logger.LogError(ex, ErrorsManager.DeleteAllCartsCommand);
 056                response = RequestResponse.Failure($"{ErrorsManager.DeleteAllCartsCommand}. {ex.Message}. {ex.InnerExcep
 057            }
 58
 059            return response;
 060        }
 61    }
 62}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommandValidator.html deleted file mode 100644 index 8d34a4d5..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteAllCartsCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.CartValidator.DeleteAllCartsCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.CartValidator.DeleteAllCartsCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\DeleteAllCartsCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\DeleteAllCartsCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteAllCartsCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.CartValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteAllCartsCommand}"/>.
 9    /// </summary>
 10    public class DeleteAllCartsCommandValidator : AbstractValidator<DeleteAllCartsCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteAllCartsCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteAllCartsCommandValidator()
 016        {
 017            this.RuleFor(v => v.UserId)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommand.html deleted file mode 100644 index 69f57536..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommand.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.CartCommand.DeleteCartCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.CartCommand.DeleteCartCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\CartCommand\DeleteCartCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\CartCommand\DeleteCartCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteCartCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.CartCommand
 6{
 7    /// <summary>
 8    /// A model to delete a cart.
 9    /// </summary>
 10    public class DeleteCartCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the cart.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the user.
 19        /// </summary>
 020        public int UserId { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Id()
-get_UserId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommandHandler.html deleted file mode 100644 index b4608f32..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommandHandler.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.CartHandler.DeleteCartCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.CartHandler.DeleteCartCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\CartHandler\DeleteCartCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:67
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\CartHandler\DeleteCartCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteCartCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.CartHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteCartCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteCartCommandHandler : IRequestHandler<DeleteCartCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteCartCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteCartCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteCartCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteCartCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteCartCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteCartCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteCartCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteCartCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Carts
 047                    .TagWith(nameof(DeleteCartCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id && x.User.Id == request.UserId);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The cart does not exists");
 52                }
 53
 054                this.DbContext.Carts.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 056                response = RequestResponse.Success(entity.Id);
 057            }
 058            catch (Exception ex)
 059            {
 060                this.Logger.LogError(ex, ErrorsManager.DeleteCartCommand);
 061                response = RequestResponse.Failure($"{ErrorsManager.DeleteCartCommand}. {ex.Message}. {ex.InnerException
 062            }
 63
 064            return response;
 065        }
 66    }
 67}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommandValidator.html deleted file mode 100644 index 74f20ac3..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteCartCommandValidator.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.CartValidator.DeleteCartCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.CartValidator.DeleteCartCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\DeleteCartCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:24
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\DeleteCartCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteCartCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.CartValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteCartCommand}"/>.
 9    /// </summary>
 10    public class DeleteCartCommandValidator : AbstractValidator<DeleteCartCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteCartCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteCartCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(v => v.UserId)
 021                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 022        }
 23    }
 24}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommand.html deleted file mode 100644 index 6d889620..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.ClotheCommand.DeleteClotheCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.ClotheCommand.DeleteClotheCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ClotheCommand\DeleteClotheCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1
Uncovered lines:0
Coverable lines:1
Total lines:17
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ClotheCommand\DeleteClotheCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteClotheCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.ClotheCommand
 6{
 7    /// <summary>
 8    /// A model to delete a clothe.
 9    /// </summary>
 10    public class DeleteClotheCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the clothe.
 14        /// </summary>
 415        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommandHandler.html deleted file mode 100644 index 440326c1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommandHandler.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.ClotheHandler.DeleteClotheCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.ClotheHandler.DeleteClotheCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ClotheHandler\DeleteClotheCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
92%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:25
Uncovered lines:2
Coverable lines:27
Total lines:69
Line coverage:92.5%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:3
Total branches:6
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%1100%
get_Logger()100%1100%
Handle()50%490%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ClotheHandler\DeleteClotheCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteClotheCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.ClotheHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteClotheCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteClotheCommandHandler : IRequestHandler<DeleteClotheCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteClotheCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteClotheCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public DeleteClotheCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteClotheCommandHandler> logger)
 219        {
 220            this.DbContext = dbContext;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 427        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteClotheCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<DeleteClotheCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteClotheCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteClotheCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                var entity = this.DbContext.Clothes
 247                    .TagWith(nameof(DeleteClotheCommandHandler))
 248                    .SingleOrDefault(d => d.Id == request.Id && d.IsActive == true);
 149                if (entity == null)
 050                {
 051                    throw new Exception("The clothe does not exists");
 52                }
 53
 154                entity.IsActive = false;
 55
 156                this.DbContext.Clothes.Update(entity);
 157                await this.DbContext.SaveChangesAsync(cancellationToken);
 158                response = RequestResponse.Success(entity.Id);
 159            }
 160            catch (Exception ex)
 161            {
 162                this.Logger.LogError(ex, ErrorsManager.DeleteClotheCommand);
 163                response = RequestResponse.Failure($"{ErrorsManager.DeleteClotheCommand}. {ex.Message}. {ex.InnerExcepti
 164            }
 65
 266            return response;
 267        }
 68    }
 69}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommandValidator.html deleted file mode 100644 index ff0ce647..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteClotheCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ClotheValidator.DeleteClotheCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ClotheValidator.DeleteClotheCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ClotheValidator\DeleteClotheCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ClotheValidator\DeleteClotheCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteClotheCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ClotheValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteClotheCommand}"/>.
 9    /// </summary>
 10    public class DeleteClotheCommandValidator : AbstractValidator<DeleteClotheCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteClotheCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteClotheCommandValidator()
 016        {
 017            _ = this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommand.html deleted file mode 100644 index c09145ca..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.InvoiceCommand.DeleteInvoiceCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.InvoiceCommand.DeleteInvoiceCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\InvoiceCommand\DeleteInvoiceCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\InvoiceCommand\DeleteInvoiceCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteInvoiceCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.InvoiceCommand
 6{
 7    /// <summary>
 8    /// A model to delete an invoice.
 9    /// </summary>
 10    public class DeleteInvoiceCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the invoice.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommandHandler.html deleted file mode 100644 index 24157959..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommandHandler.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.InvoiceHandler.DeleteInvoiceCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.InvoiceHandler.DeleteInvoiceCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\InvoiceHandler\DeleteInvoiceCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:67
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\InvoiceHandler\DeleteInvoiceCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteInvoiceCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.InvoiceHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteInvoiceCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteInvoiceCommandHandler : IRequestHandler<DeleteInvoiceCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteInvoiceCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteInvoiceCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteInvoiceCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteInvoiceCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteInvoiceCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteInvoiceCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteInvoiceCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteInvoiceCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Invoices
 047                    .TagWith(nameof(DeleteInvoiceCommandHandler))
 048                    .SingleOrDefault(d => d.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The invoice does not exists");
 52                }
 53
 054                this.DbContext.Invoices.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 056                response = RequestResponse.Success(entity.Id);
 057            }
 058            catch (Exception ex)
 059            {
 060                this.Logger.LogError(ex, ErrorsManager.DeleteInvoiceCommand);
 061                response = RequestResponse.Failure($"{ErrorsManager.DeleteInvoiceCommand}. {ex.Message}. {ex.InnerExcept
 062            }
 63
 064            return response;
 065        }
 66    }
 67}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommandValidator.html deleted file mode 100644 index 9bed5cbf..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteInvoiceCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.InvoiceValidator.DeleteInvoiceCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.InvoiceValidator.DeleteInvoiceCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\InvoiceValidator\DeleteInvoiceCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\InvoiceValidator\DeleteInvoiceCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteInvoiceCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.InvoiceValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteInvoiceCommand}"/>.
 9    /// </summary>
 10    public class DeleteInvoiceCommandValidator : AbstractValidator<DeleteInvoiceCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteInvoiceCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteInvoiceCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommand.html deleted file mode 100644 index cccca0da..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.MusicCommand.DeleteMusicCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.MusicCommand.DeleteMusicCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\MusicCommand\DeleteMusicCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\MusicCommand\DeleteMusicCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteMusicCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.MusicCommand
 6{
 7    /// <summary>
 8    /// A model to delete a music.
 9    /// </summary>
 10    public class DeleteMusicCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the music.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommandHandler.html deleted file mode 100644 index ac641f0e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommandHandler.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.MusicHandler.DeleteMusicCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.MusicHandler.DeleteMusicCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\MusicHandler\DeleteMusicCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:67
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\MusicHandler\DeleteMusicCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteMusicCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.MusicHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteMusicCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteMusicCommandHandler : IRequestHandler<DeleteMusicCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteMusicCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteMusicCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteMusicCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteMusicCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteMusicCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteMusicCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteMusicCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteMusicCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Musics
 047                    .TagWith(nameof(DeleteMusicCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The music does not exists");
 52                }
 53
 054                this.DbContext.Musics.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 056                response = RequestResponse.Success(entity.Id);
 057            }
 058            catch (Exception ex)
 059            {
 060                this.Logger.LogError(ex, ErrorsManager.DeleteMusicCommand);
 061                response = RequestResponse.Failure($"{ErrorsManager.DeleteMusicCommand}. {ex.Message}. {ex.InnerExceptio
 062            }
 63
 064            return response;
 065        }
 66    }
 67}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommandValidator.html deleted file mode 100644 index 17b5a2c5..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteMusicCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.MusicValidator.DeleteMusicCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.MusicValidator.DeleteMusicCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\MusicValidator\DeleteMusicCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\MusicValidator\DeleteMusicCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteMusicCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.MusicValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteMusicCommand}"/>.
 9    /// </summary>
 10    public class DeleteMusicCommandValidator : AbstractValidator<DeleteMusicCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteMusicCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteMusicCommandValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommand.html deleted file mode 100644 index f6a52f6f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.OrderCommand.DeleteOrderCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.OrderCommand.DeleteOrderCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\OrderCommand\DeleteOrderCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\OrderCommand\DeleteOrderCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteOrderCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.OrderCommand
 6{
 7    /// <summary>
 8    /// A model to delete an order.
 9    /// </summary>
 10    public class DeleteOrderCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the order.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommandHandler.html deleted file mode 100644 index 55fcc092..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommandHandler.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.OrderHandler.DeleteOrderCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.OrderHandler.DeleteOrderCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\OrderHandler\DeleteOrderCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:67
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\OrderHandler\DeleteOrderCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteOrderCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.OrderHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteOrderCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteOrderCommandHandler : IRequestHandler<DeleteOrderCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteOrderCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteOrderCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteOrderCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteOrderCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteOrderCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteOrderCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteOrderCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteOrderCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Orders
 047                    .TagWith(nameof(DeleteOrderCommandHandler))
 048                    .SingleOrDefault(d => d.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The order does not exists");
 52                }
 53
 054                this.DbContext.Orders.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 056                response = RequestResponse.Success(entity.Id);
 057            }
 058            catch (Exception ex)
 059            {
 060                this.Logger.LogError(ex, ErrorsManager.DeleteOrderCommand);
 061                response = RequestResponse.Failure($"{ErrorsManager.DeleteOrderCommand}. {ex.Message}. {ex.InnerExceptio
 062            }
 63
 064            return response;
 065        }
 66    }
 67}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommandValidator.html deleted file mode 100644 index dd460d50..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteOrderCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.OrderValidator.DeleteOrderCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.OrderValidator.DeleteOrderCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\DeleteOrderCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\DeleteOrderCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteOrderCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.OrderValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteOrderCommand}"/>.
 9    /// </summary>
 10    public class DeleteOrderCommandValidator : AbstractValidator<DeleteOrderCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteOrderCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteOrderCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommand.html deleted file mode 100644 index f259b907..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.ReceiptCommand.DeleteReceiptCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.ReceiptCommand.DeleteReceiptCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ReceiptCommand\DeleteReceiptCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ReceiptCommand\DeleteReceiptCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteReceiptCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.ReceiptCommand
 6{
 7    /// <summary>
 8    /// A model to delete a receipt.
 9    /// </summary>
 10    public class DeleteReceiptCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the receipt.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommandHandler.html deleted file mode 100644 index 07e0bcd2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommandHandler.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.ReceiptHandler.DeleteReceiptCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.ReceiptHandler.DeleteReceiptCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ReceiptHandler\DeleteReceiptCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:67
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ReceiptHandler\DeleteReceiptCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteReceiptCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.ReceiptHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteReceiptCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteReceiptCommandHandler : IRequestHandler<DeleteReceiptCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteReceiptCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteReceiptCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteReceiptCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteReceiptCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteReceiptCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteReceiptCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteReceiptCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteReceiptCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Receipts
 047                    .TagWith(nameof(DeleteReceiptCommandHandler))
 048                    .SingleOrDefault(d => d.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The receipt does not exists");
 52                }
 53
 054                this.DbContext.Receipts.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 056                response = RequestResponse.Success(entity.Id);
 057            }
 058            catch (Exception ex)
 059            {
 060                this.Logger.LogError(ex, ErrorsManager.DeleteReceiptCommand);
 061                response = RequestResponse.Failure($"{ErrorsManager.DeleteReceiptCommand}. {ex.Message}. {ex.InnerExcept
 062            }
 63
 064            return response;
 065        }
 66    }
 67}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommandValidator.html deleted file mode 100644 index 80672a83..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteReceiptCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ReceiptValidator.DeleteReceiptCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ReceiptValidator.DeleteReceiptCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\DeleteReceiptCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\DeleteReceiptCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteReceiptCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ReceiptValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteReceiptCommand}"/>.
 9    /// </summary>
 10    public class DeleteReceiptCommandValidator : AbstractValidator<DeleteReceiptCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteReceiptCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteReceiptCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommand.html deleted file mode 100644 index fdd9a424..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.RoleCommand.DeleteRoleCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.RoleCommand.DeleteRoleCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\RoleCommand\DeleteRoleCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\RoleCommand\DeleteRoleCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteRoleCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.RoleCommand
 6{
 7    /// <summary>
 8    /// A model to delete a role.
 9    /// </summary>
 10    public class DeleteRoleCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the role.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommandHandler.html deleted file mode 100644 index bd905a56..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.RoleHandler.DeleteRoleCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.RoleHandler.DeleteRoleCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\RoleHandler\DeleteRoleCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:18
Coverable lines:18
Total lines:57
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_RoleService()100%10%
get_Logger()100%10%
Handle()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\RoleHandler\DeleteRoleCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteRoleCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.RoleHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteRoleCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteRoleCommandHandler : IRequestHandler<DeleteRoleCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteRoleCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="roleService">Gets An instance of <see cref="IRoleService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteRoleCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteRoleCommandHandler(IRoleService roleService, ILogger<DeleteRoleCommandHandler> logger)
 019        {
 020            this.RoleService = roleService;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IRoleService"/>.
 26        /// </summary>
 027        private IRoleService RoleService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteRoleCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteRoleCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteRoleCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteRoleCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                response = await this.RoleService.DeleteRoleAsync(request.Id);
 047            }
 048            catch (Exception ex)
 049            {
 050                this.Logger.LogError(ex, ErrorsManager.DeleteRoleCommand);
 051                response = RequestResponse.Failure($"{ErrorsManager.DeleteRoleCommand}. {ex.Message}. {ex.InnerException
 052            }
 53
 054            return response;
 055        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommandValidator.html deleted file mode 100644 index 0ad4f9cc..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteRoleCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.RoleValidator.DeleteRoleCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.RoleValidator.DeleteRoleCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\DeleteRoleCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\DeleteRoleCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteRoleCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.RoleValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteRoleCommand}"/>.
 9    /// </summary>
 10    public class DeleteRoleCommandValidator : AbstractValidator<DeleteRoleCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteRoleCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteRoleCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommand.html deleted file mode 100644 index 5b5ce350..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.SubscriberCommand.DeleteSubscriberCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.SubscriberCommand.DeleteSubscriberCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\DeleteSubscriberCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\DeleteSubscriberCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteSubscriberCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.SubscriberCommand
 6{
 7    /// <summary>
 8    /// A model to delete a subscriber.
 9    /// </summary>
 10    public class DeleteSubscriberCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or Sets The id of the subscriber.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommandHandler.html deleted file mode 100644 index bc6a5837..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommandHandler.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.SubscriberHandler.DeleteSubscriberCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.SubscriberHandler.DeleteSubscriberCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\DeleteSubscriberCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:67
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\DeleteSubscriberCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteSubscriberCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.SubscriberHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteSubscriberCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteSubscriberCommandHandler : IRequestHandler<DeleteSubscriberCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteSubscriberCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteSubscriberCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteSubscriberCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteSubscriberCommandHandler> l
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteSubscriberCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteSubscriberCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteSubscriberCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteSubscriberCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Subscribers
 047                    .TagWith(nameof(DeleteSubscriberCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The subscriber does not exists");
 52                }
 53
 054                this.DbContext.Subscribers.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 056                response = RequestResponse.Success(entity.Id);
 057            }
 058            catch (Exception ex)
 059            {
 060                this.Logger.LogError(ex, ErrorsManager.DeleteSubscriberCommand);
 061                response = RequestResponse.Failure($"{ErrorsManager.DeleteSubscriberCommand}. {ex.Message}. {ex.InnerExc
 062            }
 63
 064            return response;
 065        }
 66    }
 67}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommandValidator.html deleted file mode 100644 index 18f7c4ac..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriberCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriberValidator.DeleteSubscriberCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriberValidator.DeleteSubscriberCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\DeleteSubscriberCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\DeleteSubscriberCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteSubscriberCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriberValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteSubscriberCommand}"/>.
 9    /// </summary>
 10    public class DeleteSubscriberCommandValidator : AbstractValidator<DeleteSubscriberCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteSubscriberCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteSubscriberCommandValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommand.html deleted file mode 100644 index 2e8b7b8e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.SubscriptionCommand.DeleteSubscriptionCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.SubscriptionCommand.DeleteSubscriptionCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriptionCommand\DeleteSubscriptionCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriptionCommand\DeleteSubscriptionCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteSubscriptionCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.SubscriptionCommand
 6{
 7    /// <summary>
 8    /// A model to delete a subscription.
 9    /// </summary>
 10    public class DeleteSubscriptionCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the subscription.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommandHandler.html deleted file mode 100644 index 9f7f4e58..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommandHandler.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.SubscriptionHandler.DeleteSubscriptionCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.SubscriptionHandler.DeleteSubscriptionCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriptionHandler\DeleteSubscriptionCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:67
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriptionHandler\DeleteSubscriptionCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteSubscriptionCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.SubscriptionHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteSubscriptionCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteSubscriptionCommandHandler : IRequestHandler<DeleteSubscriptionCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteSubscriptionCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteSubscriptionCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteSubscriptionCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteSubscriptionCommandHandle
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteSubscriptionCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteSubscriptionCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteSubscriptionCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteSubscriptionCommand request, CancellationToken cancellationToken
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Subscriptions
 047                    .TagWith(nameof(DeleteSubscriptionCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The subscription does not exists");
 52                }
 53
 054                this.DbContext.Subscriptions.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 056                response = RequestResponse.Success(entity.Id);
 057            }
 058            catch (Exception ex)
 059            {
 060                this.Logger.LogError(ex, ErrorsManager.DeleteSubscriptionCommand);
 061                response = RequestResponse.Failure($"{ErrorsManager.DeleteSubscriptionCommand}. {ex.Message}. {ex.InnerE
 062            }
 63
 064            return response;
 065        }
 66    }
 67}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommandValidator.html deleted file mode 100644 index 41316df0..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteSubscriptionCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriptionValidator.DeleteSubscriptionCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriptionValidator.DeleteSubscriptionCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriptionValidator\DeleteSubscriptionCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriptionValidator\DeleteSubscriptionCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteSubscriptionCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriptionValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteSubscriptionCommand}"/>.
 9    /// </summary>
 10    public class DeleteSubscriptionCommandValidator : AbstractValidator<DeleteSubscriptionCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteSubscriptionCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteSubscriptionCommandValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommand.html deleted file mode 100644 index 60dada28..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.TodoItemCommand.DeleteTodoItemCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.TodoItemCommand.DeleteTodoItemCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoItemCommand\DeleteTodoItemCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoItemCommand\DeleteTodoItemCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteTodoItemCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.TodoItemCommand
 6{
 7    /// <summary>
 8    /// A model to delete an item.
 9    /// </summary>
 10    public class DeleteTodoItemCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the item.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommandHandler.html deleted file mode 100644 index c5de4e6f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommandHandler.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.TodoItemHandler.DeleteTodoItemCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.TodoItemHandler.DeleteTodoItemCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoItemHandler\DeleteTodoItemCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:68
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoItemHandler\DeleteTodoItemCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteTodoItemCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.TodoItemHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteTodoItemCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteTodoItemCommandHandler : IRequestHandler<DeleteTodoItemCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteTodoItemCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteTodoItemCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteTodoItemCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteTodoItemCommandHandler> logge
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteTodoItemCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteTodoItemCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteTodoItemCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteTodoItemCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.TodoItems
 047                    .TagWith(nameof(DeleteTodoItemCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The todo list record does not exists in the database");
 52                }
 53
 054                this.DbContext.TodoItems.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 56
 057                response = RequestResponse.Success();
 058            }
 059            catch (Exception ex)
 060            {
 061                this.Logger.LogError(ex, ErrorsManager.DeleteTodoItemCommand);
 062                response = RequestResponse.Failure($"{ErrorsManager.DeleteTodoItemCommand}. {ex.Message}. {ex.InnerExcep
 063            }
 64
 065            return response;
 066        }
 67    }
 68}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommandValidator.html deleted file mode 100644 index 03c4e967..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoItemCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.TodoItemValidator.DeleteTodoItemCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.TodoItemValidator.DeleteTodoItemCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoItemValidator\DeleteTodoItemCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoItemValidator\DeleteTodoItemCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteTodoItemCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.TodoItemValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteTodoItemCommand}"/>.
 9    /// </summary>
 10    public class DeleteTodoItemCommandValidator : AbstractValidator<DeleteTodoItemCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteTodoItemCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteTodoItemCommandValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommand.html deleted file mode 100644 index 3ff905db..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.TodoListCommand.DeleteTodoListCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.TodoListCommand.DeleteTodoListCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoListCommand\DeleteTodoListCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoListCommand\DeleteTodoListCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteTodoListCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.TodoListCommand
 6{
 7    /// <summary>
 8    /// A model to delete a list.
 9    /// </summary>
 10    public class DeleteTodoListCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the list.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommandHandler.html deleted file mode 100644 index c0c3251b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommandHandler.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.TodoListHandler.DeleteTodoListCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.TodoListHandler.DeleteTodoListCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoListHandler\DeleteTodoListCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:68
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoListHandler\DeleteTodoListCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteTodoListCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.TodoListHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteTodoListCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteTodoListCommandHandler : IRequestHandler<DeleteTodoListCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteTodoListCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateUserCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public DeleteTodoListCommandHandler(IApplicationDbContext dbContext, ILogger<DeleteTodoListCommandHandler> logge
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteTodoListCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<DeleteTodoListCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteTodoListCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteTodoListCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.TodoLists
 047                    .TagWith(nameof(DeleteTodoListCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The todo list record does not exists in the database");
 52                }
 53
 054                this.DbContext.TodoLists.Remove(entity);
 055                await this.DbContext.SaveChangesAsync(cancellationToken);
 56
 057                response = RequestResponse.Success();
 058            }
 059            catch (Exception ex)
 060            {
 061                this.Logger.LogError(ex, ErrorsManager.DeleteTodoListCommand);
 062                response = RequestResponse.Failure($"{ErrorsManager.DeleteTodoListCommand}. {ex.Message}. {ex.InnerExcep
 063            }
 64
 065            return response;
 066        }
 67    }
 68}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommandValidator.html deleted file mode 100644 index 4382f5c7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteTodoListCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.TodoListValidator.DeleteTodoListCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.TodoListValidator.DeleteTodoListCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoListValidator\DeleteTodoListCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoListValidator\DeleteTodoListCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteTodoListCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.TodoListValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteTodoListCommand}"/>.
 9    /// </summary>
 10    public class DeleteTodoListCommandValidator : AbstractValidator<DeleteTodoListCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteTodoListCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteTodoListCommandValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommand.html deleted file mode 100644 index cc6e8361..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.UserCommand.DeleteUserCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.UserCommand.DeleteUserCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\DeleteUserCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1
Uncovered lines:0
Coverable lines:1
Total lines:17
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\DeleteUserCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteUserCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.UserCommand
 6{
 7    /// <summary>
 8    /// A model to delete an user.
 9    /// </summary>
 10    public class DeleteUserCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 615        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommandHandler.html deleted file mode 100644 index 6ff33258..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.UserHandler.DeleteUserCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.UserHandler.DeleteUserCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\DeleteUserCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:57
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\DeleteUserCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteUserCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{DeleteUserCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class DeleteUserCommandHandler : IRequestHandler<DeleteUserCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteUserCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{DeleteUserCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public DeleteUserCommandHandler(IUserService userService, ILogger<DeleteUserCommandHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 227        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{DeleteUserCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<DeleteUserCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="DeleteUserCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(DeleteUserCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                response = await this.UserService.DeleteUserAsync(request.Id);
 147            }
 148            catch (Exception ex)
 149            {
 150                this.Logger.LogError(ex, ErrorsManager.DeleteUserCommand);
 151                response = RequestResponse.Failure($"{ErrorsManager.DeleteUserCommand}. {ex.Message}. {ex.InnerException
 152            }
 53
 254            return response;
 255        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommandValidator.html deleted file mode 100644 index c0c15078..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DeleteUserCommandValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.UserValidator.DeleteUserCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.UserValidator.DeleteUserCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\DeleteUserCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\DeleteUserCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DeleteUserCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.UserValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{DeleteUserCommand}"/>.
 9    /// </summary>
 10    public class DeleteUserCommandValidator : AbstractValidator<DeleteUserCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DeleteUserCommandValidator"/> class.
 14        /// </summary>
 015        public DeleteUserCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DependencyInjection.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DependencyInjection.html deleted file mode 100644 index 5c617ca8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_DependencyInjection.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - -BlazorShop.Application.DependencyInjection - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.DependencyInjection
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\DependencyInjection.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:29
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
AddApplicationLayer(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\DependencyInjection.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DependencyInjection.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application
 6{
 7    /// <summary>
 8    /// Extension methods on <see cref="IServiceCollection"/> at Application level.
 9    /// </summary>
 10    public static class DependencyInjection
 11    {
 12        /// <summary>
 13        /// Make service modules available to the application level via dependancy injection.
 14        /// </summary>
 15        /// <param name="services">The <see cref="IServiceCollection"/> instance to use.</param>
 16        /// <returns>The services collection.</returns>
 17        public static IServiceCollection AddApplicationLayer(this IServiceCollection services)
 018        {
 019            services.AddAutoMapper(Assembly.GetExecutingAssembly());
 020            services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
 021            services.AddMediatR(Assembly.GetExecutingAssembly());
 22
 023            services.AddTransient(typeof(IPipelineBehavior<,>), typeof(UnhandledExceptionBehaviour<,>));
 024            services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviour<,>));
 25
 026            return services;
 027        }
 28    }
 29}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_EmailSettings.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_EmailSettings.html deleted file mode 100644 index e59ea3ec..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_EmailSettings.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Models.EmailSettings - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Models.EmailSettings
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\EmailSettings.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:0
Coverable lines:6
Total lines:42
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Host()100%1100%
get_Port()100%1100%
get_Subject()100%1100%
get_Message()100%1100%
get_Username()100%1100%
get_Password()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\EmailSettings.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="EmailSettings.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Models
 6{
 7    /// <summary>
 8    /// A setting model for the Email.
 9    /// </summary>
 10    public class EmailSettings
 11    {
 12        /// <summary>
 13        /// Gets or sets the host.
 14        /// </summary>
 115        public string? Host { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets the port.
 19        /// </summary>
 120        public int Port { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets the subject.
 24        /// </summary>
 125        public string? Subject { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets the message.
 29        /// </summary>
 130        public string? Message { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets the username.
 34        /// </summary>
 135        public string? Username { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets the password.
 39        /// </summary>
 140        public string? Password { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQuery.html deleted file mode 100644 index f6377b41..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQuery.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.CartQuery.GetCartByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.CartQuery.GetCartByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\CartQuery\GetCartByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\CartQuery\GetCartByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.CartQuery
 6{
 7    /// <summary>
 8    /// A model to get a cart.
 9    /// </summary>
 10    public class GetCartByIdQuery : IRequest<Result<CartResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the cart.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the user.
 19        /// </summary>
 020        public int UserId { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Id()
-get_UserId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQueryHandler.html deleted file mode 100644 index 316bfb86..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.CartHandler.GetCartByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.CartHandler.GetCartByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\CartHandler\GetCartByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
18%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:26
Coverable lines:32
Total lines:77
Line coverage:18.7%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\CartHandler\GetCartByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.CartHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetCartByIdQuery, CartResponse}"/>.
 9    /// </summary>
 10    public class GetCartByIdQueryHandler : IRequestHandler<GetCartByIdQuery, Result<CartResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetCartByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetCartByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetCartByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetCartByIdQueryHandler> logger, IMapper
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetCartByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetCartByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetCartByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{CartResponse}"/>.</returns>
 47        public Task<Result<CartResponse>> Handle(GetCartByIdQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<CartResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Carts
 054                    .TagWith(nameof(GetCartByIdQueryHandler))
 055                    .Where(x => x.Id == request.Id && x.User.Id == request.UserId)
 056                    .ProjectTo<CartResponse>(this.Mapper.ConfigurationProvider)
 057                    .FirstOrDefault();
 58
 059                response = new Result<CartResponse>
 060                {
 061                    Successful = true,
 062                    Item = result ?? new CartResponse(),
 063                };
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.GetCartByIdQuery);
 068                response = new Result<CartResponse>
 069                {
 070                    Error = $"{ErrorsManager.GetCartByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 071                };
 072            }
 73
 074            return Task.FromResult(response);
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQueryValidator.html deleted file mode 100644 index 8b6193ca..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartByIdQueryValidator.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.CartValidator.GetCartByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.CartValidator.GetCartByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\GetCartByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:24
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\GetCartByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.CartValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetCartByIdQuery}"/>.
 9    /// </summary>
 10    public class GetCartByIdQueryValidator : AbstractValidator<GetCartByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetCartByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetCartByIdQueryValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(v => v.UserId)
 021                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 022        }
 23    }
 24}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQuery.html deleted file mode 100644 index 253a3349..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.CartQuery.GetCartsCountQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.CartQuery.GetCartsCountQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\CartQuery\GetCartsCountQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\CartQuery\GetCartsCountQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartsCountQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.CartQuery
 6{
 7    /// <summary>
 8    /// A model to count the carts.
 9    /// </summary>
 10    public class GetCartsCountQuery : IRequest<int>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 015        public int UserId { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_UserId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQueryHandler.html deleted file mode 100644 index 3dba5398..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQueryHandler.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsCountQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsCountQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\CartHandler\GetCartsCountQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
25%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:15
Coverable lines:20
Total lines:58
Line coverage:25%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:2
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
Handle(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\CartHandler\GetCartsCountQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartsCountQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.CartHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetCartsCountQuery}"/>.
 9    /// </summary>
 10    public class GetCartsCountQueryHandler : IRequestHandler<GetCartsCountQuery, int>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetCartsCountQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetCartsCountQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetCartsCountQueryHandler(IApplicationDbContext dbContext, ILogger<GetCartsCountQueryHandler> logger)
 219        {
 220            this.DbContext = dbContext;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetCartsCountQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetCartsCountQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetCartsCountQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="int"/>.</returns>
 40        public Task<int> Handle(GetCartsCountQuery request, CancellationToken cancellationToken)
 041        {
 042            var result = 0;
 43
 44            try
 045            {
 046                result = this.DbContext.Carts
 047                    .TagWith(nameof(GetCartsCountQueryHandler))
 048                    .Where(x => x.User.Id == request.UserId).Count();
 049            }
 050            catch (Exception ex)
 051            {
 052                this.Logger.LogError(ex, ErrorsManager.GetCartsCountQuery);
 053            }
 54
 055            return Task.FromResult(result);
 056        }
 57    }
 58}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQueryValidator.html deleted file mode 100644 index 76d57976..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsCountQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.CartValidator.GetCartsCountQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.CartValidator.GetCartsCountQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\GetCartsCountQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\GetCartsCountQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartsCountQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.CartValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetCartsCountQuery}"/>.
 9    /// </summary>
 10    public class GetCartsCountQueryValidator : AbstractValidator<GetCartsCountQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetCartsCountQueryValidator"/> class.
 14        /// </summary>
 015        public GetCartsCountQueryValidator()
 016        {
 017            this.RuleFor(v => v.UserId)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQuery.html deleted file mode 100644 index 72e4506a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.CartQuery.GetCartsQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.CartQuery.GetCartsQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\CartQuery\GetCartsQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\CartQuery\GetCartsQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartsQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.CartQuery
 6{
 7    /// <summary>
 8    /// A model to get the carts.
 9    /// </summary>
 10    public class GetCartsQuery : IRequest<Result<CartResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 015        public int UserId { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_UserId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQueryHandler.html deleted file mode 100644 index e31e4969..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\CartHandler\GetCartsQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
18%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:26
Coverable lines:32
Total lines:77
Line coverage:18.7%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\CartHandler\GetCartsQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartsQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.CartHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetCartsQuery, CartResponse}"/>.
 9    /// </summary>
 10    public class GetCartsQueryHandler : IRequestHandler<GetCartsQuery, Result<CartResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetCartsQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetCartsQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetCartsQueryHandler(IApplicationDbContext dbContext, ILogger<GetCartsQueryHandler> logger, IMapper mappe
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetCartsQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetCartsQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetCartsQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{CartResponse}"/>.</returns>
 47        public Task<Result<CartResponse>> Handle(GetCartsQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<CartResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Carts
 054                    .TagWith(nameof(GetCartsQueryHandler))
 055                    .Where(x => x.User.Id == request.UserId)
 056                    .ProjectTo<CartResponse>(this.Mapper.ConfigurationProvider)
 057                    .ToList();
 58
 059                response = new Result<CartResponse>
 060                {
 061                    Successful = true,
 062                    Items = result ?? new List<CartResponse>(),
 063                };
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.GetCartsQuery);
 068                response = new Result<CartResponse>
 069                {
 070                    Error = $"{ErrorsManager.GetCartsQuery}. {ex.Message}. {ex.InnerException?.Message}",
 071                };
 072            }
 73
 074            return Task.FromResult(response);
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQueryValidator.html deleted file mode 100644 index de665862..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetCartsQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.CartValidator.GetCartsQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.CartValidator.GetCartsQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\GetCartsQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\GetCartsQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetCartsQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.CartValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetCartsQuery}"/>.
 9    /// </summary>
 10    public class GetCartsQueryValidator : AbstractValidator<GetCartsQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetCartsQueryValidator"/> class.
 14        /// </summary>
 015        public GetCartsQueryValidator()
 016        {
 017            _ = this.RuleFor(v => v.UserId)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQuery.html deleted file mode 100644 index 154b765c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.ClotheQuery.GetClotheByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.ClotheQuery.GetClotheByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\ClotheQuery\GetClotheByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1
Uncovered lines:0
Coverable lines:1
Total lines:17
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\ClotheQuery\GetClotheByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetClotheByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.ClotheQuery
 6{
 7    /// <summary>
 8    /// A model to get the clothe.
 9    /// </summary>
 10    public class GetClotheByIdQuery : IRequest<Result<ClotheResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the clothe.
 14        /// </summary>
 215        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQueryHandler.html deleted file mode 100644 index 582a6f16..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClotheByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClotheByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\ClotheHandler\GetClotheByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:32
Uncovered lines:0
Coverable lines:32
Total lines:77
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:3
Total branches:6
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%1100%
get_Logger()100%1100%
get_Mapper()100%1100%
Handle(...)50%4100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\ClotheHandler\GetClotheByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetClotheByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.ClotheHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetClotheByIdQuery, ClotheResponse}"/>.
 9    /// </summary>
 10    public class GetClotheByIdQueryHandler : IRequestHandler<GetClotheByIdQuery, Result<ClotheResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetClotheByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetClotheByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetClotheByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetClotheByIdQueryHandler> logger, IMa
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 229        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetClotheByIdQueryHandler}"/>.
 33        /// </summary>
 134        private ILogger<GetClotheByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 239        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetClotheByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{ClotheResponse}"/>.</returns>
 47        public Task<Result<ClotheResponse>> Handle(GetClotheByIdQuery request, CancellationToken cancellationToken)
 248        {
 49            Result<ClotheResponse>? response;
 50
 51            try
 252            {
 253                var result = this.DbContext.Clothes
 254                    .TagWith(nameof(GetClotheByIdQueryHandler))
 255                    .Where(x => x.Id == request.Id && x.IsActive == true)
 256                    .ProjectTo<ClotheResponse>(this.Mapper.ConfigurationProvider)
 257                    .FirstOrDefault();
 58
 159                response = new Result<ClotheResponse>
 160                {
 161                    Successful = true,
 162                    Item = result ?? new ClotheResponse(),
 163                };
 164            }
 165            catch (Exception ex)
 166            {
 167                this.Logger.LogError(ex, ErrorsManager.GetClotheByIdQuery);
 168                response = new Result<ClotheResponse>
 169                {
 170                    Error = $"{ErrorsManager.GetClotheByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 171                };
 172            }
 73
 274            return Task.FromResult(response);
 275        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQueryValidator.html deleted file mode 100644 index 4ae85d2f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClotheByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ClotheValidator.GetClotheByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ClotheValidator.GetClotheByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ClotheValidator\GetClotheByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ClotheValidator\GetClotheByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetClotheByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ClotheValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetClotheByIdQuery}"/>.
 9    /// </summary>
 10    public class GetClotheByIdQueryValidator : AbstractValidator<GetClotheByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetClotheByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetClotheByIdQueryValidator()
 016        {
 017            _ = this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClothesQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClothesQueryHandler.html deleted file mode 100644 index fe9fdbca..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetClothesQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClothesQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClothesQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\ClotheHandler\GetClothesQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:32
Uncovered lines:0
Coverable lines:32
Total lines:77
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:3
Total branches:6
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%1100%
get_Logger()100%1100%
get_Mapper()100%1100%
Handle(...)50%4100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\ClotheHandler\GetClothesQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetClothesQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.ClotheHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetClothesQuery, ClotheResponse}"/>.
 9    /// </summary>
 10    public class GetClothesQueryHandler : IRequestHandler<GetClothesQuery, Result<ClotheResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetClothesQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetClothesQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetClothesQueryHandler(IApplicationDbContext dbContext, ILogger<GetClothesQueryHandler> logger, IMapper m
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 229        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetClothesQueryHandler}"/>.
 33        /// </summary>
 134        private ILogger<GetClothesQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 239        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetClothesQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{ClotheResponse}"/>.</returns>
 47        public Task<Result<ClotheResponse>> Handle(GetClothesQuery request, CancellationToken cancellationToken)
 248        {
 49            Result<ClotheResponse>? response;
 50
 51            try
 252            {
 253                var result = this.DbContext.Clothes
 254                    .TagWith(nameof(GetClothesQueryHandler))
 255                    .Where(x => x.IsActive == true)
 256                    .ProjectTo<ClotheResponse>(this.Mapper.ConfigurationProvider)
 257                    .ToList();
 58
 159                response = new Result<ClotheResponse>
 160                {
 161                    Successful = true,
 162                    Items = result ?? new List<ClotheResponse>(),
 163                };
 164            }
 165            catch (Exception ex)
 166            {
 167                this.Logger.LogError(ex, ErrorsManager.GetClothesQuery);
 168                response = new Result<ClotheResponse>
 169                {
 170                    Error = $"{ErrorsManager.GetClothesQuery}. {ex.Message}. {ex.InnerException?.Message}",
 171                };
 172            }
 73
 274            return Task.FromResult(response);
 275        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQuery.html deleted file mode 100644 index 81230402..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.InvoiceQuery.GetInvoiceByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.InvoiceQuery.GetInvoiceByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\InvoiceQuery\GetInvoiceByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\InvoiceQuery\GetInvoiceByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetInvoiceByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.InvoiceQuery
 6{
 7    /// <summary>
 8    /// A model to get the invoice.
 9    /// </summary>
 10    public class GetInvoiceByIdQuery : IRequest<Result<InvoiceResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the invoice.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQueryHandler.html deleted file mode 100644 index a8360d94..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoiceByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoiceByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\InvoiceHandler\GetInvoiceByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
18%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:26
Coverable lines:32
Total lines:77
Line coverage:18.7%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\InvoiceHandler\GetInvoiceByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetInvoiceByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.InvoiceHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetInvoiceByIdQuery, InvoiceResponse}"/>.
 9    /// </summary>
 10    public class GetInvoiceByIdQueryHandler : IRequestHandler<GetInvoiceByIdQuery, Result<InvoiceResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetInvoiceByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetInvoiceByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetInvoiceByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetInvoiceByIdQueryHandler> logger, I
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetInvoiceByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetInvoiceByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetInvoiceByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{InvoiceResponse}"/>.</returns>
 47        public Task<Result<InvoiceResponse>> Handle(GetInvoiceByIdQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<InvoiceResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Invoices
 054                    .TagWith(nameof(GetInvoiceByIdQueryHandler))
 055                    .Where(x => x.Id == request.Id)
 056                    .ProjectTo<InvoiceResponse>(this.Mapper.ConfigurationProvider)
 057                    .FirstOrDefault();
 58
 059                response = new Result<InvoiceResponse>
 060                {
 061                    Successful = true,
 062                    Item = result ?? new InvoiceResponse(),
 063                };
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.GetInvoiceByIdQuery);
 068                response = new Result<InvoiceResponse>
 069                {
 070                    Error = $"{ErrorsManager.GetInvoiceByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 071                };
 072            }
 73
 074            return Task.FromResult(response);
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQueryValidator.html deleted file mode 100644 index a52ed900..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoiceByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.InvoiceValidator.GetInvoiceByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.InvoiceValidator.GetInvoiceByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\InvoiceValidator\GetInvoiceByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\InvoiceValidator\GetInvoiceByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetInvoiceByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.InvoiceValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetInvoiceByIdQuery}"/>.
 9    /// </summary>
 10    public class GetInvoiceByIdQueryValidator : AbstractValidator<GetInvoiceByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetInvoiceByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetInvoiceByIdQueryValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoicesQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoicesQueryHandler.html deleted file mode 100644 index 80dbfded..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetInvoicesQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoicesQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoicesQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\InvoiceHandler\GetInvoicesQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\InvoiceHandler\GetInvoicesQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetInvoicesQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.InvoiceHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetInvoicesQuery, InvoiceResponse}"/>.
 9    /// </summary>
 10    public class GetInvoicesQueryHandler : IRequestHandler<GetInvoicesQuery, Result<InvoiceResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetInvoicesQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetInvoicesQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetInvoicesQueryHandler(IApplicationDbContext dbContext, ILogger<GetInvoicesQueryHandler> logger, IMapper
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetInvoicesQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetInvoicesQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetInvoicesQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{InvoiceResponse}"/>.</returns>
 47        public Task<Result<InvoiceResponse>> Handle(GetInvoicesQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<InvoiceResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Invoices
 054                    .TagWith(nameof(GetInvoicesQueryHandler))
 055                    .ProjectTo<InvoiceResponse>(this.Mapper.ConfigurationProvider)
 056                    .ToList();
 57
 058                response = new Result<InvoiceResponse>
 059                {
 060                    Successful = true,
 061                    Items = result ?? new List<InvoiceResponse>(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetInvoicesQuery);
 067                response = new Result<InvoiceResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetInvoicesQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQuery.html deleted file mode 100644 index 64840a2e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.MusicQuery.GetMusicByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.MusicQuery.GetMusicByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\MusicQuery\GetMusicByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\MusicQuery\GetMusicByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetMusicByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.MusicQuery
 6{
 7    /// <summary>
 8    /// A model to get the music.
 9    /// </summary>
 10    public class GetMusicByIdQuery : IRequest<Result<MusicResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the music.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQueryHandler.html deleted file mode 100644 index a020f3f2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\MusicHandler\GetMusicByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\MusicHandler\GetMusicByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetMusicByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.MusicHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetMusicByIdQuery, MusicResponse}"/>.
 9    /// </summary>
 10    public class GetMusicByIdQueryHandler : IRequestHandler<GetMusicByIdQuery, Result<MusicResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetMusicByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetMusicByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetMusicByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetMusicByIdQueryHandler> logger, IMapp
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetMusicByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetMusicByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetMusicByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{MusicResponse}"/>.</returns>
 47        public Task<Result<MusicResponse>> Handle(GetMusicByIdQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<MusicResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Musics
 054                    .TagWith(nameof(GetMusicByIdQueryHandler))
 055                    .ProjectTo<MusicResponse>(this.Mapper.ConfigurationProvider)
 056                    .FirstOrDefault(x => x.Id == request.Id);
 57
 058                response = new Result<MusicResponse>
 059                {
 060                    Successful = true,
 061                    Item = result ?? new MusicResponse(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetMusicByIdQuery);
 067                response = new Result<MusicResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetMusicByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQueryValidator.html deleted file mode 100644 index 10b6bfbb..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.MusicValidator.GetMusicByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.MusicValidator.GetMusicByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\MusicValidator\GetMusicByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\MusicValidator\GetMusicByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetMusicByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.MusicValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetMusicByIdQuery}"/>.
 9    /// </summary>
 10    public class GetMusicByIdQueryValidator : AbstractValidator<GetMusicByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetMusicByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetMusicByIdQueryValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicsQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicsQueryHandler.html deleted file mode 100644 index f2fb663b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetMusicsQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicsQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicsQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\MusicHandler\GetMusicsQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\MusicHandler\GetMusicsQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetMusicsQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.MusicHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetMusicsQuery, MusicResponse}"/>.
 9    /// </summary>
 10    public class GetMusicsQueryHandler : IRequestHandler<GetMusicsQuery, Result<MusicResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetMusicsQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetMusicsQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetMusicsQueryHandler(IApplicationDbContext dbContext, ILogger<GetMusicsQueryHandler> logger, IMapper map
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetMusicsQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetMusicsQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetMusicsQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{MusicResponse}"/>.</returns>
 47        public Task<Result<MusicResponse>> Handle(GetMusicsQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<MusicResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Musics
 054                    .TagWith(nameof(GetMusicsQueryHandler))
 055                    .ProjectTo<MusicResponse>(this.Mapper.ConfigurationProvider)
 056                    .ToList();
 57
 058                response = new Result<MusicResponse>
 059                {
 060                    Successful = true,
 061                    Items = result ?? new List<MusicResponse>(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetMusicsQuery);
 067                response = new Result<MusicResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetMusicsQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQuery.html deleted file mode 100644 index d3ff82f0..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQuery.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.OrderQuery.GetOrderByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.OrderQuery.GetOrderByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\OrderQuery\GetOrderByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserEmail()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\OrderQuery\GetOrderByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetOrderByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.OrderQuery
 6{
 7    /// <summary>
 8    /// A model to get the order.
 9    /// </summary>
 10    public class GetOrderByIdQuery : IRequest<Result<OrderResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the order.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 020        public string UserEmail { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Id()
-get_UserEmail()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQueryHandler.html deleted file mode 100644 index 4ed95d69..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrderByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrderByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\OrderHandler\GetOrderByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
18%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:26
Coverable lines:32
Total lines:77
Line coverage:18.7%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\OrderHandler\GetOrderByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetOrderByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.OrderHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetOrderByIdQuery, OrderResponse}"/>.
 9    /// </summary>
 10    public class GetOrderByIdQueryHandler : IRequestHandler<GetOrderByIdQuery, Result<OrderResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetOrderByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetOrderByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetOrderByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetOrderByIdQueryHandler> logger, IMapp
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetOrderByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetOrderByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetOrderByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{OrderResponse}"/>.</returns>
 47        public Task<Result<OrderResponse>> Handle(GetOrderByIdQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<OrderResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Orders
 054                    .TagWith(nameof(GetOrderByIdQueryHandler))
 055                    .Where(d => d.Id == request.Id && d.UserEmail == request.UserEmail)
 056                    .ProjectTo<OrderResponse>(this.Mapper.ConfigurationProvider)
 057                    .FirstOrDefault();
 58
 059                response = new Result<OrderResponse>
 060                {
 061                    Successful = true,
 062                    Item = result ?? new OrderResponse(),
 063                };
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.GetOrderByIdQuery);
 068                response = new Result<OrderResponse>
 069                {
 070                    Error = $"{ErrorsManager.GetOrderByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 071                };
 072            }
 73
 074            return Task.FromResult(response);
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQueryValidator.html deleted file mode 100644 index 9c44a7f9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrderByIdQueryValidator.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.OrderValidator.GetOrderByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.OrderValidator.GetOrderByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\GetOrderByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:26
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\GetOrderByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetOrderByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.OrderValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetOrderByIdQuery}"/>.
 9    /// </summary>
 10    public class GetOrderByIdQueryValidator : AbstractValidator<GetOrderByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetOrderByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetOrderByIdQueryValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(v => v.UserEmail)
 021                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 022                .NotEmpty().WithMessage("UserEmail must not be empty")
 023                .NotNull().WithMessage("UserEmail must not be null");
 024        }
 25    }
 26}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQuery.html deleted file mode 100644 index a815b872..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.OrderQuery.GetOrdersQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.OrderQuery.GetOrdersQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\OrderQuery\GetOrdersQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserEmail()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\OrderQuery\GetOrdersQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetOrdersQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.OrderQuery
 6{
 7    /// <summary>
 8    /// A model to get the orders.
 9    /// </summary>
 10    public class GetOrdersQuery : IRequest<Result<OrderResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 015        public string UserEmail { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_UserEmail()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQueryHandler.html deleted file mode 100644 index ade45c0c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrdersQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrdersQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\OrderHandler\GetOrdersQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
18%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:26
Coverable lines:32
Total lines:77
Line coverage:18.7%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\OrderHandler\GetOrdersQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetOrdersQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.OrderHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetOrdersQuery, OrderResponse}"/>.
 9    /// </summary>
 10    public class GetOrdersQueryHandler : IRequestHandler<GetOrdersQuery, Result<OrderResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetOrdersQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetOrdersQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetOrdersQueryHandler(IApplicationDbContext dbContext, ILogger<GetOrdersQueryHandler> logger, IMapper map
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetOrdersQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetOrdersQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetOrdersQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{OrderResponse}"/>.</returns>
 47        public Task<Result<OrderResponse>> Handle(GetOrdersQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<OrderResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Orders
 054                    .TagWith(nameof(GetOrdersQueryHandler))
 055                    .Where(x => x.UserEmail == request.UserEmail)
 056                    .ProjectTo<OrderResponse>(this.Mapper.ConfigurationProvider)
 057                    .ToList();
 58
 059                response = new Result<OrderResponse>
 060                {
 061                    Successful = true,
 062                    Items = result ?? new List<OrderResponse>(),
 063                };
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.GetOrdersQuery);
 068                response = new Result<OrderResponse>
 069                {
 070                    Error = $"{ErrorsManager.GetOrdersQuery}. {ex.Message}. {ex.InnerException?.Message}",
 071                };
 072            }
 73
 074            return Task.FromResult(response);
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQueryValidator.html deleted file mode 100644 index 5f39f5e9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetOrdersQueryValidator.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.OrderValidator.GetOrdersQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.OrderValidator.GetOrdersQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\GetOrdersQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:23
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\GetOrdersQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetOrdersQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.OrderValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetOrdersQuery}"/>.
 9    /// </summary>
 10    public class GetOrdersQueryValidator : AbstractValidator<GetOrdersQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetOrdersQueryValidator"/> class.
 14        /// </summary>
 015        public GetOrdersQueryValidator()
 016        {
 017            this.RuleFor(v => v.UserEmail)
 018                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 019                .NotEmpty().WithMessage("UserEmail must not be empty")
 020                .NotNull().WithMessage("UserEmail must not be null");
 021        }
 22    }
 23}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQuery.html deleted file mode 100644 index 757f339c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQuery.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.ReceiptQuery.GetReceiptByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.ReceiptQuery.GetReceiptByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\ReceiptQuery\GetReceiptByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserEmail()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\ReceiptQuery\GetReceiptByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetReceiptByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.ReceiptQuery
 6{
 7    /// <summary>
 8    /// A model to get the receipt.
 9    /// </summary>
 10    public class GetReceiptByIdQuery : IRequest<Result<ReceiptResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the receipt.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 020        public string UserEmail { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Id()
-get_UserEmail()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQueryHandler.html deleted file mode 100644 index e53b7de2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\ReceiptHandler\GetReceiptByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
18%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:26
Coverable lines:32
Total lines:77
Line coverage:18.7%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\ReceiptHandler\GetReceiptByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetReceiptByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.ReceiptHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetReceiptByIdQuery, ReceiptResponse}"/>.
 9    /// </summary>
 10    public class GetReceiptByIdQueryHandler : IRequestHandler<GetReceiptByIdQuery, Result<ReceiptResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetReceiptByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetReceiptByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetReceiptByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetReceiptByIdQueryHandler> logger, I
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetReceiptByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetReceiptByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetReceiptByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{ReceiptResponse}"/>.</returns>
 47        public Task<Result<ReceiptResponse>> Handle(GetReceiptByIdQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<ReceiptResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Receipts
 054                    .TagWith(nameof(GetReceiptByIdQueryHandler))
 055                    .Where(x => x.Id == request.Id && x.UserEmail == request.UserEmail)
 056                    .ProjectTo<ReceiptResponse>(this.Mapper.ConfigurationProvider)
 057                    .FirstOrDefault();
 58
 059                response = new Result<ReceiptResponse>
 060                {
 061                    Successful = true,
 062                    Item = result ?? new ReceiptResponse(),
 063                };
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.GetReceiptByIdQuery);
 068                response = new Result<ReceiptResponse>
 069                {
 070                    Error = $"{ErrorsManager.GetReceiptByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 071                };
 072            }
 73
 074            return Task.FromResult(response);
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQueryValidator.html deleted file mode 100644 index 0c77c9b1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptByIdQueryValidator.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ReceiptValidator.GetReceiptByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ReceiptValidator.GetReceiptByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\GetReceiptByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:26
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\GetReceiptByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetReceiptByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ReceiptValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetReceiptByIdQuery}"/>.
 9    /// </summary>
 10    public class GetReceiptByIdQueryValidator : AbstractValidator<GetReceiptByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetReceiptByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetReceiptByIdQueryValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(v => v.UserEmail)
 021                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 022                .NotEmpty().WithMessage("UserEmail must not be empty")
 023                .NotNull().WithMessage("UserEmail must not be null");
 024        }
 25    }
 26}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQuery.html deleted file mode 100644 index b8d8218f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.ReceiptQuery.GetReceiptsQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.ReceiptQuery.GetReceiptsQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\ReceiptQuery\GetReceiptsQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserEmail()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\ReceiptQuery\GetReceiptsQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetReceiptsQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.ReceiptQuery
 6{
 7    /// <summary>
 8    /// A model to get the receipts.
 9    /// </summary>
 10    public class GetReceiptsQuery : IRequest<Result<ReceiptResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 015        public string UserEmail { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_UserEmail()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQueryHandler.html deleted file mode 100644 index bf7f4f9b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptsQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptsQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\ReceiptHandler\GetReceiptsQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
18%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:26
Coverable lines:32
Total lines:77
Line coverage:18.7%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\ReceiptHandler\GetReceiptsQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetReceiptsQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.ReceiptHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetReceiptsQuery, ReceiptResponse}"/>.
 9    /// </summary>
 10    public class GetReceiptsQueryHandler : IRequestHandler<GetReceiptsQuery, Result<ReceiptResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetReceiptsQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetReceiptsQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetReceiptsQueryHandler(IApplicationDbContext dbContext, ILogger<GetReceiptsQueryHandler> logger, IMapper
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetReceiptsQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetReceiptsQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetReceiptsQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{ReceiptResponse}"/>.</returns>
 47        public Task<Result<ReceiptResponse>> Handle(GetReceiptsQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<ReceiptResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Receipts
 054                    .TagWith(nameof(GetReceiptsQueryHandler))
 055                    .Where(x => x.UserEmail == request.UserEmail)
 056                    .ProjectTo<ReceiptResponse>(this.Mapper.ConfigurationProvider)
 057                    .ToList();
 58
 059                response = new Result<ReceiptResponse>
 060                {
 061                    Successful = true,
 062                    Items = result ?? new List<ReceiptResponse>(),
 063                };
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.GetReceiptsQuery);
 068                response = new Result<ReceiptResponse>
 069                {
 070                    Error = $"{ErrorsManager.GetReceiptsQuery}. {ex.Message}. {ex.InnerException?.Message}",
 071                };
 072            }
 73
 074            return Task.FromResult(response);
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQueryValidator.html deleted file mode 100644 index a09e86a1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetReceiptsQueryValidator.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ReceiptValidator.GetReceiptsQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ReceiptValidator.GetReceiptsQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\GetReceiptsQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:23
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\GetReceiptsQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetReceiptsQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ReceiptValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetReceiptsQuery}"/>.
 9    /// </summary>
 10    public class GetReceiptsQueryValidator : AbstractValidator<GetReceiptsQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetReceiptsQueryValidator"/> class.
 14        /// </summary>
 015        public GetReceiptsQueryValidator()
 016        {
 017            this.RuleFor(v => v.UserEmail)
 018                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 019                .NotEmpty().WithMessage("UserEmail must not be empty")
 020                .NotNull().WithMessage("UserEmail must not be null");
 021        }
 22    }
 23}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQuery.html deleted file mode 100644 index 10e56b9b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.RoleQuery.GetRoleByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.RoleQuery.GetRoleByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\RoleQuery\GetRoleByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\RoleQuery\GetRoleByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetRoleByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.RoleQuery
 6{
 7    /// <summary>
 8    /// A model to get the role.
 9    /// </summary>
 10    public class GetRoleByIdQuery : IRequest<Result<RoleResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the role.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQueryHandler.html deleted file mode 100644 index ae5a4afa..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQueryHandler.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\RoleHandler\GetRoleByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:21
Coverable lines:26
Total lines:66
Line coverage:19.2%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_RoleService()100%10%
get_Logger()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\RoleHandler\GetRoleByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetRoleByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.RoleHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetRoleByIdQuery, RoleResponse}"/>.
 9    /// </summary>
 10    public class GetRoleByIdQueryHandler : IRequestHandler<GetRoleByIdQuery, Result<RoleResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetRoleByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="roleService">Gets An instance of <see cref="IRoleService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetRoleByIdQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetRoleByIdQueryHandler(IRoleService roleService, ILogger<GetRoleByIdQueryHandler> logger)
 219        {
 220            this.RoleService = roleService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IRoleService"/>.
 26        /// </summary>
 027        private IRoleService RoleService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetRoleByIdQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetRoleByIdQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetRoleByIdQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Result{RoleResponse}"/>.</returns>
 40        public Task<Result<RoleResponse>> Handle(GetRoleByIdQuery request, CancellationToken cancellationToken)
 041        {
 42            Result<RoleResponse>? response;
 43
 44            try
 045            {
 046                var result = this.RoleService.GetRoleById(request.Id);
 47
 048                response = new Result<RoleResponse>
 049                {
 050                    Successful = true,
 051                    Item = result ?? new RoleResponse(),
 052                };
 053            }
 054            catch (Exception ex)
 055            {
 056                this.Logger.LogError(ex, ErrorsManager.GetRoleByIdQuery);
 057                response = new Result<RoleResponse>
 058                {
 059                    Error = $"{ErrorsManager.GetRoleByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 060                };
 061            }
 62
 063            return Task.FromResult(response);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQueryValidator.html deleted file mode 100644 index 2b044444..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.RoleValidator.GetRoleByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.RoleValidator.GetRoleByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\GetRoleByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\GetRoleByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetRoleByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.RoleValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetRoleByIdQuery}"/>.
 9    /// </summary>
 10    public class GetRoleByIdQueryValidator : AbstractValidator<GetRoleByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetRoleByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetRoleByIdQueryValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQuery.html deleted file mode 100644 index 45ba9b55..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.RoleQuery.GetRoleByNormalizedNameQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.RoleQuery.GetRoleByNormalizedNameQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\RoleQuery\GetRoleByNormalizedNameQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_NormalizedName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\RoleQuery\GetRoleByNormalizedNameQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetRoleByNormalizedNameQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.RoleQuery
 6{
 7    /// <summary>
 8    /// A model to get the normalized role.
 9    /// </summary>
 10    public class GetRoleByNormalizedNameQuery : IRequest<Result<RoleResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The normalized name of the role.
 14        /// </summary>
 015        public string? NormalizedName { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_NormalizedName()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQueryHandler.html deleted file mode 100644 index 5ab4bf97..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQueryHandler.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByNormalizedNameQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByNormalizedNameQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\RoleHandler\GetRoleByNormalizedNameQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:21
Coverable lines:26
Total lines:66
Line coverage:19.2%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_RoleService()100%10%
get_Logger()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\RoleHandler\GetRoleByNormalizedNameQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetRoleByNormalizedNameQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.RoleHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetRoleByNormalizedNameQuery, RoleResponse}"/>.
 9    /// </summary>
 10    public class GetRoleByNormalizedNameQueryHandler : IRequestHandler<GetRoleByNormalizedNameQuery, Result<RoleResponse
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetRoleByNormalizedNameQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="roleService">Gets An instance of <see cref="IRoleService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetRoleByNormalizedNameQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetRoleByNormalizedNameQueryHandler(IRoleService roleService, ILogger<GetRoleByNormalizedNameQueryHandler
 219        {
 220            this.RoleService = roleService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IRoleService"/>.
 26        /// </summary>
 027        private IRoleService RoleService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetRoleByNormalizedNameQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetRoleByNormalizedNameQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetRoleByNormalizedNameQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Result{RoleResponse}"/>.</returns>
 40        public Task<Result<RoleResponse>> Handle(GetRoleByNormalizedNameQuery request, CancellationToken cancellationTok
 041        {
 42            Result<RoleResponse>? response;
 43
 44            try
 045            {
 046                var result = this.RoleService.GetRoleByNormalizedName(request.NormalizedName);
 47
 048                response = new Result<RoleResponse>
 049                {
 050                    Successful = true,
 051                    Item = result ?? new RoleResponse(),
 052                };
 053            }
 054            catch (Exception ex)
 055            {
 056                this.Logger.LogError(ex, ErrorsManager.GetRoleByNormalizedNameQuery);
 057                response = new Result<RoleResponse>
 058                {
 059                    Error = $"{ErrorsManager.GetRoleByNormalizedNameQuery}. {ex.Message}. {ex.InnerException?.Message}",
 060                };
 061            }
 62
 063            return Task.FromResult(response);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQueryValidator.html deleted file mode 100644 index 21c10e6d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRoleByNormalizedNameQueryValidator.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.RoleValidator.GetRoleByNormalizedNameQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.RoleValidator.GetRoleByNormalizedNameQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\GetRoleByNormalizedNameQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:23
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\GetRoleByNormalizedNameQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetRoleByNormalizedNameQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.RoleValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetRoleByNormalizedNameQuery}"/>.
 9    /// </summary>
 10    public class GetRoleByNormalizedNameQueryValidator : AbstractValidator<GetRoleByNormalizedNameQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetRoleByNormalizedNameQueryValidator"/> class.
 14        /// </summary>
 015        public GetRoleByNormalizedNameQueryValidator()
 016        {
 017            this.RuleFor(v => v.NormalizedName)
 018                .MaximumLength(100).WithMessage("NormalizedName maximum length exceeded")
 019                .NotEmpty().WithMessage("NormalizedName must not be empty")
 020                .NotNull().WithMessage("NormalizedName must not be null");
 021        }
 22    }
 23}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRolesForAdminQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRolesForAdminQueryHandler.html deleted file mode 100644 index 15d99a5f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRolesForAdminQueryHandler.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesForAdminQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesForAdminQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\RoleHandler\GetRolesForAdminQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:21
Coverable lines:26
Total lines:66
Line coverage:19.2%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_RoleService()100%10%
get_Logger()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\RoleHandler\GetRolesForAdminQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetRolesForAdminQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.RoleHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetRolesForAdminQuery, RoleResponse}"/>.
 9    /// </summary>
 10    public class GetRolesForAdminQueryHandler : IRequestHandler<GetRolesForAdminQuery, Result<RoleResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetRolesForAdminQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="roleService">Gets An instance of <see cref="IRoleService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetRolesForAdminQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetRolesForAdminQueryHandler(IRoleService roleService, ILogger<GetRolesForAdminQueryHandler> logger)
 219        {
 220            this.RoleService = roleService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IRoleService"/>.
 26        /// </summary>
 027        private IRoleService RoleService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetRolesForAdminQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetRolesForAdminQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetRolesForAdminQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Result{RoleResponse}"/>.</returns>
 40        public Task<Result<RoleResponse>> Handle(GetRolesForAdminQuery request, CancellationToken cancellationToken)
 041        {
 42            Result<RoleResponse>? response;
 43
 44            try
 045            {
 046                var result = this.RoleService.GetRolesForAdmin();
 47
 048                response = new Result<RoleResponse>
 049                {
 050                    Successful = true,
 051                    Items = result ?? new List<RoleResponse>(),
 052                };
 053            }
 054            catch (Exception ex)
 055            {
 056                this.Logger.LogError(ex, ErrorsManager.GetRolesForAdminQuery);
 057                response = new Result<RoleResponse>
 058                {
 059                    Error = $"{ErrorsManager.GetRolesForAdminQuery}. {ex.Message}. {ex.InnerException?.Message}",
 060                };
 061            }
 62
 063            return Task.FromResult(response);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRolesQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRolesQueryHandler.html deleted file mode 100644 index 770cecff..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetRolesQueryHandler.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\RoleHandler\GetRolesQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:21
Coverable lines:26
Total lines:66
Line coverage:19.2%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_RoleService()100%10%
get_Logger()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\RoleHandler\GetRolesQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetRolesQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.RoleHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetRolesQuery, RoleResponse}"/>.
 9    /// </summary>
 10    public class GetRolesQueryHandler : IRequestHandler<GetRolesQuery, Result<RoleResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetRolesQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="roleService">Gets An instance of <see cref="IRoleService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetRolesQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetRolesQueryHandler(IRoleService roleService, ILogger<GetRolesQueryHandler> logger)
 219        {
 220            this.RoleService = roleService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IRoleService"/>.
 26        /// </summary>
 027        private IRoleService RoleService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetRolesQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetRolesQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetRolesQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Result{RoleResponse}"/>.</returns>
 40        public Task<Result<RoleResponse>> Handle(GetRolesQuery request, CancellationToken cancellationToken)
 041        {
 42            Result<RoleResponse>? response;
 43
 44            try
 045            {
 046                var result = this.RoleService.GetRoles();
 47
 048                response = new Result<RoleResponse>
 049                {
 050                    Successful = true,
 051                    Items = result ?? new List<RoleResponse>(),
 052                };
 053            }
 054            catch (Exception ex)
 055            {
 056                this.Logger.LogError(ex, ErrorsManager.GetRolesQuery);
 057                response = new Result<RoleResponse>
 058                {
 059                    Error = $"{ErrorsManager.GetRolesQuery}. {ex.Message}. {ex.InnerException?.Message}",
 060                };
 061            }
 62
 063            return Task.FromResult(response);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQuery.html deleted file mode 100644 index 06b4e31c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.SubscriberQuery.GetSubscriberByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.SubscriberQuery.GetSubscriberByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\SubscriberQuery\GetSubscriberByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\SubscriberQuery\GetSubscriberByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetSubscriberByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.SubscriberQuery
 6{
 7    /// <summary>
 8    /// A model to get the subcriber.
 9    /// </summary>
 10    public class GetSubscriberByIdQuery : IRequest<Result<SubscriberResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 015        public int UserId { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_UserId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQueryHandler.html deleted file mode 100644 index d0a82146..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscriberByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscriberByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriberHandler\GetSubscriberByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriberHandler\GetSubscriberByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetSubscriberByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.SubscriberHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetSubscriberByIdQuery, SubscriberResponse}"/>.
 9    /// </summary>
 10    public class GetSubscriberByIdQueryHandler : IRequestHandler<GetSubscriberByIdQuery, Result<SubscriberResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetSubscriberByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetSubscriberByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetSubscriberByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetSubscriberByIdQueryHandler> log
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetSubscriberByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetSubscriberByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetSubscriberByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{SubscriberResponse}"/>.</returns>
 47        public Task<Result<SubscriberResponse>> Handle(GetSubscriberByIdQuery request, CancellationToken cancellationTok
 048        {
 49            Result<SubscriberResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Subscribers
 054                    .TagWith(nameof(GetSubscriberByIdQueryHandler))
 055                    .ProjectTo<SubscriberResponse>(this.Mapper.ConfigurationProvider)
 056                    .FirstOrDefault(x => x.CustomerId == request.UserId && x.Status == SubscriptionStatus.Active);
 57
 058                response = new Result<SubscriberResponse>
 059                {
 060                    Successful = true,
 061                    Item = result ?? new SubscriberResponse(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetSubscriberByIdQuery);
 067                response = new Result<SubscriberResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetSubscriberByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQueryValidator.html deleted file mode 100644 index 56397f45..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriberByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriberValidator.GetSubscriberByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriberValidator.GetSubscriberByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\GetSubscriberByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\GetSubscriberByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetSubscriberByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriberValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetSubscriberByIdQuery}"/>.
 9    /// </summary>
 10    public class GetSubscriberByIdQueryValidator : AbstractValidator<GetSubscriberByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetSubscriberByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetSubscriberByIdQueryValidator()
 016        {
 017            this.RuleFor(x => x.UserId)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscribersQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscribersQueryHandler.html deleted file mode 100644 index d9f7e7fd..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscribersQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscribersQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscribersQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriberHandler\GetSubscribersQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriberHandler\GetSubscribersQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetSubscribersQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.SubscriberHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetSubscribersQuery, SubscriberResponse}"/>.
 9    /// </summary>
 10    public class GetSubscribersQueryHandler : IRequestHandler<GetSubscribersQuery, Result<SubscriberResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetSubscribersQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetSubscribersQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetSubscribersQueryHandler(IApplicationDbContext dbContext, ILogger<GetSubscribersQueryHandler> logger, I
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetSubscribersQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetSubscribersQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetSubscribersQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{SubscriberResponse}"/>.</returns>
 47        public Task<Result<SubscriberResponse>> Handle(GetSubscribersQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<SubscriberResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Subscribers
 054                    .TagWith(nameof(GetSubscribersQueryHandler))
 055                    .ProjectTo<SubscriberResponse>(this.Mapper.ConfigurationProvider)
 056                    .ToList();
 57
 058                response = new Result<SubscriberResponse>
 059                {
 060                    Successful = true,
 061                    Items = result ?? new List<SubscriberResponse>(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetSubscribersQuery);
 067                response = new Result<SubscriberResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetSubscribersQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQuery.html deleted file mode 100644 index 063bccfa..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.SubscriptionQuery.GetSubscriptionByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.SubscriptionQuery.GetSubscriptionByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\SubscriptionQuery\GetSubscriptionByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\SubscriptionQuery\GetSubscriptionByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetSubscriptionByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.SubscriptionQuery
 6{
 7    /// <summary>
 8    /// A model to get the subscription.
 9    /// </summary>
 10    public class GetSubscriptionByIdQuery : IRequest<Result<SubscriptionResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the subscription.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQueryHandler.html deleted file mode 100644 index 3f6cf96a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriptionHandler\GetSubscriptionByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriptionHandler\GetSubscriptionByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetSubscriptionByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.SubscriptionHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetSubscriptionByIdQuery, SubscriptionResponse}"/>.
 9    /// </summary>
 10    public class GetSubscriptionByIdQueryHandler : IRequestHandler<GetSubscriptionByIdQuery, Result<SubscriptionResponse
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetSubscriptionByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetSubscriptionByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetSubscriptionByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetSubscriptionByIdQueryHandler>
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetSubscriptionByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetSubscriptionByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetSubscriptionByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{SubscriptionResponse}"/>.</returns>
 47        public Task<Result<SubscriptionResponse>> Handle(GetSubscriptionByIdQuery request, CancellationToken cancellatio
 048        {
 49            Result<SubscriptionResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Subscriptions
 054                    .TagWith(nameof(GetSubscriptionByIdQueryHandler))
 055                    .ProjectTo<SubscriptionResponse>(this.Mapper.ConfigurationProvider)
 056                    .FirstOrDefault(x => x.Id == request.Id);
 57
 058                response = new Result<SubscriptionResponse>
 059                {
 060                    Successful = true,
 061                    Item = result ?? new SubscriptionResponse(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetSubscriptionByIdQuery);
 067                response = new Result<SubscriptionResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetSubscriptionByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQueryValidator.html deleted file mode 100644 index 226ce64e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriptionValidator.GetSubscriptionByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriptionValidator.GetSubscriptionByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriptionValidator\GetSubscriptionByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriptionValidator\GetSubscriptionByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetSubscriptionByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriptionValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetSubscriptionByIdQuery}"/>.
 9    /// </summary>
 10    public class GetSubscriptionByIdQueryValidator : AbstractValidator<GetSubscriptionByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetSubscriptionByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetSubscriptionByIdQueryValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionsQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionsQueryHandler.html deleted file mode 100644 index 8d8bbcd6..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetSubscriptionsQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionsQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionsQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriptionHandler\GetSubscriptionsQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriptionHandler\GetSubscriptionsQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetSubscriptionsQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.SubscriptionHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetSubscriptionsQuery, SubscriptionResponse}"/>.
 9    /// </summary>
 10    public class GetSubscriptionsQueryHandler : IRequestHandler<GetSubscriptionsQuery, Result<SubscriptionResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetSubscriptionsQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetSubscriptionsQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetSubscriptionsQueryHandler(IApplicationDbContext dbContext, ILogger<GetSubscriptionsQueryHandler> logge
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetSubscriptionsQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetSubscriptionsQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetSubscriptionsQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{SubscriptionResponse}"/>.</returns>
 47        public Task<Result<SubscriptionResponse>> Handle(GetSubscriptionsQuery request, CancellationToken cancellationTo
 048        {
 49            Result<SubscriptionResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Subscriptions
 054                    .TagWith(nameof(GetSubscriptionsQueryHandler))
 055                    .ProjectTo<SubscriptionResponse>(this.Mapper.ConfigurationProvider)
 056                    .ToList();
 57
 058                response = new Result<SubscriptionResponse>
 059                {
 060                    Successful = true,
 061                    Items = result ?? new List<SubscriptionResponse>(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetSubscriptionsQuery);
 067                response = new Result<SubscriptionResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetSubscriptionsQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQuery.html deleted file mode 100644 index 6078d609..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.TodoItemQuery.GetTodoItemByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.TodoItemQuery.GetTodoItemByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\TodoItemQuery\GetTodoItemByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\TodoItemQuery\GetTodoItemByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetTodoItemByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.TodoItemQuery
 6{
 7    /// <summary>
 8    /// A model to get the item.
 9    /// </summary>
 10    public class GetTodoItemByIdQuery : IRequest<Result<TodoItemResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets the id of the todo item.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQueryHandler.html deleted file mode 100644 index cf87c19e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\TodoItemHandler\GetTodoItemByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\TodoItemHandler\GetTodoItemByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetTodoItemByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.TodoItemHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetTodoItemByIdQuery, TodoItemResponse}"/>.
 9    /// </summary>
 10    public class GetTodoItemByIdQueryHandler : IRequestHandler<GetTodoItemByIdQuery, Result<TodoItemResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetTodoItemByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetTodoItemByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetTodoItemByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetTodoItemByIdQueryHandler> logger,
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetTodoItemByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetTodoItemByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetTodoItemByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{TodoItemResponse}"/>.</returns>
 47        public Task<Result<TodoItemResponse>> Handle(GetTodoItemByIdQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<TodoItemResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.TodoItems
 054                    .TagWith(nameof(GetTodoItemByIdQueryHandler))
 055                    .ProjectTo<TodoItemResponse>(this.Mapper.ConfigurationProvider)
 056                    .FirstOrDefault(x => x.Id == request.Id);
 57
 058                response = new Result<TodoItemResponse>
 059                {
 060                    Successful = true,
 061                    Item = result ?? new TodoItemResponse(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetTodoItemByIdQuery);
 067                response = new Result<TodoItemResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetTodoItemByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQueryValidator.html deleted file mode 100644 index bb5d85b1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.TodoItemValidator.GetTodoItemByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.TodoItemValidator.GetTodoItemByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoItemValidator\GetTodoItemByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoItemValidator\GetTodoItemByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetTodoItemByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.TodoItemValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetTodoItemByIdQuery}"/>.
 9    /// </summary>
 10    public class GetTodoItemByIdQueryValidator : AbstractValidator<GetTodoItemByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetTodoItemByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetTodoItemByIdQueryValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemsQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemsQueryHandler.html deleted file mode 100644 index dc5a62cd..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoItemsQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemsQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemsQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\TodoItemHandler\GetTodoItemsQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\TodoItemHandler\GetTodoItemsQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetTodoItemsQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.TodoItemHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetTodoItemsQuery, TodoItemResponse}"/>.
 9    /// </summary>
 10    public class GetTodoItemsQueryHandler : IRequestHandler<GetTodoItemsQuery, Result<TodoItemResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetTodoItemsQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetTodoItemsQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetTodoItemsQueryHandler(IApplicationDbContext dbContext, ILogger<GetTodoItemsQueryHandler> logger, IMapp
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetTodoItemsQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetTodoItemsQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetTodoItemsQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{TodoItemResponse}"/>.</returns>
 47        public Task<Result<TodoItemResponse>> Handle(GetTodoItemsQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<TodoItemResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.TodoItems
 054                    .TagWith(nameof(GetTodoItemsQueryHandler))
 055                    .ProjectTo<TodoItemResponse>(this.Mapper.ConfigurationProvider)
 056                    .ToList();
 57
 058                response = new Result<TodoItemResponse>
 059                {
 060                    Successful = true,
 061                    Items = result ?? new List<TodoItemResponse>(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetTodoItemsQuery);
 067                response = new Result<TodoItemResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetTodoItemsQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQuery.html deleted file mode 100644 index 28daae10..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.TodoListQuery.GetTodoListByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.TodoListQuery.GetTodoListByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\TodoListQuery\GetTodoListByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\TodoListQuery\GetTodoListByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetTodoListByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.TodoListQuery
 6{
 7    /// <summary>
 8    /// A model to get the list.
 9    /// </summary>
 10    public class GetTodoListByIdQuery : IRequest<Result<TodoListResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the list.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQueryHandler.html deleted file mode 100644 index 0a6eaf3b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\TodoListHandler\GetTodoListByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\TodoListHandler\GetTodoListByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetTodoListByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.TodoListHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetTodoListByIdQuery, TodoListResponse}"/>.
 9    /// </summary>
 10    public class GetTodoListByIdQueryHandler : IRequestHandler<GetTodoListByIdQuery, Result<TodoListResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetTodoListByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetTodoListByIdQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetTodoListByIdQueryHandler(IApplicationDbContext dbContext, ILogger<GetTodoListByIdQueryHandler> logger,
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetTodoListByIdQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetTodoListByIdQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetTodoListByIdQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{TodoListResponse}"/>.</returns>
 47        public Task<Result<TodoListResponse>> Handle(GetTodoListByIdQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<TodoListResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.TodoLists
 054                    .TagWith(nameof(GetTodoListByIdQueryHandler))
 055                    .ProjectTo<TodoListResponse>(this.Mapper.ConfigurationProvider)
 056                    .FirstOrDefault(x => x.Id == request.Id);
 57
 058                response = new Result<TodoListResponse>
 059                {
 060                    Successful = true,
 061                    Item = result ?? new TodoListResponse(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetTodoListByIdQuery);
 067                response = new Result<TodoListResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetTodoListByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQueryValidator.html deleted file mode 100644 index c8841ebc..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.TodoListValidator.GetTodoListByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.TodoListValidator.GetTodoListByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoListValidator\GetTodoListByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoListValidator\GetTodoListByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetTodoListByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.TodoListValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetTodoListByIdQuery}"/>.
 9    /// </summary>
 10    public class GetTodoListByIdQueryValidator : AbstractValidator<GetTodoListByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetTodoListByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetTodoListByIdQueryValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListsQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListsQueryHandler.html deleted file mode 100644 index f8f4e8d7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetTodoListsQueryHandler.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListsQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListsQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\TodoListHandler\GetTodoListsQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:25
Coverable lines:31
Total lines:76
Line coverage:19.3%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\TodoListHandler\GetTodoListsQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetTodoListsQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.TodoListHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetTodoListsQuery, TodoListResponse}"/>.
 9    /// </summary>
 10    public class GetTodoListsQueryHandler : IRequestHandler<GetTodoListsQuery, Result<TodoListResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetTodoListsQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetTodoListsQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetTodoListsQueryHandler(IApplicationDbContext dbContext, ILogger<GetTodoListsQueryHandler> logger, IMapp
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetTodoListsQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetTodoListsQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetTodoListsQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{TodoListResponse}"/>.</returns>
 47        public Task<Result<TodoListResponse>> Handle(GetTodoListsQuery request, CancellationToken cancellationToken)
 048        {
 49            Result<TodoListResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.TodoLists
 054                    .TagWith(nameof(GetTodoListsQueryHandler))
 055                    .ProjectTo<TodoListResponse>(this.Mapper.ConfigurationProvider)
 056                    .ToList();
 57
 058                response = new Result<TodoListResponse>
 059                {
 060                    Successful = true,
 061                    Items = result ?? new List<TodoListResponse>(),
 062                };
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.GetTodoListsQuery);
 067                response = new Result<TodoListResponse>
 068                {
 069                    Error = $"{ErrorsManager.GetTodoListsQuery}. {ex.Message}. {ex.InnerException?.Message}",
 070                };
 071            }
 72
 073            return Task.FromResult(response);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQuery.html deleted file mode 100644 index e4c855a8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.UserQuery.GetUserByEmailQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.UserQuery.GetUserByEmailQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\UserQuery\GetUserByEmailQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Email()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\UserQuery\GetUserByEmailQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserByEmailQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.UserQuery
 6{
 7    /// <summary>
 8    /// A model to get the user.
 9    /// </summary>
 10    public class GetUserByEmailQuery : IRequest<Result<UserResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 015        public string? Email { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Email()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQueryHandler.html deleted file mode 100644 index 8f79d6ec..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQueryHandler.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByEmailQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByEmailQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\UserHandler\GetUserByEmailQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:21
Coverable lines:26
Total lines:66
Line coverage:19.2%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%10%
get_Logger()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\UserHandler\GetUserByEmailQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserByEmailQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetUserByEmailQuery, UserResponse}"/>.
 9    /// </summary>
 10    public class GetUserByEmailQueryHandler : IRequestHandler<GetUserByEmailQuery, Result<UserResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetUserByEmailQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetUserByEmailQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetUserByEmailQueryHandler(IUserService userService, ILogger<GetUserByEmailQueryHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 027        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetUserByEmailQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetUserByEmailQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetUserByEmailQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Result{UserResponse}"/>.</returns>
 40        public Task<Result<UserResponse>> Handle(GetUserByEmailQuery request, CancellationToken cancellationToken)
 041        {
 42            Result<UserResponse>? response;
 43
 44            try
 045            {
 046                var result = this.UserService.GetUserByEmail(request);
 47
 048                response = new Result<UserResponse>
 049                {
 050                    Successful = true,
 051                    Item = result ?? new UserResponse(),
 052                };
 053            }
 054            catch (Exception ex)
 055            {
 056                this.Logger.LogError(ex, ErrorsManager.GetUserByEmailQuery);
 057                response = new Result<UserResponse>
 058                {
 059                    Error = $"{ErrorsManager.GetUserByEmailQuery}. {ex.Message}. {ex.InnerException?.Message}",
 060                };
 061            }
 62
 063            return Task.FromResult(response);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQueryValidator.html deleted file mode 100644 index 01d7ae51..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByEmailQueryValidator.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.UserValidator.GetUserByEmailQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.UserValidator.GetUserByEmailQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\GetUserByEmailQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:19
Coverable lines:19
Total lines:44
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
IsValidEmailAddress(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\GetUserByEmailQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserByEmailQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.UserValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetUserByEmailQuery}"/>.
 9    /// </summary>
 10    public class GetUserByEmailQueryValidator : AbstractValidator<GetUserByEmailQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetUserByEmailQueryValidator"/> class.
 14        /// </summary>
 015        public GetUserByEmailQueryValidator()
 016        {
 017            this.RuleFor(v => v.Email)
 018                .MaximumLength(150).WithMessage("Email maximum length exceeded")
 019                .NotEmpty().WithMessage("Email must not be empty")
 020                .NotNull().WithMessage("Email must not be null")
 021                .Must(this.IsValidEmailAddress).WithMessage("The value is not a valid email address");
 022        }
 23
 24        /// <summary>
 25        /// Gets a value indicating whether the user has a valid email or not.
 26        /// </summary>
 27        /// <param name="emailAddress">The email address.</param>
 28        /// <returns>A boolean value.</returns>
 29        public bool IsValidEmailAddress(string emailAddress)
 030        {
 031            var isEmailValid = false;
 32            try
 033            {
 034                _ = new MailAddress(emailAddress);
 035                isEmailValid = true;
 036            }
 037            catch (Exception)
 038            {
 039            }
 40
 041            return isEmailValid;
 042        }
 43    }
 44}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQuery.html deleted file mode 100644 index 7001182a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.UserQuery.GetUserByIdQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.UserQuery.GetUserByIdQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\UserQuery\GetUserByIdQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\UserQuery\GetUserByIdQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserByIdQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.UserQuery
 6{
 7    /// <summary>
 8    /// A model to get the user.
 9    /// </summary>
 10    public class GetUserByIdQuery : IRequest<Result<UserResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 015        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQueryHandler.html deleted file mode 100644 index 54ff96ee..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQueryHandler.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByIdQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByIdQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\UserHandler\GetUserByIdQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:21
Coverable lines:26
Total lines:66
Line coverage:19.2%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%10%
get_Logger()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\UserHandler\GetUserByIdQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserByIdQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetUserByIdQuery, UserResponse}"/>.
 9    /// </summary>
 10    public class GetUserByIdQueryHandler : IRequestHandler<GetUserByIdQuery, Result<UserResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetUserByIdQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetUserByIdQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetUserByIdQueryHandler(IUserService userService, ILogger<GetUserByIdQueryHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 027        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetUserByIdQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetUserByIdQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetUserByIdQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Result{UserResponse}"/>.</returns>
 40        public Task<Result<UserResponse>> Handle(GetUserByIdQuery request, CancellationToken cancellationToken)
 041        {
 42            Result<UserResponse>? response;
 43
 44            try
 045            {
 046                var result = this.UserService.GetUserById(request);
 47
 048                response = new Result<UserResponse>
 049                {
 050                    Successful = true,
 051                    Item = result ?? new UserResponse(),
 052                };
 053            }
 054            catch (Exception ex)
 055            {
 056                this.Logger.LogError(ex, ErrorsManager.GetUserByIdQuery);
 057                response = new Result<UserResponse>
 058                {
 059                    Error = $"{ErrorsManager.GetUserByIdQuery}. {ex.Message}. {ex.InnerException?.Message}",
 060                };
 061            }
 62
 063            return Task.FromResult(response);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQueryValidator.html deleted file mode 100644 index 759976d2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserByIdQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.UserValidator.GetUserByIdQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.UserValidator.GetUserByIdQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\GetUserByIdQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\GetUserByIdQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserByIdQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.UserValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetUserByIdQuery}"/>.
 9    /// </summary>
 10    public class GetUserByIdQueryValidator : AbstractValidator<GetUserByIdQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetUserByIdQueryValidator"/> class.
 14        /// </summary>
 015        public GetUserByIdQueryValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQuery.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQuery.html deleted file mode 100644 index 35a9eef4..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQuery.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Queries.SubscriberQuery.GetUserSubscribersQuery - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Queries.SubscriberQuery.GetUserSubscribersQuery
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\SubscriberQuery\GetUserSubscribersQuery.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Queries\SubscriberQuery\GetUserSubscribersQuery.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserSubscribersQuery.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Queries.SubscriberQuery
 6{
 7    /// <summary>
 8    /// A model to get the subscribers.
 9    /// </summary>
 10    public class GetUserSubscribersQuery : IRequest<Result<SubscriberResponse>>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 015        public int UserId { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_UserId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQueryHandler.html deleted file mode 100644 index bc2fe482..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQueryHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetUserSubscribersQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetUserSubscribersQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriberHandler\GetUserSubscribersQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
18%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:26
Coverable lines:32
Total lines:77
Line coverage:18.7%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%10%
get_Logger()100%10%
get_Mapper()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\SubscriberHandler\GetUserSubscribersQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserSubscribersQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.SubscriberHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetUserSubscribersQuery, SubscriberResponse}"/>.
 9    /// </summary>
 10    public class GetUserSubscribersQueryHandler : IRequestHandler<GetUserSubscribersQuery, Result<SubscriberResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetUserSubscribersQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetUserSubscribersQueryHandler}"/>.</param>
 17        /// <param name="mapper">Gets An instance of <see cref="IMapper"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 219        public GetUserSubscribersQueryHandler(IApplicationDbContext dbContext, ILogger<GetUserSubscribersQueryHandler> l
 220        {
 221            this.DbContext = dbContext;
 222            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 223            this.Mapper = mapper;
 224        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{GetUserSubscribersQueryHandler}"/>.
 33        /// </summary>
 034        private ILogger<GetUserSubscribersQueryHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IMapper"/>.
 38        /// </summary>
 039        private IMapper Mapper { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="GetUserSubscribersQuery"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Result{SubscriberResponse}"/>.</returns>
 47        public Task<Result<SubscriberResponse>> Handle(GetUserSubscribersQuery request, CancellationToken cancellationTo
 048        {
 49            Result<SubscriberResponse>? response;
 50
 51            try
 052            {
 053                var result = this.DbContext.Subscribers
 054                    .TagWith(nameof(GetUserSubscribersQueryHandler))
 055                    .Where(x => x.Customer.Id == request.UserId && x.Status == SubscriptionStatus.Inactive)
 056                    .ProjectTo<SubscriberResponse>(this.Mapper.ConfigurationProvider)
 057                    .ToList();
 58
 059                response = new Result<SubscriberResponse>
 060                {
 061                    Successful = true,
 062                    Items = result ?? new List<SubscriberResponse>(),
 063                };
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.GetUserSubscribersQuery);
 068                response = new Result<SubscriberResponse>
 069                {
 070                    Error = $"{ErrorsManager.GetUserSubscribersQuery}. {ex.Message}. {ex.InnerException?.Message}",
 071                };
 072            }
 73
 074            return Task.FromResult(response);
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQueryValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQueryValidator.html deleted file mode 100644 index 5c013da5..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUserSubscribersQueryValidator.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriberValidator.GetUserSubscribersQueryValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriberValidator.GetUserSubscribersQueryValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\GetUserSubscribersQueryValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:21
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\GetUserSubscribersQueryValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUserSubscribersQueryValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriberValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{GetUserSubscribersQuery}"/>.
 9    /// </summary>
 10    public class GetUserSubscribersQueryValidator : AbstractValidator<GetUserSubscribersQuery>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetUserSubscribersQueryValidator"/> class.
 14        /// </summary>
 015        public GetUserSubscribersQueryValidator()
 016        {
 017            this.RuleFor(x => x.UserId)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 019        }
 20    }
 21}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUsersInactiveQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUsersInactiveQueryHandler.html deleted file mode 100644 index 1be1680e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUsersInactiveQueryHandler.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersInactiveQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersInactiveQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\UserHandler\GetUsersInactiveQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:21
Coverable lines:26
Total lines:66
Line coverage:19.2%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%10%
get_Logger()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\UserHandler\GetUsersInactiveQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUsersInactiveQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetUsersInactiveQuery, UserResponse}"/>.
 9    /// </summary>
 10    public class GetUsersInactiveQueryHandler : IRequestHandler<GetUsersInactiveQuery, Result<UserResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetUsersInactiveQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetUsersInactiveQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetUsersInactiveQueryHandler(IUserService userService, ILogger<GetUsersInactiveQueryHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 027        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetUsersInactiveQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetUsersInactiveQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetUsersInactiveQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Result{UserResponse}"/>.</returns>
 40        public Task<Result<UserResponse>> Handle(GetUsersInactiveQuery request, CancellationToken cancellationToken)
 041        {
 42            Result<UserResponse>? response;
 43
 44            try
 045            {
 046                var result = this.UserService.GetUsersInactive(request);
 47
 048                response = new Result<UserResponse>
 049                {
 050                    Successful = true,
 051                    Items = result ?? new List<UserResponse>(),
 052                };
 053            }
 054            catch (Exception ex)
 055            {
 056                this.Logger.LogError(ex, ErrorsManager.GetUsersInactiveQuery);
 057                response = new Result<UserResponse>
 058                {
 059                    Error = $"{ErrorsManager.GetUsersInactiveQuery}. {ex.Message}. {ex.InnerException?.Message}",
 060                };
 061            }
 62
 063            return Task.FromResult(response);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUsersQueryHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUsersQueryHandler.html deleted file mode 100644 index 5f4fada3..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_GetUsersQueryHandler.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersQueryHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersQueryHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\UserHandler\GetUsersQueryHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
19%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:21
Coverable lines:26
Total lines:66
Line coverage:19.2%
-
-
-
-
-
Branch coverage
-
-
16%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:6
Branch coverage:16.6%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%10%
get_Logger()100%10%
Handle(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Queries\UserHandler\GetUsersQueryHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="GetUsersQueryHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Queries.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{GetUsersQuery, UserResponse}"/>.
 9    /// </summary>
 10    public class GetUsersQueryHandler : IRequestHandler<GetUsersQuery, Result<UserResponse>>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="GetUsersQueryHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{GetUsersQueryHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public GetUsersQueryHandler(IUserService userService, ILogger<GetUsersQueryHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 027        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{GetUsersQueryHandler}"/>.
 31        /// </summary>
 032        private ILogger<GetUsersQueryHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="GetUsersQuery"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Result{UserResponse}"/>.</returns>
 40        public Task<Result<UserResponse>> Handle(GetUsersQuery request, CancellationToken cancellationToken)
 041        {
 42            Result<UserResponse>? response;
 43
 44            try
 045            {
 046                var result = this.UserService.GetUsers(request);
 47
 048                response = new Result<UserResponse>
 049                {
 050                    Successful = true,
 051                    Items = result ?? new List<UserResponse>(),
 052                };
 053            }
 054            catch (Exception ex)
 055            {
 056                this.Logger.LogError(ex, ErrorsManager.GetUsersQuery);
 057                response = new Result<UserResponse>
 058                {
 059                    Error = $"{ErrorsManager.GetUsersQuery}. {ex.Message}. {ex.InnerException?.Message}",
 060                };
 061            }
 62
 063            return Task.FromResult(response);
 064        }
 65    }
 66}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_IMapFrom_1.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_IMapFrom_1.html deleted file mode 100644 index ed61d9dd..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_IMapFrom_1.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Mappings.IMapFrom<T> - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Mappings.IMapFrom<T>
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Mappings\IMapFrom.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:19
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Mappings\IMapFrom.cs

-
- - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="IMapFrom.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Mappings
 6{
 7    /// <summary>
 8    /// A custom mapping service.
 9    /// </summary>
 10    /// <typeparam name="T">The type of the objects to be mapped from.</typeparam>
 11    public interface IMapFrom<T>
 12    {
 13        /// <summary>
 14        /// Converting an object to another type, DAL to BLL.
 15        /// </summary>
 16        /// <param name="profile">The profile setting to use when mapping objects.</param>
 017        void Mapping(Profile profile) => profile.CreateMap(typeof(T), this.GetType());
 18    }
 19}
-
-
-
-
-

Methods/Properties

-Mapping(AutoMapper.Profile)
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_InvoiceResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_InvoiceResponse.html deleted file mode 100644 index d921daf2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_InvoiceResponse.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.InvoiceResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.InvoiceResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\InvoiceResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:57
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserEmail()100%10%
get_Name()100%10%
get_AmountSubTotal()100%10%
get_AmountTotal()100%10%
get_Quantity()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\InvoiceResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="InvoiceResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// An Invoice response model.
 9    /// </summary>
 10    public class InvoiceResponse : IMapFrom<Invoice>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the invoice.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 020        public string UserEmail { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The name of the invoice.
 24        /// </summary>
 025        public string Name { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The sub total amount of the invoice.
 29        /// </summary>
 030        public int AmountSubTotal { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The total amount of the invoice.
 34        /// </summary>
 035        public int AmountTotal { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The quantity of the order.
 39        /// </summary>
 040        public int Quantity { get; set; }
 41
 42        /// <summary>
 43        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 44        /// </summary>
 45        /// <param name="profile">The profile to use for the mapping operation.</param>
 46        public void Mapping(Profile profile)
 047        {
 048            profile.CreateMap<Invoice, InvoiceResponse>()
 049                .ForMember(d => d.Id, opt => opt.MapFrom(s => s.Id))
 050                .ForMember(d => d.UserEmail, opt => opt.MapFrom(s => s.UserEmail))
 051                .ForMember(d => d.Name, opt => opt.MapFrom(s => s.Name))
 052                .ForMember(d => d.AmountSubTotal, opt => opt.MapFrom(s => s.AmountSubTotal))
 053                .ForMember(d => d.AmountTotal, opt => opt.MapFrom(s => s.AmountTotal))
 054                .ForMember(d => d.Quantity, opt => opt.MapFrom(s => s.Quantity));
 055        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_JwtTokenConfig.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_JwtTokenConfig.html deleted file mode 100644 index 4841f72a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_JwtTokenConfig.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Models.JwtTokenConfig - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Models.JwtTokenConfig
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\JwtTokenConfig.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Secret()100%10%
get_Issuer()100%10%
get_Audience()100%10%
get_AccessToken()100%10%
get_RefreshToken()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\JwtTokenConfig.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="JwtTokenConfig.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Models
 6{
 7    /// <summary>
 8    /// A setting model for the JWT token.
 9    /// </summary>
 10    public class JwtTokenConfig
 11    {
 12        /// <summary>
 13        /// Gets or sets the JWT secret.
 14        /// </summary>
 015        public string? Secret { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets the JWT issuer.
 19        /// </summary>
 020        public string? Issuer { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets the JWT audience.
 24        /// </summary>
 025        public string? Audience { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets the JWT access token.
 29        /// </summary>
 030        public string? AccessToken { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets the JWT refresh token.
 34        /// </summary>
 035        public string? RefreshToken { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_JwtTokenResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_JwtTokenResponse.html deleted file mode 100644 index 3513c38c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_JwtTokenResponse.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Models.JwtTokenResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Models.JwtTokenResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\JwtTokenResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
77%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:7
Uncovered lines:2
Coverable lines:9
Total lines:55
Line coverage:77.7%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_AccessToken()100%1100%
get_Scope()100%1100%
get_ExpiresIn()100%10%
get_Type()100%10%
get_Successful()100%1100%
get_Error()100%1100%
Failure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\JwtTokenResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="JwtTokenResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Models
 6{
 7    /// <summary>
 8    /// A model to create a JWT token.
 9    /// </summary>
 10    public class JwtTokenResponse
 11    {
 12        /// <summary>
 13        /// Gets or sets The access token.
 14        /// </summary>
 15        [JsonProperty("access_token")]
 1416        public string? AccessToken { get; set; } = null;
 17
 18        /// <summary>
 19        /// Gets or sets the scope.
 20        /// </summary>
 21        [JsonProperty("scope")]
 622        public string Scope { get; set; }
 23
 24        /// <summary>
 25        /// Gets or sets the expires in.
 26        /// </summary>
 27        [JsonProperty("expires_in")]
 028        public int ExpiresIn { get; set; }
 29
 30        /// <summary>
 31        /// Gets the token type.
 32        /// </summary>
 033        public string? Type => "Bearer";
 34
 35        /// <summary>
 36        /// Gets or sets A value indicating whether the request was successfully or not.
 37        /// </summary>
 1838        public bool Successful { get; set; } = false;
 39
 40        /// <summary>
 41        /// Gets or sets The error message if the request is not successful.
 42        /// </summary>
 2043        public string? Error { get; set; } = null;
 44
 45        /// <summary>
 46        /// Gets the request response in case of failure.
 47        /// </summary>
 48        /// <param name="error">The error message.</param>
 49        /// <returns>A failure response.</returns>
 50        public static JwtTokenResponse Failure(string error)
 251        {
 252            return new JwtTokenResponse { Error = error };
 253        }
 54    }
 55}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommand.html deleted file mode 100644 index 13257213..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommand.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.AccountCommand.LoginCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.AccountCommand.LoginCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\AccountCommand\LoginCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:2
Uncovered lines:0
Coverable lines:2
Total lines:22
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Email()100%1100%
get_Password()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\AccountCommand\LoginCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="LoginCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.AccountCommand
 6{
 7    /// <summary>
 8    /// A model to login the user.
 9    /// </summary>
 10    public class LoginCommand : IRequest<JwtTokenResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 115        public string? Email { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The password to logged in.
 19        /// </summary>
 120        public string? Password { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Email()
-get_Password()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommandHandler.html deleted file mode 100644 index ff5a63bb..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.AccountHandler.LoginCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.AccountHandler.LoginCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\AccountHandler\LoginCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:57
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_AccountService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\AccountHandler\LoginCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="LoginCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.AccountHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{LoginCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class LoginCommandHandler : IRequestHandler<LoginCommand, JwtTokenResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="LoginCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="accountService">Gets An instance of <see cref="IAccountService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{LoginCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public LoginCommandHandler(IAccountService accountService, ILogger<LoginCommandHandler> logger)
 219        {
 220            this.AccountService = accountService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IAccountService"/>.
 26        /// </summary>
 227        private IAccountService AccountService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{LoginCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<LoginCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="LoginCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{JwtTokenResponse}"/>.</returns>
 40        public async Task<JwtTokenResponse> Handle(LoginCommand request, CancellationToken cancellationToken)
 241        {
 42            JwtTokenResponse? response;
 43
 44            try
 245            {
 246                response = await this.AccountService.LoginAsync(request);
 147            }
 148            catch (Exception ex)
 149            {
 150                this.Logger.LogError(ex, ErrorsManager.LoginCommand);
 151                response = JwtTokenResponse.Failure($"{ErrorsManager.LoginCommand}. {ex.Message}. {ex.InnerException?.Me
 152            }
 53
 254            return response;
 255        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommandValidator.html deleted file mode 100644 index 45bdc370..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_LoginCommandValidator.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.AccountValidator.LoginCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.AccountValidator.LoginCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\AccountValidator\LoginCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:49
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
IsValidEmailAddress(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\AccountValidator\LoginCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="LoginCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.AccountValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{LoginCommand}"/>.
 9    /// </summary>
 10    public class LoginCommandValidator : AbstractValidator<LoginCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="LoginCommandValidator"/> class.
 14        /// </summary>
 015        public LoginCommandValidator()
 016        {
 017            this.RuleFor(v => v.Email)
 018                .MaximumLength(100).WithMessage("Email maximum length exceeded")
 019                .NotEmpty().WithMessage("Email must not be empty")
 020                .NotNull().WithMessage("Email must not be null")
 021                .Must(this.IsValidEmailAddress).WithMessage("The value is not a valid email address");
 22
 023            this.RuleFor(v => v.Password)
 024                .MaximumLength(100).WithMessage("Password maximum length exceeded")
 025                .NotEmpty().WithMessage("Password must not be empty")
 026                .NotNull().WithMessage("Password must not be null");
 027        }
 28
 29        /// <summary>
 30        /// A value indicating whether the email address is valid or not.
 31        /// </summary>
 32        /// <param name="emailAddress">The email address.</param>
 33        /// <returns>A boolean value.</returns>
 34        public bool IsValidEmailAddress(string emailAddress)
 035        {
 036            var isEmailValid = false;
 37            try
 038            {
 039                _ = new MailAddress(emailAddress);
 040                isEmailValid = true;
 041            }
 042            catch (Exception)
 043            {
 044            }
 45
 046            return isEmailValid;
 047        }
 48    }
 49}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MappingExtensions.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MappingExtensions.html deleted file mode 100644 index c3a75669..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MappingExtensions.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Mappings.MappingExtensions - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Mappings.MappingExtensions
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Mappings\MappingExtensions.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
ProjectToListAsync(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Mappings\MappingExtensions.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="MappingExtensions.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Mappings
 6{
 7    /// <summary>
 8    /// A custom mapping extension service.
 9    /// </summary>
 10    public static class MappingExtensions
 11    {
 12        /// <summary>
 13        /// Converting a list of object to a certain type of list of objects.
 14        /// </summary>
 15        /// <typeparam name="TDestination">The type to convert the list to.</typeparam>
 16        /// <param name="queryable">The query to be mapped.</param>
 17        /// <param name="configuration">The mapping configuration to apply on.</param>
 18        /// <returns>The list converted to a new type.</returns>
 19        public static Task<List<TDestination>> ProjectToListAsync<TDestination>(this IQueryable queryable, AutoMapper.IC
 020            => queryable.ProjectTo<TDestination>(configuration).ToListAsync();
 21    }
 22}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MappingProfile.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MappingProfile.html deleted file mode 100644 index fe3f77e7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MappingProfile.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Mappings.MappingProfile - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Mappings.MappingProfile
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Mappings\MappingProfile.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
ApplyMappingFromAssembly(...)0%80%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Mappings\MappingProfile.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="MappingProfile.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Mappings
 6{
 7    /// <summary>
 8    /// A mapping profile for applying the new mapping using reflection.
 9    /// </summary>
 10    public class MappingProfile : Profile
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="MappingProfile"/> class.
 14        /// </summary>
 015        public MappingProfile()
 016        {
 017            this.ApplyMappingFromAssembly(Assembly.GetExecutingAssembly());
 018        }
 19
 20        /// <summary>
 21        /// Applying the mapping from the assembly.
 22        /// </summary>
 23        /// <param name="assembly">The assembly reflection.</param>
 24        private void ApplyMappingFromAssembly(Assembly assembly)
 025        {
 026            var types = assembly.GetExportedTypes()
 027                .Where(t => t.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IMapFro
 028                .ToList();
 029            foreach (var type in types)
 030            {
 031                var instance = Activator.CreateInstance(type);
 032                var methodInfo = type.GetMethod("Mapping") ?? type.GetInterface("IMapFrom`1").GetMethod("Mapping");
 033                methodInfo?.Invoke(instance, new object[] { this });
 034            }
 035        }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MusicResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MusicResponse.html deleted file mode 100644 index b6e24d18..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_MusicResponse.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.MusicResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.MusicResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\MusicResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:19
Coverable lines:19
Total lines:69
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Title()100%10%
get_Description()100%10%
get_Author()100%10%
get_DateRelease()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
get_AccessLevel()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\MusicResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="MusicResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A Music response model.
 9    /// </summary>
 10    public class MusicResponse : IMapFrom<Music>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the music.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The title of the music.
 19        /// </summary>
 020        public string Title { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The description of the music.
 24        /// </summary>
 025        public string Description { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The author of the music.
 29        /// </summary>
 030        public string Author { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The release date of the music.
 34        /// </summary>
 035        public DateTime DateRelease { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The image name of the music.
 39        /// </summary>
 040        public string ImageName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The image path of the music.
 44        /// </summary>
 045        public string ImagePath { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets The access level of the music.
 49        /// </summary>
 050        public int AccessLevel { get; set; }
 51
 52        /// <summary>
 53        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 54        /// </summary>
 55        /// <param name="profile">The profile to use for the mapping operation.</param>
 56        public void Mapping(Profile profile)
 057        {
 058            profile.CreateMap<Music, MusicResponse>()
 059                .ForMember(x => x.Id, opt => opt.MapFrom(s => s.Id))
 060                .ForMember(x => x.Title, opt => opt.MapFrom(s => s.Title))
 061                .ForMember(x => x.Description, opt => opt.MapFrom(s => s.Description))
 062                .ForMember(x => x.Author, opt => opt.MapFrom(s => s.Author))
 063                .ForMember(x => x.DateRelease, opt => opt.MapFrom(s => s.DateRelease))
 064                .ForMember(x => x.ImageName, opt => opt.MapFrom(s => s.ImageName))
 065                .ForMember(x => x.AccessLevel, opt => opt.MapFrom(s => s.AccessLevel))
 066                .ForMember(x => x.ImagePath, opt => opt.MapFrom(s => s.ImagePath));
 067        }
 68    }
 69}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_OrderResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_OrderResponse.html deleted file mode 100644 index 3838604d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_OrderResponse.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.OrderResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.OrderResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\OrderResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:57
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserEmail()100%10%
get_OrderName()100%10%
get_OrderDate()100%10%
get_LineItems()100%10%
get_AmountTotal()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\OrderResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="OrderResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// An Order response model.
 9    /// </summary>
 10    public class OrderResponse : IMapFrom<Order>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the order.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 020        public string UserEmail { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The name of the order.
 24        /// </summary>
 025        public string OrderName { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The date when the order was placed.
 29        /// </summary>
 030        public DateTime OrderDate { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The items of the order.
 34        /// </summary>
 035        public string LineItems { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The total amount of the order.
 39        /// </summary>
 040        public int AmountTotal { get; set; }
 41
 42        /// <summary>
 43        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 44        /// </summary>
 45        /// <param name="profile">The profile to use for the mapping operation.</param>
 46        public void Mapping(Profile profile)
 047        {
 048            profile.CreateMap<Order, OrderResponse>()
 049                .ForMember(d => d.Id, opt => opt.MapFrom(s => s.Id))
 050                .ForMember(d => d.UserEmail, opt => opt.MapFrom(s => s.UserEmail))
 051                .ForMember(d => d.OrderName, opt => opt.MapFrom(s => s.OrderName))
 052                .ForMember(d => d.OrderDate, opt => opt.MapFrom(s => s.OrderDate))
 053                .ForMember(d => d.LineItems, opt => opt.MapFrom(s => s.LineItems))
 054                .ForMember(d => d.AmountTotal, opt => opt.MapFrom(s => s.AmountTotal));
 055        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ReceiptResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ReceiptResponse.html deleted file mode 100644 index 0132ab0f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ReceiptResponse.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.ReceiptResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.ReceiptResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\ReceiptResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:51
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserEmail()100%10%
get_ReceiptDate()100%10%
get_ReceiptName()100%10%
get_ReceiptUrl()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\ReceiptResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ReceiptResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A Receipt response model.
 9    /// </summary>
 10    public class ReceiptResponse : IMapFrom<Receipt>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the receipt.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 020        public string UserEmail { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The date when the receipt was generated.
 24        /// </summary>
 025        public DateTime ReceiptDate { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The name of the receipt.
 29        /// </summary>
 030        public string ReceiptName { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The url of the receipt.
 34        /// </summary>
 035        public string ReceiptUrl { get; set; }
 36
 37        /// <summary>
 38        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 39        /// </summary>
 40        /// <param name="profile">The profile to use for the mapping operation.</param>
 41        public void Mapping(Profile profile)
 042        {
 043            profile.CreateMap<Receipt, ReceiptResponse>()
 044                .ForMember(d => d.Id, opt => opt.MapFrom(s => s.Id))
 045                .ForMember(d => d.UserEmail, opt => opt.MapFrom(s => s.UserEmail))
 046                .ForMember(d => d.ReceiptDate, opt => opt.MapFrom(s => s.ReceiptDate))
 047                .ForMember(d => d.ReceiptName, opt => opt.MapFrom(s => s.ReceiptName))
 048                .ForMember(d => d.ReceiptUrl, opt => opt.MapFrom(s => s.ReceiptUrl));
 049        }
 50    }
 51}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommand.html deleted file mode 100644 index 8770cbca..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommand.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.AccountCommand.RegisterCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.AccountCommand.RegisterCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\AccountCommand\RegisterCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
33%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:2
Uncovered lines:4
Coverable lines:6
Total lines:42
Line coverage:33.3%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Email()100%1100%
get_FirstName()100%10%
get_LastName()100%10%
get_RoleName()100%10%
get_Password()100%1100%
get_ConfirmPassword()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\AccountCommand\RegisterCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RegisterCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.AccountCommand
 6{
 7    /// <summary>
 8    /// A model to register the user.
 9    /// </summary>
 10    public class RegisterCommand : IRequest<JwtTokenResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 115        public string? Email { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The first name of the user.
 19        /// </summary>
 020        public string? FirstName { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The last name of the user.
 24        /// </summary>
 025        public string? LastName { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The role of the user.
 29        /// </summary>
 030        public string? RoleName { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The password to be used.
 34        /// </summary>
 135        public string? Password { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The confirmed password to be used.
 39        /// </summary>
 040        public string? ConfirmPassword { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommandHandler.html deleted file mode 100644 index f7b93e88..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.AccountHandler.RegisterCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.AccountHandler.RegisterCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\AccountHandler\RegisterCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:57
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_AccountService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\AccountHandler\RegisterCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RegisterCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.AccountHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{RegisterCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class RegisterCommandHandler : IRequestHandler<RegisterCommand, JwtTokenResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="RegisterCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="accountService">Gets An instance of <see cref="IAccountService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{RegisterCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public RegisterCommandHandler(IAccountService accountService, ILogger<RegisterCommandHandler> logger)
 219        {
 220            this.AccountService = accountService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IAccountService"/>.
 26        /// </summary>
 227        private IAccountService AccountService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{RegisterCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<RegisterCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="RegisterCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{JwtTokenResponse}"/>.</returns>
 40        public async Task<JwtTokenResponse> Handle(RegisterCommand request, CancellationToken cancellationToken)
 241        {
 42            JwtTokenResponse? response;
 43
 44            try
 245            {
 246                response = await this.AccountService.RegisterAsync(request);
 147            }
 148            catch (Exception ex)
 149            {
 150                this.Logger.LogError(ex, ErrorsManager.RegisterCommand);
 151                response = JwtTokenResponse.Failure($"{ErrorsManager.RegisterCommand}. {ex.Message}. {ex.InnerException?
 152            }
 53
 254            return response;
 255        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommandValidator.html deleted file mode 100644 index 914d478b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RegisterCommandValidator.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.AccountValidator.RegisterCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.AccountValidator.RegisterCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\AccountValidator\RegisterCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:36
Coverable lines:36
Total lines:65
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
IsValidEmailAddress(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\AccountValidator\RegisterCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RegisterCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.AccountValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{RegisterCommand}"/>.
 9    /// </summary>
 10    public class RegisterCommandValidator : AbstractValidator<RegisterCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="RegisterCommandValidator"/> class.
 14        /// </summary>
 015        public RegisterCommandValidator()
 016        {
 017            this.RuleFor(v => v.Email)
 018                .MaximumLength(100).WithMessage("Email maximum length exceeded")
 019                .NotEmpty().WithMessage("Email must not be empty")
 020                .NotNull().WithMessage("Email must not be null")
 021                .Must(this.IsValidEmailAddress).WithMessage("The value is not a valid email address");
 22
 023            this.RuleFor(v => v.FirstName)
 024                .MaximumLength(100).WithMessage("FirstName maximum length exceeded")
 025                .NotEmpty().WithMessage("FirstName must not be empty")
 026                .NotNull().WithMessage("FirstName must not be null");
 27
 028            this.RuleFor(v => v.LastName)
 029                .MaximumLength(100).WithMessage("LastName maximum length exceeded")
 030                .NotEmpty().WithMessage("LastName must not be empty")
 031                .NotNull().WithMessage("LastName must not be null");
 32
 033            this.RuleFor(v => v.Password)
 034                .MaximumLength(100).WithMessage("Password maximum length exceeded")
 035                .NotEmpty().WithMessage("Password must not be empty")
 036                .NotNull().WithMessage("Password must not be null");
 37
 038            this.RuleFor(v => v.ConfirmPassword)
 039                .MaximumLength(100).WithMessage("ConfirmPassword maximum length exceeded")
 040                .NotEmpty().WithMessage("ConfirmPassword must not be empty")
 041                .NotNull().WithMessage("ConfirmPassword must not be null")
 042                .Equal(v => v.Password).WithMessage("ConfirmPassword must be equal with Password");
 043        }
 44
 45        /// <summary>
 46        /// A value indicating whether the email address is valid or not.
 47        /// </summary>
 48        /// <param name="emailAddress">The email address.</param>
 49        /// <returns>A boolean value.</returns>
 50        public bool IsValidEmailAddress(string emailAddress)
 051        {
 052            var isEmailValid = false;
 53            try
 054            {
 055                _ = new MailAddress(emailAddress);
 056                isEmailValid = true;
 057            }
 058            catch (Exception)
 059            {
 060            }
 61
 062            return isEmailValid;
 063        }
 64    }
 65}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RequestResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RequestResponse.html deleted file mode 100644 index 0fe2a994..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RequestResponse.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Models.RequestResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Models.RequestResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\RequestResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:48
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Successful()100%1100%
get_Error()100%1100%
get_EntityId()100%1100%
Success(...)100%1100%
Failure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\RequestResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RequestResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Models
 6{
 7    /// <summary>
 8    /// A generic model to return the results.
 9    /// </summary>
 10    public class RequestResponse
 11    {
 12        /// <summary>
 13        /// Gets or sets A value indicating whether the request was successfully or not.
 14        /// </summary>
 12115        public bool Successful { get; set; } = false;
 16
 17        /// <summary>
 18        /// Gets or sets The error message if the request is not successful.
 19        /// </summary>
 12020        public string? Error { get; set; } = null;
 21
 22        /// <summary>
 23        /// Gets or sets The id of the entity.
 24        /// </summary>
 7525        public int EntityId { get; set; } = 0;
 26
 27        /// <summary>
 28        /// Gets the request response in case of success.
 29        /// </summary>
 30        /// <param name="id">The id of the entity.</param>
 31        /// <returns>A successful response.</returns>
 32        public static RequestResponse Success(int id = 0)
 333        {
 334            return new RequestResponse { Successful = true, EntityId = id, Error = null };
 335        }
 36
 37        /// <summary>
 38        /// Gets the request response in case of failure.
 39        /// </summary>
 40        /// <param name="error">The error message.</param>
 41        /// <param name="id">The id of the entitty.</param>
 42        /// <returns>A failure response.</returns>
 43        public static RequestResponse Failure(string error, int id = 0)
 1144        {
 1145            return new RequestResponse { Successful = false, EntityId = id, Error = error };
 1146        }
 47    }
 48}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommand.html deleted file mode 100644 index 2244dc20..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommand.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.AccountCommand.ResetPasswordCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.AccountCommand.ResetPasswordCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\AccountCommand\ResetPasswordCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:0
Coverable lines:3
Total lines:27
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Email()100%1100%
get_NewPassword()100%1100%
get_NewConfirmPassword()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\AccountCommand\ResetPasswordCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ResetPasswordCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.AccountCommand
 6{
 7    /// <summary>
 8    /// A model to reset the password.
 9    /// </summary>
 10    public class ResetPasswordCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The email of the user.
 14        /// </summary>
 115        public string? Email { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The new password to be used.
 19        /// </summary>
 120        public string? NewPassword { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The new confirmed password to be used.
 24        /// </summary>
 125        public string? NewConfirmPassword { get; set; }
 26    }
 27}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommandHandler.html deleted file mode 100644 index 5f0c25c4..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.AccountHandler.ResetPasswordCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.AccountHandler.ResetPasswordCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\AccountHandler\ResetPasswordCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:57
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_AccountService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\AccountHandler\ResetPasswordCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ResetPasswordCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.AccountHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{ResetPasswordCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class ResetPasswordCommandHandler : IRequestHandler<ResetPasswordCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ResetPasswordCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="accountService">Gets An instance of <see cref="IAccountService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{ResetPasswordCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public ResetPasswordCommandHandler(IAccountService accountService, ILogger<ResetPasswordCommandHandler> logger)
 219        {
 220            this.AccountService = accountService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IAccountService"/>.
 26        /// </summary>
 227        private IAccountService AccountService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{ResetPasswordCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<ResetPasswordCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="ResetPasswordCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(ResetPasswordCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                response = await this.AccountService.ResetPasswordUserAsync(request);
 147            }
 148            catch (Exception ex)
 149            {
 150                this.Logger.LogError(ex, ErrorsManager.ResetPasswordCommand);
 151                response = RequestResponse.Failure($"{ErrorsManager.ResetPasswordCommand}. {ex.Message}. {ex.InnerExcept
 152            }
 53
 254            return response;
 255        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommandValidator.html deleted file mode 100644 index 0cbd22ba..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ResetPasswordCommandValidator.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.AccountValidator.ResetPasswordCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.AccountValidator.ResetPasswordCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\AccountValidator\ResetPasswordCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:28
Coverable lines:28
Total lines:55
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
IsValidEmailAddress(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\AccountValidator\ResetPasswordCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ResetPasswordCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.AccountValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{ResetPasswordCommand}"/>.
 9    /// </summary>
 10    public class ResetPasswordCommandValidator : AbstractValidator<ResetPasswordCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ResetPasswordCommandValidator"/> class.
 14        /// </summary>
 015        public ResetPasswordCommandValidator()
 016        {
 017            this.RuleFor(v => v.Email)
 018                .MaximumLength(100).WithMessage("Maximum length exceeded")
 019                .NotEmpty().WithMessage("Email must not be empty")
 020                .NotNull().WithMessage("Email must not be null")
 021                .Must(this.IsValidEmailAddress).WithMessage("The value is not a valid email address");
 22
 023            this.RuleFor(v => v.NewPassword)
 024                .MaximumLength(100).WithMessage("NewPassword maximum length exceeded")
 025                .NotEmpty().WithMessage("NewPassword must not be empty")
 026                .NotNull().WithMessage("NewPassword must not be null");
 27
 028            this.RuleFor(v => v.NewConfirmPassword)
 029                .MaximumLength(100).WithMessage("NewConfirmPassword maximum length exceeded")
 030                .NotEmpty().WithMessage("NewConfirmPassword must not be empty")
 031                .NotNull().WithMessage("NewConfirmPassword must not be null")
 032                .Equal(v => v.NewConfirmPassword).WithMessage("NewPassword must be equal with NewConfirmPassword");
 033        }
 34
 35        /// <summary>
 36        /// A value indicating whether the email address is valid or not.
 37        /// </summary>
 38        /// <param name="emailAddress">The email address.</param>
 39        /// <returns>A boolean value.</returns>
 40        public bool IsValidEmailAddress(string emailAddress)
 041        {
 042            var isEmailValid = false;
 43            try
 044            {
 045                _ = new MailAddress(emailAddress);
 046                isEmailValid = true;
 047            }
 048            catch (Exception)
 049            {
 050            }
 51
 052            return isEmailValid;
 053        }
 54    }
 55}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_Result_1.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_Result_1.html deleted file mode 100644 index 40f52ea5..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_Result_1.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Models.Result<T> - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Models.Result<T>
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\Result.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:34
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Successful()100%1100%
get_Error()100%1100%
get_Item()100%1100%
get_Items()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Models\Result.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Result.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Models
 6{
 7    /// <summary>
 8    /// A generic model to return the results.
 9    /// </summary>
 10    /// <typeparam name="T">A generic type.</typeparam>
 11    public class Result<T>
 12        where T : class
 13    {
 14        /// <summary>
 15        /// Gets or sets a value indicating whether the request was successfully or not.
 16        /// </summary>
 2217        public bool Successful { get; set; } = false;
 18
 19        /// <summary>
 20        /// Gets or sets The error message if the request is not successful.
 21        /// </summary>
 2222        public string? Error { get; set; } = null;
 23
 24        /// <summary>
 25        /// Gets or sets A single item containing the data.
 26        /// </summary>
 3327        public T? Item { get; set; } = null;
 28
 29        /// <summary>
 30        /// Gets or sets A list of items containing the data.
 31        /// </summary>
 2132        public List<T>? Items { get; set; } = null;
 33    }
 34}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RoleResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RoleResponse.html deleted file mode 100644 index 2e229617..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_RoleResponse.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.RoleResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.RoleResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\RoleResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:39
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Name()100%10%
get_NormalizedName()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\RoleResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RoleResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A Role response model.
 9    /// </summary>
 10    public class RoleResponse : IMapFrom<Role>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the role.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The name of the role.
 19        /// </summary>
 020        public string? Name { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The normalized name of the role.
 24        /// </summary>
 025        public string? NormalizedName { get; set; }
 26
 27        /// <summary>
 28        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 29        /// </summary>
 30        /// <param name="profile">The profile to use for the mapping operation.</param>
 31        public void Mapping(Profile profile)
 032        {
 033            profile.CreateMap<Role, RoleResponse>()
 034                .ForMember(d => d.Id, opt => opt.MapFrom(s => s.Id))
 035                .ForMember(d => d.Name, opt => opt.MapFrom(s => s.Name))
 036                .ForMember(d => d.NormalizedName, opt => opt.MapFrom(s => s.NormalizedName));
 037        }
 38    }
 39}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_SubscriberResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_SubscriberResponse.html deleted file mode 100644 index e192ec2b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_SubscriberResponse.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.SubscriberResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.SubscriberResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\SubscriberResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:33
Coverable lines:33
Total lines:111
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Status()100%10%
get_DateStart()100%10%
get_CurrentPeriodEnd()100%10%
get_CurrentPeriodStart()100%10%
get_CustomerId()100%10%
get_CustomerName()100%10%
get_SubscriptionId()100%10%
get_SubscriptionName()100%10%
get_StripeSubscriptionId()100%10%
get_CustomerEmail()100%10%
get_StripeSubscriberSubscriptionId()100%10%
get_HostedInvoiceUrl()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\SubscriberResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SubscriberResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A Subscriber response model.
 9    /// </summary>
 10    public class SubscriberResponse : IMapFrom<Subscriber>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the subscriber.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The status of the subscription.
 19        /// </summary>
 020        public SubscriptionStatus Status { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The started date of the subscriber.
 24        /// </summary>
 025        public DateTime DateStart { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The date when the current period ends.
 29        /// </summary>
 030        public DateTime CurrentPeriodEnd { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The date when the current period starts.
 34        /// </summary>
 035        public DateTime CurrentPeriodStart { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The id of the customer.
 39        /// </summary>
 040        public int CustomerId { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The name of the customer.
 44        /// </summary>
 045        public string CustomerName { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets The id of the subscription.
 49        /// </summary>
 050        public int SubscriptionId { get; set; }
 51
 52        /// <summary>
 53        /// Gets or sets The name of the subscription.
 54        /// </summary>
 055        public string SubscriptionName { get; set; }
 56
 57        /// <summary>
 58        /// Gets or sets The id of the stripe subscription.
 59        /// </summary>
 060        public string StripeSubscriptionId { get; set; }
 61
 62        /// <summary>
 63        /// Gets or sets The email of the customer.
 64        /// </summary>
 065        public string CustomerEmail { get; set; }
 66
 67        /// <summary>
 68        /// Gets or sets The id of the stripe subscriber subscription.
 69        /// </summary>
 070        public string StripeSubscriberSubscriptionId { get; set; }
 71
 72        /// <summary>
 73        /// Gets or sets The url of the invoice.
 74        /// </summary>
 075        public string HostedInvoiceUrl { get; set; }
 76
 77        /// <summary>
 78        /// Gets or sets The image name of the subscriber.
 79        /// </summary>
 080        public string ImageName { get; set; }
 81
 82        /// <summary>
 83        /// Gets or sets The image path of the subscriber.
 84        /// </summary>
 085        public string ImagePath { get; set; }
 86
 87        /// <summary>
 88        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 89        /// </summary>
 90        /// <param name="profile">The profile to use for the mapping operation.</param>
 91        public void Mapping(Profile profile)
 092        {
 093            profile.CreateMap<Subscriber, SubscriberResponse>()
 094                .ForMember(x => x.Id, opt => opt.MapFrom(s => s.Id))
 095                .ForMember(x => x.StripeSubscriberSubscriptionId, opt => opt.MapFrom(s => s.StripeSubscriberSubscription
 096                .ForMember(x => x.HostedInvoiceUrl, opt => opt.MapFrom(s => s.HostedInvoiceUrl))
 097                .ForMember(x => x.StripeSubscriptionId, opt => opt.MapFrom(s => s.Subscription.StripeSubscriptionId))
 098                .ForMember(x => x.Status, opt => opt.MapFrom(s => s.Status))
 099                .ForMember(x => x.DateStart, opt => opt.MapFrom(s => s.DateStart))
 0100                .ForMember(x => x.CurrentPeriodEnd, opt => opt.MapFrom(s => s.CurrentPeriodEnd))
 0101                .ForMember(x => x.CurrentPeriodStart, opt => opt.MapFrom(s => s.CurrentPeriodStart))
 0102                .ForMember(x => x.CustomerId, opt => opt.MapFrom(s => s.Customer.Id))
 0103                .ForMember(x => x.CustomerName, opt => opt.MapFrom(s => s.Customer.FirstName + " " + s.Customer.LastName
 0104                .ForMember(x => x.CustomerEmail, opt => opt.MapFrom(s => s.Customer.Email))
 0105                .ForMember(x => x.SubscriptionId, opt => opt.MapFrom(s => s.Subscription.Id))
 0106                .ForMember(x => x.ImageName, opt => opt.MapFrom(s => s.Subscription.ImageName))
 0107                .ForMember(x => x.ImagePath, opt => opt.MapFrom(s => s.Subscription.ImagePath))
 0108                .ForMember(x => x.SubscriptionName, opt => opt.MapFrom(s => s.Subscription.Name));
 0109        }
 110    }
 111}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_SubscriptionResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_SubscriptionResponse.html deleted file mode 100644 index 2b17f37d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_SubscriptionResponse.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.SubscriptionResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.SubscriptionResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\SubscriptionResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:81
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_StripeSubscriptionId()100%10%
get_Name()100%10%
get_Price()100%10%
get_Currency()100%10%
get_CurrencySymbol()100%10%
get_ChargeType()100%10%
get_Options()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\SubscriptionResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SubscriptionResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A Subscription response model.
 9    /// </summary>
 10    public class SubscriptionResponse : IMapFrom<Subscription>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the subscription.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the stripe subscription.
 19        /// </summary>
 020        public string StripeSubscriptionId { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The name of the subscription.
 24        /// </summary>
 025        public string Name { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The price of the subscription.
 29        /// </summary>
 030        public int Price { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The currency of the subscription.
 34        /// </summary>
 035        public string Currency { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The currency symbol of the subscription.
 39        /// </summary>
 040        public string CurrencySymbol { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The charge type of the subscription.
 44        /// </summary>
 045        public string ChargeType { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets The options of the subscription.
 49        /// </summary>
 050        public string Options { get; set; }
 51
 52        /// <summary>
 53        /// Gets or sets The image name of the subscription.
 54        /// </summary>
 055        public string ImageName { get; set; }
 56
 57        /// <summary>
 58        /// Gets or sets The image path of the subscription.
 59        /// </summary>
 060        public string ImagePath { get; set; }
 61
 62        /// <summary>
 63        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 64        /// </summary>
 65        /// <param name="profile">The profile to use for the mapping operation.</param>
 66        public void Mapping(Profile profile)
 067        {
 068            profile.CreateMap<Subscription, SubscriptionResponse>()
 069                .ForMember(x => x.Id, opt => opt.MapFrom(s => s.Id))
 070                .ForMember(x => x.StripeSubscriptionId, opt => opt.MapFrom(s => s.StripeSubscriptionId))
 071                .ForMember(x => x.Name, opt => opt.MapFrom(s => s.Name))
 072                .ForMember(x => x.Price, opt => opt.MapFrom(s => s.Price))
 073                .ForMember(x => x.Currency, opt => opt.MapFrom(s => s.Currency))
 074                .ForMember(x => x.CurrencySymbol, opt => opt.MapFrom(s => s.CurrencySymbol))
 075                .ForMember(x => x.ChargeType, opt => opt.MapFrom(s => s.ChargeType))
 076                .ForMember(x => x.ImageName, opt => opt.MapFrom(s => s.ImageName))
 077                .ForMember(x => x.ImagePath, opt => opt.MapFrom(s => s.ImagePath))
 078                .ForMember(x => x.Options, opt => opt.MapFrom(s => s.Options));
 079        }
 80    }
 81}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_TodoItemResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_TodoItemResponse.html deleted file mode 100644 index acd422be..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_TodoItemResponse.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.TodoItemResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.TodoItemResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\TodoItemResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:19
Coverable lines:19
Total lines:69
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_ListId()100%10%
get_Title()100%10%
get_Note()100%10%
get_Priority()100%10%
get_State()100%10%
get_Done()100%10%
get_List()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\TodoItemResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoItemResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A TodoItem response model.
 9    /// </summary>
 10    public class TodoItemResponse : IMapFrom<TodoItem>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the item.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the list.
 19        /// </summary>
 020        public int ListId { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The title of the item.
 24        /// </summary>
 025        public string? Title { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The note of the item.
 29        /// </summary>
 030        public string? Note { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The priority of the item.
 34        /// </summary>
 035        public TodoItemPriority Priority { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The state of the item.
 39        /// </summary>
 040        public TodoItemState State { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets a value indicating whether the item is done or not.
 44        /// </summary>
 045        public bool Done { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets The list.
 49        /// </summary>
 050        public TodoListResponse List { get; set; }
 51
 52        /// <summary>
 53        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 54        /// </summary>
 55        /// <param name="profile">The profile to use for the mapping operation.</param>
 56        public void Mapping(Profile profile)
 057        {
 058            profile.CreateMap<TodoItem, TodoItemResponse>()
 059                .ForMember(x => x.Id, opt => opt.MapFrom(s => s.Id))
 060                .ForMember(x => x.ListId, opt => opt.MapFrom(s => s.List.Id))
 061                .ForMember(x => x.Title, opt => opt.MapFrom(s => s.Title))
 062                .ForMember(x => x.Note, opt => opt.MapFrom(s => s.Note))
 063                .ForMember(x => x.Priority, opt => opt.MapFrom(s => s.Priority))
 064                .ForMember(x => x.State, opt => opt.MapFrom(s => s.State))
 065                .ForMember(x => x.Done, opt => opt.MapFrom(s => s.Done))
 066                .ForMember(x => x.List, opt => opt.MapFrom(s => s.List));
 067        }
 68    }
 69}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_TodoListResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_TodoListResponse.html deleted file mode 100644 index 1469fe70..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_TodoListResponse.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.TodoListResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.TodoListResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\TodoListResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:39
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Title()100%10%
get_Items()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\TodoListResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoListResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// A TodoList response model.
 9    /// </summary>
 10    public class TodoListResponse : IMapFrom<TodoList>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the list.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The title of the list.
 19        /// </summary>
 020        public string? Title { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The items of the list.
 24        /// </summary>
 025        public List<TodoItemResponse> Items { get; set; }
 26
 27        /// <summary>
 28        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 29        /// </summary>
 30        /// <param name="profile">The profile to use for the mapping operation.</param>
 31        public void Mapping(Profile profile)
 032        {
 033            profile.CreateMap<TodoList, TodoListResponse>()
 034                .ForMember(x => x.Id, opt => opt.MapFrom(s => s.Id))
 035                .ForMember(x => x.Title, opt => opt.MapFrom(s => s.Title))
 036                .ForMember(x => x.Items, opt => opt.MapFrom(s => s.Items));
 037        }
 38    }
 39}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UnhandledExceptionBehaviour_2.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UnhandledExceptionBehaviour_2.html deleted file mode 100644 index 8ec990c0..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UnhandledExceptionBehaviour_2.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Behaviours.UnhandledExceptionBehaviour<T1, T2> - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Behaviours.UnhandledExceptionBehaviour<T1, T2>
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Behaviours\UnhandledExceptionBehaviour.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:50
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Logger()100%10%
Handle()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Behaviours\UnhandledExceptionBehaviour.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UnhandledExceptionBehaviour.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Behaviours
 6{
 7    /// <summary>
 8    /// A service to configure the unhandled exception behaviour.
 9    /// </summary>
 10    /// <typeparam name="TRequest">The request type.</typeparam>
 11    /// <typeparam name="TResponse">The response type.</typeparam>
 12    public class UnhandledExceptionBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
 13         where TRequest : IRequest<TResponse>
 14    {
 15        /// <summary>
 16        /// Initializes a new instance of the <see cref="UnhandledExceptionBehaviour{TRequest, TResponse}"/> class.
 17        /// </summary>
 18        /// <param name="logger">Gets An instance of <see cref="ILogger{TRequest}"/>.</param>
 019        public UnhandledExceptionBehaviour(ILogger<TRequest> logger)
 020        {
 021            this.Logger = logger;
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="ILogger{TRequest}"/>.
 26        /// </summary>
 027        private ILogger<TRequest> Logger { get; }
 28
 29        /// <summary>
 30        /// An implementation of the handler for unhandled exception behaviour.
 31        /// </summary>
 32        /// <param name="request">The request object to handle.</param>
 33        /// <param name="next">The next request to validate.</param>
 34        /// <param name="cancellationToken">The cancellation token.</param>
 35        /// <returns>A <see cref="Task{TResponse}"/>.</returns>
 36        public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next, CancellationToken 
 037        {
 38            try
 039            {
 040                return await next();
 41            }
 042            catch (Exception ex)
 043            {
 044                var requestName = typeof(TRequest).Name;
 045                this.Logger.LogError(ex, "BlazorShop Request: Unhandled Exception for Request {Name} {@Request}", reques
 046                throw;
 47            }
 048        }
 49    }
 50}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommand.html deleted file mode 100644 index 97f9629f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommand.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.CartCommand.UpdateCartCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.CartCommand.UpdateCartCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\CartCommand\UpdateCartCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:42
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserId()100%10%
get_ClotheId()100%10%
get_Name()100%10%
get_Price()100%10%
get_Amount()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\CartCommand\UpdateCartCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateCartCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.CartCommand
 6{
 7    /// <summary>
 8    /// A model to update a cart.
 9    /// </summary>
 10    public class UpdateCartCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the cart.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the user.
 19        /// </summary>
 020        public int UserId { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The id of the clothe.
 24        /// </summary>
 025        public int ClotheId { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The name of the cart.
 29        /// </summary>
 030        public string? Name { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The price of the cart.
 34        /// </summary>
 035        public decimal Price { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The amount of the cart.
 39        /// </summary>
 040        public int Amount { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommandHandler.html deleted file mode 100644 index 05fdf7da..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommandHandler.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.CartHandler.UpdateCartCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.CartHandler.UpdateCartCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\CartHandler\UpdateCartCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:29
Coverable lines:29
Total lines:71
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\CartHandler\UpdateCartCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateCartCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.CartHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateCartCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateCartCommandHandler : IRequestHandler<UpdateCartCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateCartCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateCartCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateCartCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateCartCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateCartCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateCartCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateCartCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateCartCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Carts
 047                    .TagWith(nameof(UpdateCartCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id && x.User.Id == request.UserId);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The cart do not exists");
 52                }
 53
 054                entity.Name = request.Name;
 055                entity.Price = request.Price;
 056                entity.Amount = request.Amount;
 57
 058                this.DbContext.Carts.Update(entity);
 059                await this.DbContext.SaveChangesAsync(cancellationToken);
 060                response = RequestResponse.Success(entity.Id);
 061            }
 062            catch (Exception ex)
 063            {
 064                this.Logger.LogError(ex, ErrorsManager.UpdateCartCommand);
 065                response = RequestResponse.Failure($"{ErrorsManager.UpdateCartCommand}. {ex.Message}. {ex.InnerException
 066            }
 67
 068            return response;
 069        }
 70    }
 71}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommandValidator.html deleted file mode 100644 index 92ba0970..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCartCommandValidator.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.CartValidator.UpdateCartCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.CartValidator.UpdateCartCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\UpdateCartCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:25
Coverable lines:25
Total lines:60
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\CartValidator\UpdateCartCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateCartCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.CartValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateCartCommand}"/>.
 9    /// </summary>
 10    public class UpdateCartCommandValidator : AbstractValidator<UpdateCartCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateCartCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public UpdateCartCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(v => v.UserId)
 021                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 22
 023            this.RuleFor(v => v.Id)
 024                .GreaterThan(0).WithMessage("Id must be greater than 0");
 25
 026            this.RuleFor(v => v.ClotheId)
 027                .GreaterThan(0).WithMessage("ClotheId must be greater than 0");
 28
 029            this.RuleFor(v => v.Name)
 030                .MaximumLength(200).WithMessage("Name maximum length exceeded")
 031                .NotEmpty().WithMessage("Name must not be empty")
 032                .NotNull().WithMessage("Name must not be null")
 033                .MustAsync(this.HaveUniqueName).WithMessage("The specified name already exists.");
 34
 035            this.RuleFor(v => v.Price)
 036                .GreaterThan(0).WithMessage("Price must be greater than 0");
 37
 038            this.RuleFor(v => v.Amount)
 039                .GreaterThan(0).WithMessage("Amount must be greater than 0");
 040        }
 41
 42        /// <summary>
 43        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 44        /// </summary>
 045        private IApplicationDbContext Context { get; }
 46
 47        /// <summary>
 48        /// Gets a value indicating whether the cart has an unique name or not.
 49        /// </summary>
 50        /// <param name="name">The name of the cart.</param>
 51        /// <param name="cancellationToken">The cancellation token.</param>
 52        /// <returns>A boolean value.</returns>
 53        public async Task<bool> HaveUniqueName(string name, CancellationToken cancellationToken)
 054        {
 055            return await this.Context.Carts
 056                .TagWith(nameof(this.HaveUniqueName))
 057                .AllAsync(l => l.Name != name, cancellationToken);
 058        }
 59    }
 60}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommand.html deleted file mode 100644 index 673d8e61..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommand.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.ClotheCommand.UpdateClotheCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.ClotheCommand.UpdateClotheCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ClotheCommand\UpdateClotheCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:47
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%1100%
get_Name()100%1100%
get_Description()100%1100%
get_Price()100%1100%
get_Amount()100%1100%
get_ImageName()100%1100%
get_ImagePath()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ClotheCommand\UpdateClotheCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateClotheCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.ClotheCommand
 6{
 7    /// <summary>
 8    /// A model to update a clothe.
 9    /// </summary>
 10    public class UpdateClotheCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the clothe.
 14        /// </summary>
 415        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The name of the clothe.
 19        /// </summary>
 320        public string? Name { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The description of the clothe.
 24        /// </summary>
 325        public string? Description { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The price of the clothe.
 29        /// </summary>
 330        public decimal? Price { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The amount of the clothe.
 34        /// </summary>
 135        public int Amount { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The image name of the clothe.
 39        /// </summary>
 340        public string? ImageName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The image path of the clothe.
 44        /// </summary>
 345        public string? ImagePath { get; set; }
 46    }
 47}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommandHandler.html deleted file mode 100644 index 7a3aeb2c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommandHandler.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.ClotheHandler.UpdateClotheCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.ClotheHandler.UpdateClotheCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ClotheHandler\UpdateClotheCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
93%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:30
Uncovered lines:2
Coverable lines:32
Total lines:74
Line coverage:93.7%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:3
Total branches:6
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_DbContext()100%1100%
get_Logger()100%1100%
Handle()50%492%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ClotheHandler\UpdateClotheCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateClotheCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.ClotheHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateClotheCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateClotheCommandHandler : IRequestHandler<UpdateClotheCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateClotheCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateClotheCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public UpdateClotheCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateClotheCommandHandler> logger)
 219        {
 220            this.DbContext = dbContext;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 427        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateClotheCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<UpdateClotheCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateClotheCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateClotheCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                var entity = this.DbContext.Clothes
 247                    .TagWith(nameof(UpdateClotheCommandHandler))
 248                    .SingleOrDefault(d => d.Id == request.Id && d.IsActive == true);
 149                if (entity == null)
 050                {
 051                    throw new Exception("The clothe does not exists");
 52                }
 53
 154                entity.Name = request.Name;
 155                entity.Description = request.Description;
 156                entity.Price = request.Price;
 157                entity.Amount = request.Amount;
 158                entity.ImageName = request.ImageName;
 159                entity.ImagePath = request.ImagePath;
 60
 161                this.DbContext.Clothes.Update(entity);
 162                await this.DbContext.SaveChangesAsync(cancellationToken);
 163                response = RequestResponse.Success(entity.Id);
 164            }
 165            catch (Exception ex)
 166            {
 167                this.Logger.LogError(ex, ErrorsManager.UpdateClotheCommand);
 168                response = RequestResponse.Failure($"{ErrorsManager.UpdateClotheCommand}. {ex.Message}. {ex.InnerExcepti
 169            }
 70
 271            return response;
 272        }
 73    }
 74}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommandValidator.html deleted file mode 100644 index a97281d9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateClotheCommandValidator.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ClotheValidator.UpdateClotheCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ClotheValidator.UpdateClotheCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ClotheValidator\UpdateClotheCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:33
Coverable lines:33
Total lines:69
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ClotheValidator\UpdateClotheCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateClotheCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ClotheValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateClotheCommand}"/>.
 9    /// </summary>
 10    public class UpdateClotheCommandValidator : AbstractValidator<UpdateClotheCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateClotheCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public UpdateClotheCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(v => v.Id)
 021                .GreaterThan(0).WithMessage("Id must be greater than 0");
 22
 023            this.RuleFor(v => v.Name)
 024                .MaximumLength(200).WithMessage("Name maximum length exceeded")
 025                .NotEmpty().WithMessage("Name must not be empty")
 026                .NotNull().WithMessage("Name must not be null")
 027                .MustAsync(this.HaveUniqueName).WithMessage("The specified name already exists.");
 28
 029            this.RuleFor(v => v.Description)
 030                .MaximumLength(1000).WithMessage("Description maximum length exceeded")
 031                .NotEmpty().WithMessage("Description must not be empty")
 032                .NotNull().WithMessage("Description must not be null");
 33
 034            this.RuleFor(v => v.Price)
 035                .GreaterThan(0).WithMessage("Price must be greater than 0");
 36
 037            this.RuleFor(v => v.Amount)
 038                .GreaterThan(0).WithMessage("Amount must be greater than 0");
 39
 040            this.RuleFor(v => v.ImageName)
 041                .MaximumLength(200).WithMessage("ImageName maximum length exceeded")
 042                .NotEmpty().WithMessage("ImageName must not be empty")
 043                .NotNull().WithMessage("ImageName must not be null");
 44
 045            this.RuleFor(v => v.ImagePath)
 046                .MaximumLength(200).WithMessage("ImagePath maximum length exceeded")
 047                .NotEmpty().WithMessage("ImagePath must not be empty")
 048                .NotNull().WithMessage("ImagePath must not be null");
 049        }
 50
 51        /// <summary>
 52        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 53        /// </summary>
 054        private IApplicationDbContext Context { get; }
 55
 56        /// <summary>
 57        /// Gets a value indicating whether the clothe has an unique name or not.
 58        /// </summary>
 59        /// <param name="name">The name of the clothe.</param>
 60        /// <param name="cancellationToken">The cancellation token.</param>
 61        /// <returns>A boolean value.</returns>
 62        public async Task<bool> HaveUniqueName(string name, CancellationToken cancellationToken)
 063        {
 064            return await this.Context.Clothes
 065                .TagWith(nameof(this.HaveUniqueName))
 066                .AllAsync(l => l.Name != name, cancellationToken);
 067        }
 68    }
 69}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommand.html deleted file mode 100644 index 049c9299..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommand.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.SubscriberCommand.UpdateCreatedSubscriberCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.SubscriberCommand.UpdateCreatedSubscriberCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\UpdateCreatedSubscriberCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_CurrentPeriodEnd()100%10%
get_CurrentPeriodStart()100%10%
get_CustomerEmail()100%10%
get_StripeSubscriberSubscriptionId()100%10%
get_HostedInvoiceUrl()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\UpdateCreatedSubscriberCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateCreatedSubscriberCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.SubscriberCommand
 6{
 7    /// <summary>
 8    /// A model to update a created subscriber.
 9    /// </summary>
 10    public class UpdateCreatedSubscriberCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The date when the current period ends.
 14        /// </summary>
 015        public DateTime CurrentPeriodEnd { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The date when the current period starts.
 19        /// </summary>
 020        public DateTime CurrentPeriodStart { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The email of the customer.
 24        /// </summary>
 025        public string CustomerEmail { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The id of the stripe subscriber subscription.
 29        /// </summary>
 030        public string StripeSubscriberSubscriptionId { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The url of the invoice.
 34        /// </summary>
 035        public string HostedInvoiceUrl { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommandHandler.html deleted file mode 100644 index 1bd9319b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommandHandler.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateCreatedSubscriberCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateCreatedSubscriberCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\UpdateCreatedSubscriberCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:37
Coverable lines:37
Total lines:86
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
get_UserService()100%10%
Handle()0%60%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\UpdateCreatedSubscriberCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateCreatedSubscriberCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.SubscriberHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateCreatedSubscriberCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateCreatedSubscriberCommandHandler : IRequestHandler<UpdateCreatedSubscriberCommand, RequestResponse
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateCreatedSubscriberCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateCreatedSubscriberCommandHandler}"/>.</para
 17        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 18        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 019        public UpdateCreatedSubscriberCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateCreatedSubscriberCom
 020        {
 021            this.DbContext = dbContext;
 022            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 023            this.UserService = userService;
 024        }
 25
 26        /// <summary>
 27        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 28        /// </summary>
 029        private IApplicationDbContext DbContext { get; }
 30
 31        /// <summary>
 32        /// Gets An instance of <see cref="ILogger{UpdateCreatedSubscriberCommandHandler}"/>.
 33        /// </summary>
 034        private ILogger<UpdateCreatedSubscriberCommandHandler> Logger { get; }
 35
 36        /// <summary>
 37        /// Gets An instance of <see cref="IUserService"/>.
 38        /// </summary>
 039        private IUserService UserService { get; }
 40
 41        /// <summary>
 42        /// An implementation of the handler for <see cref="UpdateCreatedSubscriberCommand"/>.
 43        /// </summary>
 44        /// <param name="request">The request object to handle.</param>
 45        /// <param name="cancellationToken">The cancellation token.</param>
 46        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 47        public async Task<RequestResponse> Handle(UpdateCreatedSubscriberCommand request, CancellationToken cancellation
 048        {
 49            RequestResponse? response;
 50
 51            try
 052            {
 053                var user = await this.UserService.FindUserByEmailAsync(request.CustomerEmail);
 054                if (user == null)
 055                {
 056                    throw new Exception("The user does not exists");
 57                }
 58
 059                var entity = this.DbContext.Subscribers
 060                    .TagWith(nameof(UpdateCreatedSubscriberCommandHandler))
 061                    .FirstOrDefault(x => x.Customer.Id == user.Id && x.StripeSubscriberSubscriptionId.Equals(string.Empt
 062                if (entity == null)
 063                {
 064                    throw new Exception("The subscriber does not exists");
 65                }
 66
 067                entity.StripeSubscriberSubscriptionId = request.StripeSubscriberSubscriptionId;
 068                entity.HostedInvoiceUrl = request.HostedInvoiceUrl;
 069                entity.CurrentPeriodStart = request.CurrentPeriodStart;
 070                entity.CurrentPeriodEnd = request.CurrentPeriodEnd;
 071                entity.Status = SubscriptionStatus.Active;
 72
 073                this.DbContext.Subscribers.Update(entity);
 074                await this.DbContext.SaveChangesAsync(cancellationToken);
 075                response = RequestResponse.Success(entity.Id);
 076            }
 077            catch (Exception ex)
 078            {
 079                this.Logger.LogError(ex, ErrorsManager.UpdateCreatedSubscriberCommand);
 080                response = RequestResponse.Failure($"{ErrorsManager.UpdateCreatedSubscriberCommand}. {ex.Message}. {ex.I
 081            }
 82
 083            return response;
 084        }
 85    }
 86}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommandValidator.html deleted file mode 100644 index 1253910c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateCreatedSubscriberCommandValidator.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriberValidator.UpdateCreatedSubscriberCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriberValidator.UpdateCreatedSubscriberCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\UpdateCreatedSubscriberCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:22
Coverable lines:22
Total lines:42
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\UpdateCreatedSubscriberCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateCreatedSubscriberCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriberValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateCreatedSubscriberCommand}"/>.
 9    /// </summary>
 10    public class UpdateCreatedSubscriberCommandValidator : AbstractValidator<UpdateCreatedSubscriberCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateCreatedSubscriberCommandValidator"/> class.
 14        /// </summary>
 015        public UpdateCreatedSubscriberCommandValidator()
 016        {
 017            this.RuleFor(x => x.CurrentPeriodStart)
 018                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("CurrentPeriodStart must be greater or equal
 019                .NotEmpty().WithMessage("CurrentPeriodStart must not be empty")
 020                .NotNull().WithMessage("CurrentPeriodStart must not be null");
 21
 022            this.RuleFor(x => x.CurrentPeriodEnd)
 023                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("CurrentPeriodEnd must be greater or equal t
 024                .NotEmpty().WithMessage("CurrentPeriodEnd must not be empty")
 025                .NotNull().WithMessage("CurrentPeriodEnd must not be null");
 26
 027            this.RuleFor(x => x.CustomerEmail)
 028                .NotEmpty().WithMessage("CustomerEmail must not be empty")
 029                .NotNull().WithMessage("CustomerEmail must not be null");
 30
 031            this.RuleFor(x => x.StripeSubscriberSubscriptionId)
 032                .MaximumLength(500).WithMessage("StripeSubscriberSubscriptionId maximum length exceeded")
 033                .NotEmpty().WithMessage("StripeSubscriberSubscriptionId must not be empty")
 034                .NotNull().WithMessage("StripeSubscriberSubscriptionId must not be null");
 35
 036            this.RuleFor(x => x.HostedInvoiceUrl)
 037                .MaximumLength(700).WithMessage("HostedInvoiceUrl maximum length exceeded")
 038                .NotEmpty().WithMessage("HostedInvoiceUrl must not be empty")
 039                .NotNull().WithMessage("HostedInvoiceUrl must not be null");
 040        }
 41    }
 42}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommand.html deleted file mode 100644 index 4c69407e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommand.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.InvoiceCommand.UpdateInvoiceCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.InvoiceCommand.UpdateInvoiceCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\InvoiceCommand\UpdateInvoiceCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:42
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserEmail()100%10%
get_Name()100%10%
get_AmountSubTotal()100%10%
get_AmountTotal()100%10%
get_Quantity()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\InvoiceCommand\UpdateInvoiceCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateInvoiceCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.InvoiceCommand
 6{
 7    /// <summary>
 8    /// A model to update an invoice.
 9    /// </summary>
 10    public class UpdateInvoiceCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the invoice.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 020        public string UserEmail { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The name of the invoice.
 24        /// </summary>
 025        public string Name { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The sub total amount of the invoice.
 29        /// </summary>
 030        public int AmountSubTotal { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The total amount of the invoice.
 34        /// </summary>
 035        public int AmountTotal { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The quantity of the invoice.
 39        /// </summary>
 040        public int Quantity { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommandHandler.html deleted file mode 100644 index 09a47431..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommandHandler.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.InvoiceHandler.UpdateInvoiceCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.InvoiceHandler.UpdateInvoiceCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\InvoiceHandler\UpdateInvoiceCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:31
Coverable lines:31
Total lines:73
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\InvoiceHandler\UpdateInvoiceCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateInvoiceCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.InvoiceHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateInvoiceCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateInvoiceCommandHandler : IRequestHandler<UpdateInvoiceCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateInvoiceCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateInvoiceCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateInvoiceCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateInvoiceCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateInvoiceCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateInvoiceCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateInvoiceCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateInvoiceCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Invoices
 047                    .TagWith(nameof(UpdateInvoiceCommandHandler))
 048                    .SingleOrDefault(d => d.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The invoice does not exists");
 52                }
 53
 054                entity.UserEmail = request.UserEmail;
 055                entity.Name = request.Name;
 056                entity.AmountSubTotal = request.AmountSubTotal;
 057                entity.AmountTotal = request.AmountTotal;
 058                entity.Quantity = request.Quantity;
 59
 060                this.DbContext.Invoices.Update(entity);
 061                await this.DbContext.SaveChangesAsync(cancellationToken);
 062                response = RequestResponse.Success(entity.Id);
 063            }
 064            catch (Exception ex)
 065            {
 066                this.Logger.LogError(ex, ErrorsManager.UpdateInvoiceCommand);
 067                response = RequestResponse.Failure($"{ErrorsManager.UpdateInvoiceCommand}. {ex.Message}. {ex.InnerExcept
 068            }
 69
 070            return response;
 071        }
 72    }
 73}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommandValidator.html deleted file mode 100644 index 2403767f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateInvoiceCommandValidator.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.InvoiceValidator.UpdateInvoiceCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.InvoiceValidator.UpdateInvoiceCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\InvoiceValidator\UpdateInvoiceCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:62
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\InvoiceValidator\UpdateInvoiceCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateInvoiceCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.InvoiceValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateInvoiceCommand}"/>.
 9    /// </summary>
 10    public class UpdateInvoiceCommandValidator : AbstractValidator<UpdateInvoiceCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateInvoiceCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public UpdateInvoiceCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(v => v.Id)
 021                .GreaterThan(0).WithMessage("Id must be greater than 0");
 22
 023            this.RuleFor(v => v.UserEmail)
 024                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 025                .NotEmpty().WithMessage("UserEmail must not be empty")
 026                .NotNull().WithMessage("UserEmail must not be null");
 27
 028            this.RuleFor(v => v.Name)
 029                .MaximumLength(200).WithMessage("Name maximum length exceeded")
 030                .NotEmpty().WithMessage("Name must not be empty")
 031                .NotNull().WithMessage("Name must not be null")
 032                .MustAsync(this.HaveUniqueName).WithMessage("The specified name already exists.");
 33
 034            this.RuleFor(v => v.AmountSubTotal)
 035                .GreaterThan(0).WithMessage("AmountSubTotal must be greater than 0");
 36
 037            this.RuleFor(v => v.AmountTotal)
 038                .GreaterThan(0).WithMessage("AmountTotal must be greater than 0");
 39
 040            this.RuleFor(v => v.Quantity)
 041                .GreaterThan(0).WithMessage("Quantity must be greater than 0");
 042        }
 43
 44        /// <summary>
 45        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 46        /// </summary>
 047        private IApplicationDbContext Context { get; }
 48
 49        /// <summary>
 50        /// Gets a value indicating whether the invoice has an unique name or not.
 51        /// </summary>
 52        /// <param name="name">The name of the invoice.</param>
 53        /// <param name="cancellationToken">The cancellation token.</param>
 54        /// <returns>A boolean value.</returns>
 55        public async Task<bool> HaveUniqueName(string name, CancellationToken cancellationToken)
 056        {
 057            return await this.Context.Invoices
 058                .TagWith(nameof(this.HaveUniqueName))
 059                .AllAsync(l => l.Name != name, cancellationToken);
 060        }
 61    }
 62}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommand.html deleted file mode 100644 index b3ebf5a9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommand.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.MusicCommand.UpdateMusicCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.MusicCommand.UpdateMusicCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\MusicCommand\UpdateMusicCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:52
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Title()100%10%
get_Description()100%10%
get_Author()100%10%
get_DateRelease()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
get_AccessLevel()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\MusicCommand\UpdateMusicCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateMusicCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.MusicCommand
 6{
 7    /// <summary>
 8    /// A model to update a music.
 9    /// </summary>
 10    public class UpdateMusicCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the music.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The title of the music.
 19        /// </summary>
 020        public string Title { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The description of the music.
 24        /// </summary>
 025        public string Description { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The author of the music.
 29        /// </summary>
 030        public string Author { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The release date of the music.
 34        /// </summary>
 035        public DateTime DateRelease { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The image name of the music.
 39        /// </summary>
 040        public string ImageName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The image path of the music.
 44        /// </summary>
 045        public string ImagePath { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets The access level of the music.
 49        /// </summary>
 050        public int AccessLevel { get; set; }
 51    }
 52}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommandHandler.html deleted file mode 100644 index cef71dc8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommandHandler.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.MusicHandler.UpdateMusicCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.MusicHandler.UpdateMusicCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\MusicHandler\UpdateMusicCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:33
Coverable lines:33
Total lines:75
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\MusicHandler\UpdateMusicCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateMusicCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.MusicHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateMusicCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateMusicCommandHandler : IRequestHandler<UpdateMusicCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateMusicCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateMusicCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateMusicCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateMusicCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateMusicCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateMusicCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateMusicCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateMusicCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Musics
 047                    .TagWith(nameof(UpdateMusicCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The music does not exists");
 52                }
 53
 054                entity.Title = request.Title;
 055                entity.Description = request.Description;
 056                entity.Author = request.Author;
 057                entity.DateRelease = request.DateRelease;
 058                entity.ImageName = request.ImageName;
 059                entity.ImagePath = request.ImagePath;
 060                entity.AccessLevel = request.AccessLevel;
 61
 062                this.DbContext.Musics.Update(entity);
 063                await this.DbContext.SaveChangesAsync(cancellationToken);
 064                response = RequestResponse.Success(entity.Id);
 065            }
 066            catch (Exception ex)
 067            {
 068                this.Logger.LogError(ex, ErrorsManager.UpdateMusicCommand);
 069                response = RequestResponse.Failure($"{ErrorsManager.UpdateMusicCommand}. {ex.Message}. {ex.InnerExceptio
 070            }
 71
 072            return response;
 073        }
 74    }
 75}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommandValidator.html deleted file mode 100644 index 79342463..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateMusicCommandValidator.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.MusicValidator.UpdateMusicCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.MusicValidator.UpdateMusicCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\MusicValidator\UpdateMusicCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:39
Coverable lines:39
Total lines:76
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueTitle()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\MusicValidator\UpdateMusicCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateMusicCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.MusicValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateMusicCommand}"/>.
 9    /// </summary>
 10    public class UpdateMusicCommandValidator : AbstractValidator<UpdateMusicCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateMusicCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public UpdateMusicCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(x => x.Id)
 021                .GreaterThan(0).WithMessage("Id must be greater than 0");
 22
 023            this.RuleFor(x => x.Title)
 024                .MaximumLength(200).WithMessage("Title maximum length exceeded")
 025                .NotEmpty().WithMessage("Title must not be empty")
 026                .NotNull().WithMessage("Title must not be null")
 027                .MustAsync(this.HaveUniqueTitle).WithMessage("The specified title already exists.");
 28
 029            this.RuleFor(x => x.Description)
 030                .MaximumLength(1000).WithMessage("Description maximum length exceeded")
 031                .NotEmpty().WithMessage("Description must not be empty")
 032                .NotNull().WithMessage("Description must not be null");
 33
 034            this.RuleFor(x => x.Author)
 035                .MaximumLength(200).WithMessage("Author maximum length exceeded")
 036                .NotEmpty().WithMessage("Author must not be empty")
 037                .NotNull().WithMessage("Author must not be null");
 38
 039            this.RuleFor(x => x.DateRelease)
 040                .GreaterThan(new DateTime(1950, 1, 1)).WithMessage("DateRelease must be greater than 1 January 1950")
 041                .NotEmpty().WithMessage("DateRelease must not be empty")
 042                .NotNull().WithMessage("DateRelease must not be null");
 43
 044            this.RuleFor(x => x.ImageName)
 045                .MaximumLength(200).WithMessage("ImageName maximum length exceeded")
 046                .NotEmpty().WithMessage("ImageName must not be empty")
 047                .NotNull().WithMessage("ImageName must not be null");
 48
 049            this.RuleFor(x => x.ImagePath)
 050                .MaximumLength(200).WithMessage("ImagePath maximum length exceeded")
 051                .NotEmpty().WithMessage("ImagePath must not be empty")
 052                .NotNull().WithMessage("ImagePath must not be null");
 53
 054            this.RuleFor(x => x.AccessLevel)
 055                .GreaterThan(0).WithMessage("AccessLevel must be greater than 0");
 056        }
 57
 58        /// <summary>
 59        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 60        /// </summary>
 061        private IApplicationDbContext Context { get; }
 62
 63        /// <summary>
 64        /// Gets a value indicating whether the music has an unique title or not.
 65        /// </summary>
 66        /// <param name="title">The title of the music.</param>
 67        /// <param name="cancellationToken">The cancellation token.</param>
 68        /// <returns>A boolean value.</returns>
 69        public async Task<bool> HaveUniqueTitle(string title, CancellationToken cancellationToken)
 070        {
 071            return await this.Context.Musics
 072                .TagWith(nameof(this.HaveUniqueTitle))
 073                .AllAsync(l => l.Title != title, cancellationToken);
 074        }
 75    }
 76}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommand.html deleted file mode 100644 index 81c48b24..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommand.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.OrderCommand.UpdateOrderCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.OrderCommand.UpdateOrderCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\OrderCommand\UpdateOrderCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserEmail()100%10%
get_OrderDate()100%10%
get_LineItems()100%10%
get_AmountTotal()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\OrderCommand\UpdateOrderCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateOrderCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.OrderCommand
 6{
 7    /// <summary>
 8    /// A model to update an order.
 9    /// </summary>
 10    public class UpdateOrderCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the order.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 020        public string UserEmail { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The date when the order was placed.
 24        /// </summary>
 025        public DateTime OrderDate { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The items placed in the current order.
 29        /// </summary>
 030        public string LineItems { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The total amount of the items from the order.
 34        /// </summary>
 035        public int AmountTotal { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommandHandler.html deleted file mode 100644 index c327bd94..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommandHandler.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.OrderHandler.UpdateOrderCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.OrderHandler.UpdateOrderCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\OrderHandler\UpdateOrderCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:30
Coverable lines:30
Total lines:72
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\OrderHandler\UpdateOrderCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateOrderCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.OrderHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateOrderCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateOrderCommandHandler : IRequestHandler<UpdateOrderCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateOrderCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateOrderCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateOrderCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateOrderCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateOrderCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateOrderCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateOrderCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateOrderCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Orders
 047                    .TagWith(nameof(UpdateOrderCommandHandler))
 048                    .SingleOrDefault(d => d.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The order does not exists");
 52                }
 53
 054                entity.UserEmail = request.UserEmail;
 055                entity.OrderDate = request.OrderDate;
 056                entity.LineItems = request.LineItems;
 057                entity.AmountTotal = request.AmountTotal;
 58
 059                this.DbContext.Orders.Update(entity);
 060                await this.DbContext.SaveChangesAsync(cancellationToken);
 061                response = RequestResponse.Success(entity.Id);
 062            }
 063            catch (Exception ex)
 064            {
 065                this.Logger.LogError(ex, ErrorsManager.UpdateOrderCommand);
 066                response = RequestResponse.Failure($"{ErrorsManager.UpdateOrderCommand}. {ex.Message}. {ex.InnerExceptio
 067            }
 68
 069            return response;
 070        }
 71    }
 72}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommandValidator.html deleted file mode 100644 index cdc87126..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateOrderCommandValidator.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.OrderValidator.UpdateOrderCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.OrderValidator.UpdateOrderCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\UpdateOrderCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:19
Coverable lines:19
Total lines:39
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\OrderValidator\UpdateOrderCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateOrderCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.OrderValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateOrderCommand}"/>.
 9    /// </summary>
 10    public class UpdateOrderCommandValidator : AbstractValidator<UpdateOrderCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateOrderCommandValidator"/> class.
 14        /// </summary>
 015        public UpdateOrderCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(v => v.UserEmail)
 021                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 022                .NotEmpty().WithMessage("UserEmail must not be empty")
 023                .NotNull().WithMessage("UserEmail must not be null");
 24
 025            this.RuleFor(v => v.OrderDate)
 026                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("OrderDate must be greater or equal with Cur
 027                .NotEmpty().WithMessage("OrderDate must not be empty")
 028                .NotNull().WithMessage("OrderDate must not be null");
 29
 030            this.RuleFor(v => v.LineItems)
 031                .MaximumLength(10000).WithMessage("LineItems maximum length exceeded")
 032                .NotEmpty().WithMessage("LineItems must not be empty")
 033                .NotNull().WithMessage("LineItems must not be null");
 34
 035            this.RuleFor(v => v.AmountTotal)
 036                .GreaterThan(0).WithMessage("AmountTotal must be greater than 0");
 037        }
 38    }
 39}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommand.html deleted file mode 100644 index 195833f1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommand.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.ReceiptCommand.UpdateReceiptCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.ReceiptCommand.UpdateReceiptCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ReceiptCommand\UpdateReceiptCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_UserEmail()100%10%
get_ReceiptDate()100%10%
get_ReceiptName()100%10%
get_ReceiptUrl()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\ReceiptCommand\UpdateReceiptCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateReceiptCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.ReceiptCommand
 6{
 7    /// <summary>
 8    /// A model to update a receipt.
 9    /// </summary>
 10    public class UpdateReceiptCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the receipt.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 020        public string UserEmail { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The date when the receipt was generated.
 24        /// </summary>
 025        public DateTime ReceiptDate { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The name of the receipt.
 29        /// </summary>
 030        public string ReceiptName { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The url of the receipt.
 34        /// </summary>
 035        public string ReceiptUrl { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommandHandler.html deleted file mode 100644 index 0d60b103..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommandHandler.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.ReceiptHandler.UpdateReceiptCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.ReceiptHandler.UpdateReceiptCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ReceiptHandler\UpdateReceiptCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:29
Coverable lines:29
Total lines:71
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\ReceiptHandler\UpdateReceiptCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateReceiptCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.ReceiptHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateReceiptCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateReceiptCommandHandler : IRequestHandler<UpdateReceiptCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateReceiptCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateReceiptCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateReceiptCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateReceiptCommandHandler> logger)
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateReceiptCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateReceiptCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateReceiptCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateReceiptCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Receipts
 047                    .TagWith(nameof(UpdateReceiptCommandHandler))
 048                    .SingleOrDefault(d => d.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The receipt does not exists");
 52                }
 53
 054                entity.ReceiptDate = request.ReceiptDate;
 055                entity.ReceiptName = request.ReceiptName;
 056                entity.ReceiptUrl = request.ReceiptUrl;
 57
 058                this.DbContext.Receipts.Update(entity);
 059                await this.DbContext.SaveChangesAsync(cancellationToken);
 060                response = RequestResponse.Success(entity.Id);
 061            }
 062            catch (Exception ex)
 063            {
 064                this.Logger.LogError(ex, ErrorsManager.UpdateReceiptCommand);
 065                response = RequestResponse.Failure($"{ErrorsManager.UpdateReceiptCommand}. {ex.Message}. {ex.InnerExcept
 066            }
 67
 068            return response;
 069        }
 70    }
 71}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommandValidator.html deleted file mode 100644 index 36ccc86b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateReceiptCommandValidator.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.ReceiptValidator.UpdateReceiptCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.ReceiptValidator.UpdateReceiptCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\UpdateReceiptCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:41
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\ReceiptValidator\UpdateReceiptCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateReceiptCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.ReceiptValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateReceiptCommand}"/>.
 9    /// </summary>
 10    public class UpdateReceiptCommandValidator : AbstractValidator<UpdateReceiptCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateReceiptCommandValidator"/> class.
 14        /// </summary>
 015        public UpdateReceiptCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(v => v.UserEmail)
 021                .MaximumLength(100).WithMessage("UserEmail maximum length exceeded")
 022                .NotEmpty().WithMessage("UserEmail must not be empty")
 023                .NotNull().WithMessage("UserEmail must not be null");
 24
 025            this.RuleFor(v => v.ReceiptDate)
 026                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("ReceiptDate must be greater or equal than C
 027                .NotEmpty().WithMessage("ReceiptDate must not be empty")
 028                .NotNull().WithMessage("ReceiptDate must not be null");
 29
 030            this.RuleFor(v => v.ReceiptName)
 031                .MaximumLength(200).WithMessage("ReceiptName maximum length exceeded")
 032                .NotEmpty().WithMessage("ReceiptName must not be empty")
 033                .NotNull().WithMessage("ReceiptName must not be null");
 34
 035            this.RuleFor(v => v.ReceiptUrl)
 036                .MaximumLength(500).WithMessage("ReceiptUrl maximum length exceeded")
 037                .NotEmpty().WithMessage("ReceiptUrl must not be empty")
 038                .NotNull().WithMessage("ReceiptUrl must not be null");
 039        }
 40    }
 41}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommand.html deleted file mode 100644 index b902d350..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommand.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.RoleCommand.UpdateRoleCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.RoleCommand.UpdateRoleCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\RoleCommand\UpdateRoleCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Name()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\RoleCommand\UpdateRoleCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateRoleCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.RoleCommand
 6{
 7    /// <summary>
 8    /// A model to update a role.
 9    /// </summary>
 10    public class UpdateRoleCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the role.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The name of the role.
 19        /// </summary>
 020        public string? Name { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Id()
-get_Name()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommandHandler.html deleted file mode 100644 index 8cf7256b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommandHandler.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.RoleHandler.UpdateRoleCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.RoleHandler.UpdateRoleCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\RoleHandler\UpdateRoleCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:18
Coverable lines:18
Total lines:57
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_RoleService()100%10%
get_Logger()100%10%
Handle()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\RoleHandler\UpdateRoleCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateRoleCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.RoleHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateRoleCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateRoleCommandHandler : IRequestHandler<UpdateRoleCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateRoleCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="roleService">Gets An instance of <see cref="IRoleService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateRoleCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateRoleCommandHandler(IRoleService roleService, ILogger<UpdateRoleCommandHandler> logger)
 019        {
 020            this.RoleService = roleService;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IRoleService"/>.
 26        /// </summary>
 027        private IRoleService RoleService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateRoleCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateRoleCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateRoleCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateRoleCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                response = await this.RoleService.UpdateRoleAsync(request);
 047            }
 048            catch (Exception ex)
 049            {
 050                this.Logger.LogError(ex, ErrorsManager.UpdateRoleCommand);
 051                response = RequestResponse.Failure($"{ErrorsManager.UpdateRoleCommand}. {ex.Message}. {ex.InnerException
 052            }
 53
 054            return response;
 055        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommandValidator.html deleted file mode 100644 index 8bc09039..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateRoleCommandValidator.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.RoleValidator.UpdateRoleCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.RoleValidator.UpdateRoleCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\UpdateRoleCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:26
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\RoleValidator\UpdateRoleCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateRoleCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.RoleValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateRoleCommand}"/>.
 9    /// </summary>
 10    public class UpdateRoleCommandValidator : AbstractValidator<UpdateRoleCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateRoleCommandValidator"/> class.
 14        /// </summary>
 015        public UpdateRoleCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(v => v.Name)
 021                .MaximumLength(100).WithMessage("Name maximum length exceeded")
 022                .NotEmpty().WithMessage("Name must not be empty")
 023                .NotNull().WithMessage("Name must not be null");
 024        }
 25    }
 26}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommand.html deleted file mode 100644 index 7f218720..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommand.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\UpdateSubscriberCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:47
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_DateStart()100%10%
get_CurrentPeriodEnd()100%10%
get_CustomerId()100%10%
get_SubscriptionId()100%10%
get_StripeSubscriptionId()100%10%
get_StripeSubscriberSubscriptionId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\UpdateSubscriberCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriberCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.SubscriberCommand
 6{
 7    /// <summary>
 8    /// A model to update a subscriber.
 9    /// </summary>
 10    public class UpdateSubscriberCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the subscriber.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The started date of the subscriber.
 19        /// </summary>
 020        public DateTime DateStart { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The date when the current period ends.
 24        /// </summary>
 025        public DateTime CurrentPeriodEnd { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The customer id.
 29        /// </summary>
 030        public int CustomerId { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The subscription id.
 34        /// </summary>
 035        public int SubscriptionId { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The id of the stripe subscription.
 39        /// </summary>
 040        public string StripeSubscriptionId { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The id of the stripe subscriber subscription.
 44        /// </summary>
 045        public string StripeSubscriberSubscriptionId { get; set; }
 46    }
 47}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommandHandler.html deleted file mode 100644 index 7c1b7a59..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommandHandler.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\UpdateSubscriberCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:35
Coverable lines:35
Total lines:79
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%60%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\UpdateSubscriberCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriberCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.SubscriberHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateSubscriberCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateSubscriberCommandHandler : IRequestHandler<UpdateSubscriberCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateSubscriberCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateSubscriberCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateSubscriberCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateSubscriberCommandHandler> l
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateSubscriberCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateSubscriberCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateSubscriberCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateSubscriberCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Subscribers
 047                    .TagWith(nameof(UpdateSubscriberCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The subscriber does not exists");
 52                }
 53
 054                var subscription = this.DbContext.Subscriptions
 055                    .TagWith(nameof(UpdateSubscriberCommandHandler))
 056                    .FirstOrDefault(x => x.Id == request.SubscriptionId);
 057                if (subscription == null)
 058                {
 059                    throw new Exception("The subscription does not exists");
 60                }
 61
 062                entity.CurrentPeriodEnd = request.CurrentPeriodEnd;
 063                entity.CurrentPeriodStart = DateTime.Now;
 064                entity.Subscription = subscription;
 65
 066                this.DbContext.Subscribers.Update(entity);
 067                await this.DbContext.SaveChangesAsync(cancellationToken);
 068                response = RequestResponse.Success(entity.Id);
 069            }
 070            catch (Exception ex)
 071            {
 072                this.Logger.LogError(ex, ErrorsManager.UpdateSubscriberCommand);
 073                response = RequestResponse.Failure($"{ErrorsManager.UpdateSubscriberCommand}. {ex.Message}. {ex.InnerExc
 074            }
 75
 076            return response;
 077        }
 78    }
 79}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommandValidator.html deleted file mode 100644 index f6ac86e8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberCommandValidator.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\UpdateSubscriberCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:24
Coverable lines:24
Total lines:46
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\UpdateSubscriberCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriberCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriberValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateSubscriberCommand}"/>.
 9    /// </summary>
 10    public class UpdateSubscriberCommandValidator : AbstractValidator<UpdateSubscriberCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateSubscriberCommandValidator"/> class.
 14        /// </summary>
 015        public UpdateSubscriberCommandValidator()
 016        {
 017            this.RuleFor(x => x.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(x => x.DateStart)
 021                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("DateStart must be greater or equal than Cur
 022                .NotEmpty().WithMessage("DateStart must not be empty")
 023                .NotNull().WithMessage("DateStart must not be null");
 24
 025            this.RuleFor(x => x.CurrentPeriodEnd)
 026                .GreaterThanOrEqualTo(DateTime.Now.AddDays(-1)).WithMessage("CurrentPeriodEnd must be greater or equal t
 027                .NotEmpty().WithMessage("CurrentPeriodEnd must not be empty")
 028                .NotNull().WithMessage("CurrentPeriodEnd must not be null");
 29
 030            this.RuleFor(x => x.CustomerId)
 031                .GreaterThan(0).WithMessage("CustomerId must be greater than 0");
 32
 033            this.RuleFor(x => x.SubscriptionId)
 034                .GreaterThan(0).WithMessage("SubscriptionId must be greater than 0");
 35
 036            this.RuleFor(x => x.StripeSubscriptionId)
 037                .NotEmpty().WithMessage("StripeSubscriptionId must not be empty")
 038                .NotNull().WithMessage("StripeSubscriptionId must not be null");
 39
 040            this.RuleFor(x => x.StripeSubscriberSubscriptionId)
 041                .MaximumLength(500).WithMessage("StripeSubscriberSubscriptionId maximum length exceeded")
 042                .NotEmpty().WithMessage("StripeSubscriberSubscriptionId must not be empty")
 043                .NotNull().WithMessage("StripeSubscriberSubscriptionId must not be null");
 044        }
 45    }
 46}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommand.html deleted file mode 100644 index 6ec804af..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommand.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberStatusCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberStatusCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\UpdateSubscriberStatusCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_StripeSubscriberSubscriptionId()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriberCommand\UpdateSubscriberStatusCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriberStatusCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.SubscriberCommand
 6{
 7    /// <summary>
 8    /// A model to update a subscriber status.
 9    /// </summary>
 10    public class UpdateSubscriberStatusCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the stripe subscriber subscription.
 14        /// </summary>
 015        public string StripeSubscriberSubscriptionId { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_StripeSubscriberSubscriptionId()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommandHandler.html deleted file mode 100644 index 48f57a56..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommandHandler.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberStatusCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberStatusCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\UpdateSubscriberStatusCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:69
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriberHandler\UpdateSubscriberStatusCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriberStatusCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.SubscriberHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateSubscriberStatusCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateSubscriberStatusCommandHandler : IRequestHandler<UpdateSubscriberStatusCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateSubscriberStatusCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateSubscriberStatusCommandHandler}"/>.</param
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateSubscriberStatusCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateSubscriberStatusComma
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateSubscriberStatusCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateSubscriberStatusCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateSubscriberStatusCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateSubscriberStatusCommand request, CancellationToken cancellationT
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Subscribers
 047                    .TagWith(nameof(UpdateSubscriberStatusCommandHandler))
 048                    .FirstOrDefault(x => x.StripeSubscriberSubscriptionId == request.StripeSubscriberSubscriptionId);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The subscriber does not exists");
 52                }
 53
 054                entity.Status = SubscriptionStatus.Inactive;
 55
 056                this.DbContext.Subscribers.Update(entity);
 057                await this.DbContext.SaveChangesAsync(cancellationToken);
 058                response = RequestResponse.Success(entity.Id);
 059            }
 060            catch (Exception ex)
 061            {
 062                this.Logger.LogError(ex, ErrorsManager.UpdateSubscriberStatusCommand);
 063                response = RequestResponse.Failure($"{ErrorsManager.UpdateSubscriberStatusCommand}. {ex.Message}. {ex.In
 064            }
 65
 066            return response;
 067        }
 68    }
 69}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommandValidator.html deleted file mode 100644 index e2494d46..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriberStatusCommandValidator.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberStatusCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberStatusCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\UpdateSubscriberStatusCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:23
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriberValidator\UpdateSubscriberStatusCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriberStatusCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriberValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateSubscriberStatusCommand}"/>.
 9    /// </summary>
 10    public class UpdateSubscriberStatusCommandValidator : AbstractValidator<UpdateSubscriberStatusCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateSubscriberStatusCommandValidator"/> class.
 14        /// </summary>
 015        public UpdateSubscriberStatusCommandValidator()
 016        {
 017            this.RuleFor(x => x.StripeSubscriberSubscriptionId)
 018                .MaximumLength(500).WithMessage("StripeSubscriberSubscriptionId maximum length exceeded")
 019                .NotEmpty().WithMessage("StripeSubscriberSubscriptionId must not be empty")
 020                .NotNull().WithMessage("StripeSubscriberSubscriptionId must not be null");
 021        }
 22    }
 23}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommand.html deleted file mode 100644 index ce85fc2d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommand.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.SubscriptionCommand.UpdateSubscriptionCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.SubscriptionCommand.UpdateSubscriptionCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriptionCommand\UpdateSubscriptionCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:47
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_StripeSubscriptionId()100%10%
get_Name()100%10%
get_Price()100%10%
get_Options()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\SubscriptionCommand\UpdateSubscriptionCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriptionCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.SubscriptionCommand
 6{
 7    /// <summary>
 8    /// A model to update a subscription.
 9    /// </summary>
 10    public class UpdateSubscriptionCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the subscription.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The id of the stripe subscription.
 19        /// </summary>
 020        public string StripeSubscriptionId { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The name of the subscription.
 24        /// </summary>
 025        public string Name { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The price of the subscription.
 29        /// </summary>
 030        public int Price { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The options of the subscription.
 34        /// </summary>
 035        public string Options { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The image name of the subscription.
 39        /// </summary>
 040        public string ImageName { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The image path of the subscription.
 44        /// </summary>
 045        public string ImagePath { get; set; }
 46    }
 47}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommandHandler.html deleted file mode 100644 index 6e75bdd7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommandHandler.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.SubscriptionHandler.UpdateSubscriptionCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.SubscriptionHandler.UpdateSubscriptionCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriptionHandler\UpdateSubscriptionCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:32
Coverable lines:32
Total lines:74
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\SubscriptionHandler\UpdateSubscriptionCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriptionCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.SubscriptionHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateSubscriptionCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateSubscriptionCommandHandler : IRequestHandler<UpdateSubscriptionCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateSubscriptionCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateSubscriptionCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateSubscriptionCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateSubscriptionCommandHandle
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateSubscriptionCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateSubscriptionCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateSubscriptionCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateSubscriptionCommand request, CancellationToken cancellationToken
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.Subscriptions
 047                    .TagWith(nameof(UpdateSubscriptionCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The subscription does not exists");
 52                }
 53
 054                entity.StripeSubscriptionId = request.StripeSubscriptionId;
 055                entity.Name = request.Name;
 056                entity.Price = request.Price;
 057                entity.Options = request.Options;
 058                entity.ImageName = request.ImageName;
 059                entity.ImagePath = request.ImagePath;
 60
 061                this.DbContext.Subscriptions.Update(entity);
 062                await this.DbContext.SaveChangesAsync(cancellationToken);
 063                response = RequestResponse.Success(entity.Id);
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.UpdateSubscriptionCommand);
 068                response = RequestResponse.Failure($"{ErrorsManager.UpdateSubscriptionCommand}. {ex.Message}. {ex.InnerE
 069            }
 70
 071            return response;
 072        }
 73    }
 74}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommandValidator.html deleted file mode 100644 index b6166dbe..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateSubscriptionCommandValidator.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.SubscriptionValidator.UpdateSubscriptionCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.SubscriptionValidator.UpdateSubscriptionCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriptionValidator\UpdateSubscriptionCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:34
Coverable lines:34
Total lines:70
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\SubscriptionValidator\UpdateSubscriptionCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateSubscriptionCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.SubscriptionValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateSubscriptionCommand}"/>.
 9    /// </summary>
 10    public class UpdateSubscriptionCommandValidator : AbstractValidator<UpdateSubscriptionCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateSubscriptionCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public UpdateSubscriptionCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(x => x.Id)
 021                .GreaterThan(0).WithMessage("Id must be greater than 0");
 22
 023            this.RuleFor(x => x.StripeSubscriptionId)
 024                .NotEmpty().WithMessage("StripeSubscriptionId must not be empty")
 025                .NotNull().WithMessage("StripeSubscriptionId must not be null");
 26
 027            this.RuleFor(x => x.Name)
 028                .MaximumLength(200).WithMessage("Name maximum length exceeded")
 029                .NotEmpty().WithMessage("Name must not be empty")
 030                .NotNull().WithMessage("Name must not be null")
 031                .MustAsync(this.HaveUniqueName).WithMessage("The specified name already exists.");
 32
 033            this.RuleFor(x => x.Price)
 034                .GreaterThan(0).WithMessage("Price must be greater than 0");
 35
 036            this.RuleFor(x => x.Options)
 037                .MaximumLength(1000).WithMessage("Options maximum length exceeded")
 038                .NotEmpty().WithMessage("Options must not be empty")
 039                .NotNull().WithMessage("Options must not be null");
 40
 041            this.RuleFor(x => x.ImageName)
 042                .MaximumLength(200).WithMessage("ImageName maximum length exceeded")
 043                .NotEmpty().WithMessage("ImageName must not be empty")
 044                .NotNull().WithMessage("ImageName must not be null");
 45
 046            this.RuleFor(x => x.ImagePath)
 047                .MaximumLength(200).WithMessage("ImagePath maximum length exceeded")
 048                .NotEmpty().WithMessage("ImagePath must not be empty")
 049                .NotNull().WithMessage("ImagePath must not be null");
 050        }
 51
 52        /// <summary>
 53        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 54        /// </summary>
 055        private IApplicationDbContext Context { get; }
 56
 57        /// <summary>
 58        /// Gets a value indicating whether the subscription has an unique name or not.
 59        /// </summary>
 60        /// <param name="name">The name of the subscription.</param>
 61        /// <param name="cancellationToken">The cancellation token.</param>
 62        /// <returns>A boolean value.</returns>
 63        public async Task<bool> HaveUniqueName(string name, CancellationToken cancellationToken)
 064        {
 065            return await this.Context.Carts
 066                .TagWith(nameof(this.HaveUniqueName))
 067                .AllAsync(l => l.Name != name, cancellationToken);
 068        }
 69    }
 70}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommand.html deleted file mode 100644 index e8ef81cd..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommand.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.TodoItemCommand.UpdateTodoItemCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.TodoItemCommand.UpdateTodoItemCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoItemCommand\UpdateTodoItemCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:42
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Title()100%10%
get_Note()100%10%
get_Priority()100%10%
get_State()100%10%
get_Done()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoItemCommand\UpdateTodoItemCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateTodoItemCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.TodoItemCommand
 6{
 7    /// <summary>
 8    /// A model to update an item.
 9    /// </summary>
 10    public class UpdateTodoItemCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the item.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The title of the item.
 19        /// </summary>
 020        public string? Title { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The note of the item.
 24        /// </summary>
 025        public string? Note { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The priority of the item.
 29        /// </summary>
 030        public TodoItemPriority Priority { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The state of the item.
 34        /// </summary>
 035        public TodoItemState State { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets a value indicating whether the status is completed.
 39        /// </summary>
 040        public bool Done { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommandHandler.html deleted file mode 100644 index 82125cf0..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommandHandler.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.TodoItemHandler.UpdateTodoItemCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.TodoItemHandler.UpdateTodoItemCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoItemHandler\UpdateTodoItemCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:31
Coverable lines:31
Total lines:74
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoItemHandler\UpdateTodoItemCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateTodoItemCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.TodoItemHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateTodoItemCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateTodoItemCommandHandler : IRequestHandler<UpdateTodoItemCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateTodoItemCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateTodoItemCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateTodoItemCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateTodoItemCommandHandler> logge
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateTodoItemCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateTodoItemCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateTodoItemCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateTodoItemCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.TodoItems
 047                    .TagWith(nameof(UpdateTodoItemCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The todo list record does not exists in the database");
 52                }
 53
 054                entity.Title = request.Title;
 055                entity.Note = request.Note;
 056                entity.Priority = request.Priority;
 057                entity.State = request.State;
 058                entity.Done = request.Done;
 59
 060                this.DbContext.TodoItems.Update(entity);
 061                await this.DbContext.SaveChangesAsync(cancellationToken);
 62
 063                response = RequestResponse.Success();
 064            }
 065            catch (Exception ex)
 066            {
 067                this.Logger.LogError(ex, ErrorsManager.UpdateTodoItemCommand);
 068                response = RequestResponse.Failure($"{ErrorsManager.UpdateTodoItemCommand}. {ex.Message}. {ex.InnerExcep
 069            }
 70
 071            return response;
 072        }
 73    }
 74}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommandValidator.html deleted file mode 100644 index e659fff6..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoItemCommandValidator.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.TodoItemValidator.UpdateTodoItemCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.TodoItemValidator.UpdateTodoItemCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoItemValidator\UpdateTodoItemCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:30
Coverable lines:30
Total lines:65
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueTitle()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoItemValidator\UpdateTodoItemCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateTodoItemCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.TodoItemValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateTodoItemCommand}"/>.
 9    /// </summary>
 10    public class UpdateTodoItemCommandValidator : AbstractValidator<UpdateTodoItemCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateTodoItemCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public UpdateTodoItemCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(x => x.Id)
 021                .GreaterThan(0).WithMessage("Id must be greater than 0");
 22
 023            this.RuleFor(x => x.Title)
 024                .MaximumLength(200).WithMessage("Title maximum length exceeded")
 025                .NotEmpty().WithMessage("Title must not be empty")
 026                .NotNull().WithMessage("Title must not be null")
 027                .MustAsync(this.HaveUniqueTitle).WithMessage("The specified title already exists.");
 28
 029            this.RuleFor(x => x.Note)
 030                .MaximumLength(1000).WithMessage("Note maximum length exceeded")
 031                .NotEmpty().WithMessage("Note must not be empty")
 032                .NotNull().WithMessage("Note must not be null");
 33
 034            this.RuleFor(x => x.Priority)
 035                .NotEmpty().WithMessage("Priority must not be empty")
 036                .NotNull().WithMessage("Priority must not be null");
 37
 038            this.RuleFor(x => x.State)
 039                .NotEmpty().WithMessage("State must not be empty")
 040                .NotNull().WithMessage("State must not be null");
 41
 042            this.RuleFor(x => x.Done)
 043                .NotEmpty().WithMessage("Done must not be empty")
 044                .NotNull().WithMessage("Done must not be null");
 045        }
 46
 47        /// <summary>
 48        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 49        /// </summary>
 050        private IApplicationDbContext Context { get; }
 51
 52        /// <summary>
 53        /// Gets a value indicating whether the item has an unique title or not.
 54        /// </summary>
 55        /// <param name="title">The title of the item.</param>
 56        /// <param name="cancellationToken">The cancellation token.</param>
 57        /// <returns>A boolean value.</returns>
 58        public async Task<bool> HaveUniqueTitle(string title, CancellationToken cancellationToken)
 059        {
 060            return await this.Context.TodoItems
 061                .TagWith(nameof(this.HaveUniqueTitle))
 062                .AllAsync(l => l.Title != title, cancellationToken);
 063        }
 64    }
 65}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommand.html deleted file mode 100644 index 582fe05c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommand.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.TodoListCommand.UpdateTodoListCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.TodoListCommand.UpdateTodoListCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoListCommand\UpdateTodoListCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Title()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\TodoListCommand\UpdateTodoListCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateTodoListCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.TodoListCommand
 6{
 7    /// <summary>
 8    /// A model to update a list.
 9    /// </summary>
 10    public class UpdateTodoListCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the list.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The title of the list.
 19        /// </summary>
 020        public string? Title { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Id()
-get_Title()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommandHandler.html deleted file mode 100644 index ca578408..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommandHandler.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.TodoListHandler.UpdateTodoListCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.TodoListHandler.UpdateTodoListCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoListHandler\UpdateTodoListCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:70
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)0%20%
get_DbContext()100%10%
get_Logger()100%10%
Handle()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\TodoListHandler\UpdateTodoListCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateTodoListCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.TodoListHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateTodoListCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateTodoListCommandHandler : IRequestHandler<UpdateTodoListCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateTodoListCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="dbContext">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{CreateUserCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 018        public UpdateTodoListCommandHandler(IApplicationDbContext dbContext, ILogger<UpdateTodoListCommandHandler> logge
 019        {
 020            this.DbContext = dbContext;
 021            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 022        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 26        /// </summary>
 027        private IApplicationDbContext DbContext { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateTodoListCommandHandler}"/>.
 31        /// </summary>
 032        private ILogger<UpdateTodoListCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateTodoListCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateTodoListCommand request, CancellationToken cancellationToken)
 041        {
 42            RequestResponse? response;
 43
 44            try
 045            {
 046                var entity = this.DbContext.TodoLists
 047                    .TagWith(nameof(UpdateTodoListCommandHandler))
 048                    .FirstOrDefault(x => x.Id == request.Id);
 049                if (entity == null)
 050                {
 051                    throw new Exception("The todo list record does not exists in the database");
 52                }
 53
 054                entity.Title = request.Title;
 55
 056                this.DbContext.TodoLists.Update(entity);
 057                await this.DbContext.SaveChangesAsync(cancellationToken);
 58
 059                response = RequestResponse.Success();
 060            }
 061            catch (Exception ex)
 062            {
 063                this.Logger.LogError(ex, ErrorsManager.UpdateTodoListCommand);
 064                response = RequestResponse.Failure($"{ErrorsManager.UpdateTodoListCommand}. {ex.Message}. {ex.InnerExcep
 065            }
 66
 067            return response;
 068        }
 69    }
 70}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommandValidator.html deleted file mode 100644 index 89165030..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateTodoListCommandValidator.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.TodoListValidator.UpdateTodoListCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.TodoListValidator.UpdateTodoListCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoListValidator\UpdateTodoListCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:48
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Context()100%10%
HaveUniqueTitle()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\TodoListValidator\UpdateTodoListCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateTodoListCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.TodoListValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateTodoListCommand}"/>.
 9    /// </summary>
 10    public class UpdateTodoListCommandValidator : AbstractValidator<UpdateTodoListCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateTodoListCommandValidator"/> class.
 14        /// </summary>
 15        /// <param name="context">Gets An instance of <see cref="IApplicationDbContext"/>.</param>
 016        public UpdateTodoListCommandValidator(IApplicationDbContext context)
 017        {
 018            this.Context = context;
 19
 020            this.RuleFor(x => x.Id)
 021                .GreaterThan(0).WithMessage("Id must be greater than 0");
 22
 023            this.RuleFor(x => x.Title)
 024                .MaximumLength(200).WithMessage("Title maximum length exceeded")
 025                .NotEmpty().WithMessage("Title must not be empty")
 026                .NotNull().WithMessage("Title must not be null")
 027                .MustAsync(this.HaveUniqueTitle).WithMessage("The specified title already exists.");
 028        }
 29
 30        /// <summary>
 31        /// Gets An instance of <see cref="IApplicationDbContext"/>.
 32        /// </summary>
 033        private IApplicationDbContext Context { get; }
 34
 35        /// <summary>
 36        /// Gets a value indicating whether the list has an unique title or not.
 37        /// </summary>
 38        /// <param name="name">The name of the list.</param>
 39        /// <param name="cancellationToken">The cancellation token.</param>
 40        /// <returns>A boolean value.</returns>
 41        public async Task<bool> HaveUniqueTitle(string name, CancellationToken cancellationToken)
 042        {
 043            return await this.Context.Carts
 044                .TagWith(nameof(this.HaveUniqueTitle))
 045                .AllAsync(l => l.Name != name, cancellationToken);
 046        }
 47    }
 48}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommand.html deleted file mode 100644 index dfe8b8a1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommand.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.UserCommand.UpdateUserCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.UserCommand.UpdateUserCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\UpdateUserCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
25%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1
Uncovered lines:3
Coverable lines:4
Total lines:32
Line coverage:25%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%1100%
get_FirstName()100%10%
get_LastName()100%10%
get_Role()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\UpdateUserCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateUserCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.UserCommand
 6{
 7    /// <summary>
 8    /// A model to update an user.
 9    /// </summary>
 10    public class UpdateUserCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 115        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The first name of the user.
 19        /// </summary>
 020        public string? FirstName { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The last name of the user.
 24        /// </summary>
 025        public string? LastName { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The role of the user.
 29        /// </summary>
 030        public string? Role { get; set; }
 31    }
 32}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommandHandler.html deleted file mode 100644 index 07fd749f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommandHandler.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\UpdateUserCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:19
Uncovered lines:0
Coverable lines:19
Total lines:58
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\UpdateUserCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateUserCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateUserCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateUserCommandHandler : IRequestHandler<UpdateUserCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateUserCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateUserCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public UpdateUserCommandHandler(IUserService userService, ILogger<UpdateUserCommandHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 227        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateUserCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<UpdateUserCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateUserCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateUserCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                var result = await this.UserService.UpdateUserAsync(request);
 147                response = result;
 148            }
 149            catch (Exception ex)
 150            {
 151                this.Logger.LogError(ex, ErrorsManager.UpdateUserCommand);
 152                response = RequestResponse.Failure($"{ErrorsManager.UpdateUserCommand}. {ex.Message}. {ex.InnerException
 153            }
 54
 255            return response;
 256        }
 57    }
 58}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommandValidator.html deleted file mode 100644 index 09c83500..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserCommandValidator.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.UserValidator.UpdateUserCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.UserValidator.UpdateUserCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\UpdateUserCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:36
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\UpdateUserCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateUserCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.UserValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateUserCommand}"/>.
 9    /// </summary>
 10    public class UpdateUserCommandValidator : AbstractValidator<UpdateUserCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateUserCommandValidator"/> class.
 14        /// </summary>
 015        public UpdateUserCommandValidator()
 016        {
 017            this.RuleFor(v => v.Id)
 018                .GreaterThan(0).WithMessage("Id must be greater than 0");
 19
 020            this.RuleFor(v => v.FirstName)
 021                .MaximumLength(100).WithMessage("FirstName maximum length exceeded")
 022                .NotEmpty().WithMessage("FirstName must not be empty")
 023                .NotNull().WithMessage("FirstName must not be null");
 24
 025            this.RuleFor(v => v.LastName)
 026                .MaximumLength(100).WithMessage("LastName maximum length exceeded")
 027                .NotEmpty().WithMessage("LastName must not be empty")
 028                .NotNull().WithMessage("LastName must not be null");
 29
 030            this.RuleFor(v => v.Role)
 031                .MaximumLength(25).WithMessage("Role maximum length exceeded")
 032                .NotEmpty().WithMessage("Role must not be empty")
 033                .NotNull().WithMessage("Role must not be null");
 034        }
 35    }
 36}
-
-
-
-
-

Methods/Properties

-.ctor()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommand.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommand.html deleted file mode 100644 index 4df5f323..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommand.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -BlazorShop.Application.Commands.UserCommand.UpdateUserEmailCommand - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Commands.UserCommand.UpdateUserEmailCommand
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\UpdateUserEmailCommand.cs
-
-
-
-
-
-
-
Line coverage
-
-
33%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1
Uncovered lines:2
Coverable lines:3
Total lines:27
Line coverage:33.3%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserId()100%10%
get_Email()100%1100%
get_NewEmail()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Commands\UserCommand\UpdateUserEmailCommand.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateUserEmailCommand.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Commands.UserCommand
 6{
 7    /// <summary>
 8    /// A model to update the email of the user.
 9    /// </summary>
 10    public class UpdateUserEmailCommand : IRequest<RequestResponse>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 015        public int UserId { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The email of the user.
 19        /// </summary>
 120        public string? Email { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The new email of the user.
 24        /// </summary>
 025        public string? NewEmail { get; set; }
 26    }
 27}
-
-
-
-
-

Methods/Properties

-get_UserId()
-get_Email()
-get_NewEmail()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommandHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommandHandler.html deleted file mode 100644 index 6c8d7611..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommandHandler.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - -BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserEmailCommandHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserEmailCommandHandler
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\UpdateUserEmailCommandHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:19
Uncovered lines:0
Coverable lines:19
Total lines:58
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
50%
-
- - - - - - - - - - - - - -
Covered branches:2
Total branches:4
Branch coverage:50%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)50%2100%
get_UserService()100%1100%
get_Logger()100%1100%
Handle()50%2100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Handlers\Commands\UserHandler\UpdateUserEmailCommandHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateUserEmailCommandHandler.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Handlers.Commands.UserHandler
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="IRequestHandler{UpdateUserEmailCommand, RequestResponse}"/>.
 9    /// </summary>
 10    public class UpdateUserEmailCommandHandler : IRequestHandler<UpdateUserEmailCommand, RequestResponse>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateUserEmailCommandHandler"/> class.
 14        /// </summary>
 15        /// <param name="userService">Gets An instance of <see cref="IUserService"/>.</param>
 16        /// <param name="logger">Gets An instance of <see cref="ILogger{UpdateUserEmailCommandHandler}"/>.</param>
 17        /// <exception cref="ArgumentNullException">Thrown if there is no logger provided.</exception>
 218        public UpdateUserEmailCommandHandler(IUserService userService, ILogger<UpdateUserEmailCommandHandler> logger)
 219        {
 220            this.UserService = userService;
 221            this.Logger = logger ?? throw new ArgumentNullException(nameof(logger));
 222        }
 23
 24        /// <summary>
 25        /// Gets An instance of <see cref="IUserService"/>.
 26        /// </summary>
 227        private IUserService UserService { get; }
 28
 29        /// <summary>
 30        /// Gets An instance of <see cref="ILogger{UpdateUserEmailCommandHandler}"/>.
 31        /// </summary>
 132        private ILogger<UpdateUserEmailCommandHandler> Logger { get; }
 33
 34        /// <summary>
 35        /// An implementation of the handler for <see cref="UpdateUserEmailCommand"/>.
 36        /// </summary>
 37        /// <param name="request">The request object to handle.</param>
 38        /// <param name="cancellationToken">The cancellation token.</param>
 39        /// <returns>A <see cref="Task{RequestResponse}"/> representing the result of the asynchronous operation.</retur
 40        public async Task<RequestResponse> Handle(UpdateUserEmailCommand request, CancellationToken cancellationToken)
 241        {
 42            RequestResponse? response;
 43
 44            try
 245            {
 246                var result = await this.UserService.UpdateUserEmailAsync(request);
 147                response = result;
 148            }
 149            catch (Exception ex)
 150            {
 151                this.Logger.LogError(ex, ErrorsManager.UpdateUserEmailCommand);
 152                response = RequestResponse.Failure($"{ErrorsManager.UpdateUserEmailCommand}. {ex.Message}. {ex.InnerExce
 153            }
 54
 255            return response;
 256        }
 57    }
 58}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommandValidator.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommandValidator.html deleted file mode 100644 index 0aee27f3..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UpdateUserEmailCommandValidator.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - -BlazorShop.Application.Validators.UserValidator.UpdateUserEmailCommandValidator - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Validators.UserValidator.UpdateUserEmailCommandValidator
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\UpdateUserEmailCommandValidator.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:54
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
IsValidEmailAddress(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Validators\UserValidator\UpdateUserEmailCommandValidator.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UpdateUserEmailCommandValidator.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Validators.UserValidator
 6{
 7    /// <summary>
 8    /// An implementation of the <see cref="AbstractValidator{UpdateUserEmailCommand}"/>.
 9    /// </summary>
 10    public class UpdateUserEmailCommandValidator : AbstractValidator<UpdateUserEmailCommand>
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UpdateUserEmailCommandValidator"/> class.
 14        /// </summary>
 015        public UpdateUserEmailCommandValidator()
 016        {
 017            this.RuleFor(v => v.UserId)
 018                .GreaterThan(0).WithMessage("UserId must be greater than 0");
 19
 020            this.RuleFor(v => v.Email)
 021                .MaximumLength(150).WithMessage("Email maximum length exceeded")
 022                .NotEmpty().WithMessage("Email must not be empty")
 023                .NotNull().WithMessage("Email must not be null")
 024                .Must(this.IsValidEmailAddress).WithMessage("The Email address is not valid");
 25
 026            this.RuleFor(v => v.NewEmail)
 027                .MaximumLength(150).WithMessage("NewEmail maximum length exceeded")
 028                .NotEmpty().WithMessage("NewEmail must not be empty")
 029                .NotNull().WithMessage("NewEmail must not be null")
 030                .NotEqual(v => v.Email).WithMessage("NewEmail must not be equal with Email")
 031                .Must(this.IsValidEmailAddress).WithMessage("The NewEmail address is not valid");
 032        }
 33
 34        /// <summary>
 35        /// Gets a value indicating whether the user has a valid email or not.
 36        /// </summary>
 37        /// <param name="emailAddress">The email address.</param>
 38        /// <returns>A boolean value.</returns>
 39        public bool IsValidEmailAddress(string emailAddress)
 040        {
 041            var isEmailValid = false;
 42            try
 043            {
 044                _ = new MailAddress(emailAddress);
 045                isEmailValid = true;
 046            }
 047            catch (Exception)
 048            {
 049            }
 50
 051            return isEmailValid;
 052        }
 53    }
 54}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UserResponse.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UserResponse.html deleted file mode 100644 index f28c380b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_UserResponse.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - -BlazorShop.Application.Responses.UserResponse - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Responses.UserResponse
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\UserResponse.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:71
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%10%
get_Username()100%10%
get_Email()100%10%
get_FirstName()100%10%
get_LastName()100%10%
get_RoleId()100%10%
get_RoleName()100%10%
get_IsActive()100%10%
Mapping(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Responses\UserResponse.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserResponse.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Responses
 6{
 7    /// <summary>
 8    /// An User response model.
 9    /// </summary>
 10    public class UserResponse : IMapFrom<User>
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the user.
 14        /// </summary>
 015        public int Id { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets The username of the user.
 19        /// </summary>
 020        public string? Username { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets The email of the user.
 24        /// </summary>
 025        public string? Email { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets The firstname of the user.
 29        /// </summary>
 030        public string? FirstName { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets The lastname of the user.
 34        /// </summary>
 035        public string? LastName { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets The id of the role.
 39        /// </summary>
 040        public int RoleId { get; set; }
 41
 42        /// <summary>
 43        /// Gets or sets The name of the role.
 44        /// </summary>
 045        public string? RoleName { get; set; }
 46
 47        /// <summary>
 48        /// Gets or sets a value indicating whether the user is active or not.
 49        /// </summary>
 050        public bool IsActive { get; set; }
 51
 52        /// <summary>
 53        /// Convert the entity (Data Access Layer) to model (Business Logic Layer).
 54        /// </summary>
 55        /// <param name="profile">The profile to use for the mapping operation.</param>
 56        public void Mapping(Profile profile)
 057        {
 058            profile.CreateMap<User, UserResponse>()
 059                .ForMember(d => d.Id, opt => opt.MapFrom(s => s.Id))
 060                .ForMember(d => d.Username, opt => opt.MapFrom(s => s.UserName))
 061                .ForMember(d => d.Email, opt => opt.MapFrom(s => s.Email))
 062                .ForMember(d => d.FirstName, opt => opt.MapFrom(s => s.FirstName))
 063                .ForMember(d => d.LastName, opt => opt.MapFrom(s => s.LastName))
 064                .ForMember(d => d.LastName, opt => opt.MapFrom(s => s.LastName))
 065                .ForMember(d => d.RoleId, opt => opt.MapFrom(s => s.Roles.Count))
 066                .ForMember(d => d.RoleName, opt => opt.MapFrom(s =>
 067                    s.Roles.Where(x => x.UserId == x.User.Id).Select(x => x.Role.Name).FirstOrDefault()))
 068                .ForMember(d => d.IsActive, opt => opt.MapFrom(s => s.IsActive));
 069        }
 70    }
 71}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ValidationBehaviour_2.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ValidationBehaviour_2.html deleted file mode 100644 index 1a550408..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ValidationBehaviour_2.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Behaviours.ValidationBehaviour<T1, T2> - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Behaviours.ValidationBehaviour<T1, T2>
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Behaviours\ValidationBehaviour.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:57
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Validators()100%10%
Handle()0%80%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Behaviours\ValidationBehaviour.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ValidationBehaviour.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5using ValidationException = BlazorShop.Application.Common.Exceptions.ValidationException;
 6
 7namespace BlazorShop.Application.Common.Behaviours
 8{
 9    /// <summary>
 10    /// A service to configure the validation behaviour.
 11    /// </summary>
 12    /// <typeparam name="TRequest">The request type.</typeparam>
 13    /// <typeparam name="TResponse">The response type.</typeparam>
 14    public class ValidationBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
 15        where TRequest : IRequest<TResponse>
 16    {
 17        /// <summary>
 18        /// Initializes a new instance of the <see cref="ValidationBehaviour{TRequest, TResponse}"/> class.
 19        /// </summary>
 20        /// <param name="validators">The list of validators.</param>
 021        public ValidationBehaviour(IEnumerable<IValidator<TRequest>> validators)
 022        {
 023            this.Validators = validators;
 024        }
 25
 26        /// <summary>
 27        /// Gets The list of validators to apply on models.
 28        /// </summary>
 029        private IEnumerable<IValidator<TRequest>> Validators { get; }
 30
 31        /// <summary>
 32        /// An implementation of the handler validation of commands and queries.
 33        /// </summary>
 34        /// <param name="request">The request object to handle.</param>
 35        /// <param name="next">The next request to validate.</param>
 36        /// <param name="cancellationToken">The cancellation token.</param>
 37        /// <returns>A <see cref="Task{TResponse}"/>.</returns>
 38        /// <exception cref="ValidationException">Thrown if there is a validation rule not being met.</exception>
 39        public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next, CancellationToken 
 040        {
 041            if (this.Validators.Any())
 042            {
 043                var context = new ValidationContext<TRequest>(request);
 44
 045                var validationResults = await Task.WhenAll(this.Validators.Select(v => v.ValidateAsync(context, cancella
 046                var failures = validationResults.SelectMany(r => r.Errors).Where(f => f != null).ToList();
 47
 048                if (failures.Count != 0)
 049                {
 050                    throw new ValidationException(failures);
 51                }
 052            }
 53
 054            return await next();
 055        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ValidationException.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ValidationException.html deleted file mode 100644 index 2d27501c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Application_ValidationException.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - -BlazorShop.Application.Common.Exceptions.ValidationException - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Application.Common.Exceptions.ValidationException
Assembly:BlazorShop.Application
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Exceptions\ValidationException.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
.ctor(...)100%10%
get_Errors()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Application\Common\Exceptions\ValidationException.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ValidationException.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Application.Common.Exceptions
 6{
 7    /// <summary>
 8    /// A validation class to validate the commands and queries.
 9    /// </summary>
 10    public class ValidationException : Exception
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ValidationException"/> class.
 14        /// </summary>
 15        public ValidationException()
 016            : base("One or more validation failures have occurred")
 017        {
 018            this.Errors = new Dictionary<string, string[]>();
 019        }
 20
 21        /// <summary>
 22        /// Initializes a new instance of the <see cref="ValidationException"/> class.
 23        /// </summary>
 24        /// <param name="failures">The fluent validation failures.</param>
 25        public ValidationException(IEnumerable<FluentValidation.Results.ValidationFailure> failures)
 026            : this()
 027        {
 028            this.Errors = failures.GroupBy(e => e.PropertyName, e => e.ErrorMessage)
 029                .ToDictionary(failureGroup => failureGroup.Key, failureGroup => failureGroup.ToArray());
 030        }
 31
 32        /// <summary>
 33        /// Gets A list of validation errors.
 34        /// </summary>
 035        public IDictionary<string?, string?[]> Errors { get; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Cart.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Cart.html deleted file mode 100644 index 81db4ed3..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Cart.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Cart - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Cart
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Cart.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Name()100%10%
get_Price()100%10%
get_Amount()100%10%
get_Clothe()100%10%
get_User()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Cart.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Cart.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity cart.
 9    /// </summary>
 10    public class Cart : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or Sets the name of the cart.
 14        /// </summary>
 015        public string? Name { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the price of the cart.
 19        /// </summary>
 020        public decimal Price { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the amount of the cart.
 24        /// </summary>
 025        public int Amount { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the clothe.
 29        /// </summary>
 030        public Clothe? Clothe { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the user.
 34        /// </summary>
 035        public User? User { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Clothe.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Clothe.html deleted file mode 100644 index 9bbe16b7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Clothe.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Clothe - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Clothe
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Clothe.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:47
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Name()100%1100%
get_Description()100%1100%
get_Price()100%1100%
get_Amount()100%1100%
get_ImageName()100%1100%
get_ImagePath()100%1100%
get_IsActive()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Clothe.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Clothe.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity clothe.
 9    /// </summary>
 10    public class Clothe : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or Sets the name of the clothe.
 14        /// </summary>
 1415        public string? Name { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the description of the clothe.
 19        /// </summary>
 1420        public string? Description { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the price of the clothe.
 24        /// </summary>
 1425        public decimal? Price { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the amount of the clothe.
 29        /// </summary>
 230        public int Amount { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the image name of the clothe.
 34        /// </summary>
 1435        public string? ImageName { get; set; }
 36
 37        /// <summary>
 38        /// Gets or Sets the image path of the clothe.
 39        /// </summary>
 1440        public string? ImagePath { get; set; }
 41
 42        /// <summary>
 43        /// Gets or Sets a value indicating whether the clothe is active or not.
 44        /// </summary>
 1545        public bool? IsActive { get; set; }
 46    }
 47}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_EntityBase.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_EntityBase.html deleted file mode 100644 index b7239760..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_EntityBase.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Domain.Common.EntityBase - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Common.EntityBase
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Common\EntityBase.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1
Uncovered lines:0
Coverable lines:1
Total lines:17
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Id()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Common\EntityBase.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="EntityBase.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Common
 6{
 7    /// <summary>
 8    /// A template for creating IDs.
 9    /// </summary>
 10    public class EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or sets The id of the entity.
 14        /// </summary>
 1115        public int Id { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Id()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Invoice.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Invoice.html deleted file mode 100644 index 43321371..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Invoice.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Invoice - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Invoice
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Invoice.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserEmail()100%10%
get_Name()100%10%
get_AmountSubTotal()100%10%
get_AmountTotal()100%10%
get_Quantity()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Invoice.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Invoice.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity invoice.
 9    /// </summary>
 10    public class Invoice : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or Sets the email of the user.
 14        /// </summary>
 015        public string UserEmail { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the name of the invoice.
 19        /// </summary>
 020        public string Name { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the sub total amount of the invoice.
 24        /// </summary>
 025        public int AmountSubTotal { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the total amount of the invoice.
 29        /// </summary>
 030        public int AmountTotal { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the quantity of the invoice.
 34        /// </summary>
 035        public int Quantity { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Music.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Music.html deleted file mode 100644 index e5b881a9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Music.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Music - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Music
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Music.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:47
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Title()100%10%
get_Description()100%10%
get_Author()100%10%
get_DateRelease()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
get_AccessLevel()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Music.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Music.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity music.
 9    /// </summary>
 10    public class Music : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or Sets the title of the music.
 14        /// </summary>
 015        public string Title { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the description of the music.
 19        /// </summary>
 020        public string Description { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the author of the music.
 24        /// </summary>
 025        public string Author { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the release date of the music.
 29        /// </summary>
 030        public DateTime DateRelease { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the image name of the music.
 34        /// </summary>
 035        public string ImageName { get; set; }
 36
 37        /// <summary>
 38        /// Gets or Sets the image path of the music.
 39        /// </summary>
 040        public string ImagePath { get; set; }
 41
 42        /// <summary>
 43        /// Gets or Sets the access level of the music.
 44        /// </summary>
 045        public int AccessLevel { get; set; }
 46    }
 47}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Order.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Order.html deleted file mode 100644 index a355a701..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Order.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Order - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Order
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Order.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserEmail()100%10%
get_OrderName()100%10%
get_OrderDate()100%10%
get_LineItems()100%10%
get_AmountTotal()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Order.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Order.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity order.
 9    /// </summary>
 10    public class Order : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or Sets the email of the user.
 14        /// </summary>
 015        public string UserEmail { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the name of the order.
 19        /// </summary>
 020        public string OrderName { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the date of the order.
 24        /// </summary>
 025        public DateTime OrderDate { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the items of the order.
 29        /// </summary>
 030        public string LineItems { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the total amount of the order.
 34        /// </summary>
 035        public int AmountTotal { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Receipt.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Receipt.html deleted file mode 100644 index ad186795..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Receipt.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Receipt - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Receipt
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Receipt.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:4
Coverable lines:4
Total lines:32
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_UserEmail()100%10%
get_ReceiptDate()100%10%
get_ReceiptName()100%10%
get_ReceiptUrl()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Receipt.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Receipt.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity receipt.
 9    /// </summary>
 10    public class Receipt : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or Sets the email of the user.
 14        /// </summary>
 015        public string UserEmail { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the date of the receipt.
 19        /// </summary>
 020        public DateTime ReceiptDate { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the name of the receipt.
 24        /// </summary>
 025        public string ReceiptName { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the url of the receipt.
 29        /// </summary>
 030        public string ReceiptUrl { get; set; }
 31    }
 32}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Role.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Role.html deleted file mode 100644 index de720ad8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Role.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Identity.Role - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Identity.Role
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\Role.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Users()100%10%
get_Claims()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\Role.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Role.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities.Identity
 6{
 7    /// <summary>
 8    /// A template for the entity role.
 9    /// </summary>
 10    public class Role : IdentityRole<int>
 11    {
 12        /// <summary>
 13        /// Gets or Sets the users.
 14        /// </summary>
 015        public virtual ICollection<UserRole> Users { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the users claims.
 19        /// </summary>
 020        public virtual ICollection<RoleClaim> Claims { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Users()
-get_Claims()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_RoleClaim.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_RoleClaim.html deleted file mode 100644 index cae54d48..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_RoleClaim.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Identity.RoleClaim - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Identity.RoleClaim
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\RoleClaim.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Role()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\RoleClaim.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RoleClaim.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities.Identity
 6{
 7    /// <summary>
 8    /// A template for the entity role claim.
 9    /// </summary>
 10    public class RoleClaim : IdentityRoleClaim<int>
 11    {
 12        /// <summary>
 13        /// Gets or Sets the role.
 14        /// </summary>
 015        public virtual Role Role { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Role()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Subscriber.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Subscriber.html deleted file mode 100644 index 8cc4f13a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Subscriber.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Subscriber - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Subscriber
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Subscriber.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:52
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Status()100%10%
get_DateStart()100%10%
get_CurrentPeriodEnd()100%10%
get_CurrentPeriodStart()100%10%
get_StripeSubscriberSubscriptionId()100%10%
get_HostedInvoiceUrl()100%10%
get_Customer()100%10%
get_Subscription()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Subscriber.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Subscriber.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity subscriber.
 9    /// </summary>
 10    public class Subscriber : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or Sets the status of the subscriber.
 14        /// </summary>
 015        public SubscriptionStatus Status { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the start date of the subscriber.
 19        /// </summary>
 020        public DateTime DateStart { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets when the current period of the subscription ends.
 24        /// </summary>
 025        public DateTime CurrentPeriodEnd { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets when the current period of the subscription starts.
 29        /// </summary>
 030        public DateTime CurrentPeriodStart { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the id of the stripe subscriber subscription.
 34        /// </summary>
 035        public string StripeSubscriberSubscriptionId { get; set; }
 36
 37        /// <summary>
 38        /// Gets or Sets the invoice url.
 39        /// </summary>
 040        public string HostedInvoiceUrl { get; set; }
 41
 42        /// <summary>
 43        /// Gets or Sets the customer.
 44        /// </summary>
 045        public User Customer { get; set; }
 46
 47        /// <summary>
 48        /// Gets or Sets the subscription.
 49        /// </summary>
 050        public Subscription Subscription { get; set; }
 51    }
 52}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Subscription.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Subscription.html deleted file mode 100644 index b349f8f5..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_Subscription.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Subscription - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Subscription
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Subscription.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:57
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_StripeSubscriptionId()100%10%
get_Name()100%10%
get_Price()100%10%
get_Currency()100%10%
get_CurrencySymbol()100%10%
get_ChargeType()100%10%
get_Options()100%10%
get_ImageName()100%10%
get_ImagePath()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Subscription.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Subscription.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity subscription.
 9    /// </summary>
 10    public class Subscription : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or Sets the stripe subscription id.
 14        /// </summary>
 015        public string StripeSubscriptionId { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the name of the subscription.
 19        /// </summary>
 020        public string Name { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the price of the subscription.
 24        /// </summary>
 025        public int Price { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the currency of the subscription.
 29        /// </summary>
 030        public string Currency { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the currency symbol of the subscription.
 34        /// </summary>
 035        public string CurrencySymbol { get; set; }
 36
 37        /// <summary>
 38        /// Gets or Sets the charge type of the subscription.
 39        /// </summary>
 040        public string ChargeType { get; set; }
 41
 42        /// <summary>
 43        /// Gets or Sets the price of the subscription.
 44        /// </summary>
 045        public string Options { get; set; }
 46
 47        /// <summary>
 48        /// Gets or Sets the image name of the subscription.
 49        /// </summary>
 050        public string ImageName { get; set; }
 51
 52        /// <summary>
 53        /// Gets or Sets the image path of the subscription.
 54        /// </summary>
 055        public string ImagePath { get; set; }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_TodoItem.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_TodoItem.html deleted file mode 100644 index 385966d7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_TodoItem.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.TodoItem - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.TodoItem
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\TodoItem.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:42
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Title()100%10%
get_Note()100%10%
get_Priority()100%10%
get_State()100%10%
get_Done()100%10%
get_List()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\TodoItem.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoItem.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity todo item.
 9    /// </summary>
 10    public class TodoItem : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or sets the title of the todo item.
 14        /// </summary>
 015        public string? Title { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets the note of the todo item.
 19        /// </summary>
 020        public string? Note { get; set; }
 21
 22        /// <summary>
 23        /// Gets or sets the priority of the todo item.
 24        /// </summary>
 025        public TodoItemPriority Priority { get; set; }
 26
 27        /// <summary>
 28        /// Gets or sets the state of the todo item.
 29        /// </summary>
 030        public TodoItemState State { get; set; }
 31
 32        /// <summary>
 33        /// Gets or sets a value indicating whether the status of the todo item.
 34        /// </summary>
 035        public bool Done { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets the list of the todo item.
 39        /// </summary>
 040        public TodoList List { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_TodoList.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_TodoList.html deleted file mode 100644 index c6f73645..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_TodoList.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.TodoList - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.TodoList
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\TodoList.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Title()100%10%
get_Items()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\TodoList.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoList.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities
 6{
 7    /// <summary>
 8    /// A template for the entity todo list.
 9    /// </summary>
 10    public class TodoList : EntityBase
 11    {
 12        /// <summary>
 13        /// Gets or sets the title of the todo list.
 14        /// </summary>
 015        public string? Title { get; set; }
 16
 17        /// <summary>
 18        /// Gets or sets the items of the todo list.
 19        /// </summary>
 020        public virtual ICollection<TodoItem> Items { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_Title()
-get_Items()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_User.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_User.html deleted file mode 100644 index b30e9c89..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_User.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Identity.User - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Identity.User
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\User.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:47
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_FirstName()100%10%
get_LastName()100%10%
get_IsActive()100%10%
get_UserTokens()100%10%
get_Roles()100%10%
get_Logins()100%10%
get_Claims()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\User.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="User.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities.Identity
 6{
 7    /// <summary>
 8    /// A template for the entity user.
 9    /// </summary>
 10    public class User : IdentityUser<int>
 11    {
 12        /// <summary>
 13        /// Gets or Sets the firstname of the user.
 14        /// </summary>
 015        public string? FirstName { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the lastname of the user.
 19        /// </summary>
 020        public string? LastName { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets a value indicating whether the user is active or not.
 24        /// </summary>
 025        public bool IsActive { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the user tokens.
 29        /// </summary>
 030        public virtual ICollection<UserToken> UserTokens { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the user roles.
 34        /// </summary>
 035        public virtual ICollection<UserRole> Roles { get; set; }
 36
 37        /// <summary>
 38        /// Gets or Sets the user logins.
 39        /// </summary>
 040        public virtual ICollection<UserLogin> Logins { get; set; }
 41
 42        /// <summary>
 43        /// Gets or Sets the user claims.
 44        /// </summary>
 045        public virtual ICollection<UserClaim> Claims { get; set; }
 46    }
 47}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserClaim.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserClaim.html deleted file mode 100644 index ed2360aa..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserClaim.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Identity.UserClaim - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Identity.UserClaim
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\UserClaim.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_User()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\UserClaim.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserClaim.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities.Identity
 6{
 7    /// <summary>
 8    /// A template for the entity user claim.
 9    /// </summary>
 10    public class UserClaim : IdentityUserClaim<int>
 11    {
 12        /// <summary>
 13        /// Gets or Sets the user.
 14        /// </summary>
 015        public virtual User User { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_User()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserLogin.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserLogin.html deleted file mode 100644 index b07d40b0..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserLogin.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Identity.UserLogin - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Identity.UserLogin
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\UserLogin.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_User()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\UserLogin.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserLogin.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities.Identity
 6{
 7    /// <summary>
 8    /// A template for the entity user login.
 9    /// </summary>
 10    public class UserLogin : IdentityUserLogin<int>
 11    {
 12        /// <summary>
 13        /// Gets or Sets the user.
 14        /// </summary>
 015        public virtual User User { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_User()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserRole.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserRole.html deleted file mode 100644 index 7ce0fe9d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserRole.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Identity.UserRole - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Identity.UserRole
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\UserRole.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:22
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_User()100%10%
get_Role()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\UserRole.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserRole.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities.Identity
 6{
 7    /// <summary>
 8    /// A template for the entity user role.
 9    /// </summary>
 10    public class UserRole : IdentityUserRole<int>
 11    {
 12        /// <summary>
 13        /// Gets or Sets the user.
 14        /// </summary>
 015        public virtual User User { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the role.
 19        /// </summary>
 020        public virtual Role Role { get; set; }
 21    }
 22}
-
-
-
-
-

Methods/Properties

-get_User()
-get_Role()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserToken.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserToken.html deleted file mode 100644 index f4ca90c2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Domain_UserToken.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Domain.Entities.Identity.UserToken - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Domain.Entities.Identity.UserToken
Assembly:BlazorShop.Domain
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\UserToken.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_User()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Domain\Entities\Identity\UserToken.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserToken.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Domain.Entities.Identity
 6{
 7    /// <summary>
 8    /// A template for the entity user token.
 9    /// </summary>
 10    public class UserToken : IdentityUserToken<int>
 11    {
 12        /// <summary>
 13        /// Gets or Sets the user.
 14        /// </summary>
 015        public virtual User User { get; set; }
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_User()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_AccountService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_AccountService.html deleted file mode 100644 index d1424c00..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_AccountService.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Services.AccountService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Services.AccountService
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\AccountService.cs
-
-
-
-
-
-
-
Line coverage
-
-
8%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:9
Uncovered lines:101
Coverable lines:110
Total lines:183
Line coverage:8.1%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:20
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_UserManager()100%10%
get_RoleManager()100%10%
get_Configuration()100%10%
ChangePasswordUserAsync()0%60%
CheckPasswordAsync()100%10%
GenerateToken()100%10%
LoginAsync()0%40%
RegisterAsync()0%60%
ResetPasswordUserAsync()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\AccountService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AccountService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IAccountService"/>.
 9    /// </summary>
 10    public class AccountService : IAccountService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="AccountService"/> class.
 14        /// </summary>
 15        /// <param name="userManager">The instance of <see cref="UserManager{User}"/> to use.</param>
 16        /// <param name="roleManager">The instance of <see cref="RoleManager{Role}"/> to use.</param>
 17        /// <param name="configuration">The instance of <see cref="IConfiguration"/> to use.</param>
 418        public AccountService(
 419            UserManager<User> userManager,
 420            RoleManager<Role> roleManager,
 421            IConfiguration configuration)
 422        {
 423            this.UserManager = userManager;
 424            this.RoleManager = roleManager;
 425            this.Configuration = configuration;
 426        }
 27
 28        /// <summary>
 29        /// Gets the instance of <see cref="UserManager{User}"/> to use.
 30        /// </summary>
 031        private UserManager<User> UserManager { get; }
 32
 33        /// <summary>
 34        /// Gets the instance of <see cref="RoleManager{Role}"/> to use.
 35        /// </summary>
 036        private RoleManager<Role> RoleManager { get; }
 37
 38        /// <summary>
 39        /// Gets the instance of <see cref="IConfiguration"/> to use.
 40        /// </summary>
 041        private IConfiguration Configuration { get; }
 42
 43        /// <inheritdoc/>
 44        public async Task<RequestResponse> ChangePasswordUserAsync(ChangePasswordCommand changePassword)
 045        {
 046            var user = await this.UserManager.FindByIdAsync(changePassword.UserId.ToString());
 047            if (user == null)
 048            {
 049                throw new Exception("The user does not exist");
 50            }
 51
 052            if (!await this.UserManager.CheckPasswordAsync(user, changePassword.OldPassword))
 053            {
 054                throw new Exception("The credentials are not valid");
 55            }
 56
 057            if (!changePassword.NewPassword.Equals(changePassword.ConfirmNewPassword))
 058            {
 059                throw new Exception("Passwords do not match");
 60            }
 61
 062            await this.UserManager.ChangePasswordAsync(user, changePassword.OldPassword, changePassword.NewPassword);
 063            return RequestResponse.Success();
 064        }
 65
 66        /// <inheritdoc/>
 67        public async Task<bool> CheckPasswordAsync(User user, string password)
 068        {
 069            var result = await this.UserManager.CheckPasswordAsync(user, password);
 070            return result;
 071        }
 72
 73        /// <inheritdoc/>
 74        public async Task<JwtTokenResponse> GenerateToken(User user)
 075        {
 076            var jwtSettings = new JwtTokenConfig
 077            {
 078                Secret = this.Configuration["JwtToken:SecretKey"],
 079                Issuer = this.Configuration["JwtToken:Issuer"],
 080                Audience = this.Configuration["JwtToken:Audience"],
 081            };
 082            var key = new SymmetricSecurityKey(Encoding.Unicode.GetBytes(jwtSettings.Secret));
 83
 084            var userRole = await this.UserManager.GetRolesAsync(user);
 085            var claims = new List<Claim>
 086            {
 087                new Claim(ClaimTypes.Name, user.UserName),
 088                new Claim(ClaimTypes.Email, user.Email),
 089                new Claim(ClaimTypes.Role, userRole[0]),
 090                new Claim(StringRoleResources.UserIdClaim, user.Id.ToString()),
 091            };
 92
 093            var expiresIn = DateTime.Now.AddDays(1);
 094            var tokenDescriptor = new SecurityTokenDescriptor
 095            {
 096                Subject = new ClaimsIdentity(claims),
 097                Audience = jwtSettings.Audience,
 098                Issuer = jwtSettings.Issuer,
 099                Expires = expiresIn,
 0100                SigningCredentials = new SigningCredentials(key, SecurityAlgorithms.HmacSha256),
 0101            };
 0102            var token = new JwtSecurityTokenHandler().CreateToken(tokenDescriptor);
 103
 0104            return new JwtTokenResponse
 0105            {
 0106                AccessToken = new JwtSecurityTokenHandler().WriteToken(token),
 0107                ExpiresIn = (int)(expiresIn - DateTime.Now).TotalSeconds,
 0108                Successful = true,
 0109            };
 0110        }
 111
 112        /// <inheritdoc/>
 113        public async Task<JwtTokenResponse> LoginAsync(LoginCommand login)
 0114        {
 0115            var user = this.UserManager.Users.SingleOrDefault(u => u.Email == login.Email);
 0116            if (user == null)
 0117            {
 0118                throw new Exception("Email / password incorrect");
 119            }
 120
 0121            var passwordValid = await this.CheckPasswordAsync(user, login.Password);
 0122            if (passwordValid == false)
 0123            {
 0124                throw new Exception("Email / password incorrect");
 125            }
 126
 0127            return await this.GenerateToken(user);
 0128        }
 129
 130        /// <inheritdoc/>
 131        public async Task<JwtTokenResponse> RegisterAsync(RegisterCommand register)
 0132        {
 0133            var existUser = this.UserManager.Users.SingleOrDefault(u => u.Email == register.Email);
 0134            if (existUser != null)
 0135            {
 0136                throw new Exception("The user with the unique identifier already exists");
 137            }
 138
 0139            var newUser = new User
 0140            {
 0141                UserName = register.FirstName + "@" + register.LastName,
 0142                Email = register.Email,
 0143                FirstName = register.FirstName,
 0144                LastName = register.LastName,
 0145                IsActive = true,
 0146            };
 0147            if (!register.Password.Equals(register.ConfirmPassword))
 0148            {
 0149                throw new Exception("Passwords do not match");
 150            }
 151
 0152            await this.UserManager.CreateAsync(newUser, register.Password);
 153
 0154            var role = await this.RoleManager.FindByNameAsync(StringRoleResources.Default);
 0155            if (role == null)
 0156            {
 0157                throw new Exception("The role does not exist");
 158            }
 159
 0160            await this.UserManager.AddToRoleAsync(newUser, role.Name);
 0161            return await this.GenerateToken(newUser);
 0162        }
 163
 164        /// <inheritdoc/>
 165        public async Task<RequestResponse> ResetPasswordUserAsync(ResetPasswordCommand resetPassword)
 0166        {
 0167            var user = await this.UserManager.FindByEmailAsync(resetPassword.Email);
 0168            if (user == null)
 0169            {
 0170                throw new Exception("The user does not exist");
 171            }
 172
 0173            if (!resetPassword.NewPassword.Equals(resetPassword.NewConfirmPassword))
 0174            {
 0175                throw new Exception("Passwords do not match");
 176            }
 177
 0178            var token = await this.UserManager.GeneratePasswordResetTokenAsync(user);
 0179            await this.UserManager.ResetPasswordAsync(user, token, resetPassword.NewPassword);
 0180            return RequestResponse.Success();
 0181        }
 182    }
 183}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_AdminSeedModel.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_AdminSeedModel.html deleted file mode 100644 index 857238ff..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_AdminSeedModel.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Utils.AdminSeedModel - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Utils.AdminSeedModel
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Utils\AdminSeedModel.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:37
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_FirstName()100%10%
get_LastName()100%10%
get_Email()100%10%
get_Password()100%10%
get_RoleName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Utils\AdminSeedModel.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AdminSeedModel.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Utils
 6{
 7    /// <summary>
 8    /// A model of Admin user details.
 9    /// </summary>
 10    public class AdminSeedModel
 11    {
 12        /// <summary>
 13        /// Gets or Sets the firstname.
 14        /// </summary>
 015        public string? FirstName { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the lastname.
 19        /// </summary>
 020        public string? LastName { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the email.
 24        /// </summary>
 025        public string? Email { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the password.
 29        /// </summary>
 030        public string? Password { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the role name.
 34        /// </summary>
 035        public string? RoleName { get; set; }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContext.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContext.html deleted file mode 100644 index efe93a0e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContext.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.ApplicationDbContext - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.ApplicationDbContext
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\ApplicationDbContext.cs
-
-
-
-
-
-
-
Line coverage
-
-
93%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:41
Uncovered lines:3
Coverable lines:44
Total lines:108
Line coverage:93.1%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
.ctor(...)100%10%
.ctor()100%1100%
get_Carts()100%1100%
get_Clothes()100%1100%
get_Invoices()100%1100%
get_Musics()100%1100%
get_Orders()100%1100%
get_Subscribers()100%1100%
get_Subscriptions()100%1100%
get_Receipts()100%1100%
get_TodoItems()100%1100%
get_TodoLists()100%1100%
SaveChangesAsync()100%1100%
OnModelCreating(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\ApplicationDbContext.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ApplicationDbContext.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence
 6{
 7    /// <summary>
 8    /// The database context configurations and entities.
 9    /// </summary>
 10    public class ApplicationDbContext : IdentityDbContext<User, Role, int,
 11        UserClaim, UserRole, UserLogin,
 12        RoleClaim, UserToken>, IApplicationDbContext
 13    {
 14        /// <summary>
 15        /// Initializes a new instance of the <see cref="ApplicationDbContext"/> class.
 16        /// </summary>
 17        /// <param name="options">The options for the db context.</param>
 18        public ApplicationDbContext(
 19            DbContextOptions<ApplicationDbContext> options)
 7020            : base(options)
 7021        {
 7022        }
 23
 24        /// <summary>
 25        /// Initializes a new instance of the <see cref="ApplicationDbContext"/> class.
 26        /// </summary>
 27        /// <param name="options">The options for the db context.</param>
 28        protected ApplicationDbContext(
 29            DbContextOptions options)
 30
 031            : base(options)
 032        {
 033        }
 34
 35        /// <summary>
 36        /// Initializes a new instance of the <see cref="ApplicationDbContext"/> class.
 37        /// </summary>
 7038        protected ApplicationDbContext()
 7039        {
 7040        }
 41
 42        /// <inheritdoc/>
 14043        public DbSet<Cart> Carts { get; set; }
 44
 45        /// <inheritdoc/>
 15946        public DbSet<Clothe> Clothes { get; set; }
 47
 48        /// <inheritdoc/>
 14049        public DbSet<Invoice> Invoices { get; set; }
 50
 51        /// <inheritdoc/>
 14052        public DbSet<Music> Musics { get; set; }
 53
 54        /// <inheritdoc/>
 14055        public DbSet<Order> Orders { get; set; }
 56
 57        /// <inheritdoc/>
 14058        public DbSet<Subscriber> Subscribers { get; set; }
 59
 60        /// <inheritdoc/>
 14061        public DbSet<Subscription> Subscriptions { get; set; }
 62
 63        /// <inheritdoc/>
 14064        public DbSet<Receipt> Receipts { get; set; }
 65
 66        /// <inheritdoc/>
 14067        public DbSet<TodoItem> TodoItems { get; set; }
 68
 69        /// <inheritdoc/>
 14070        public DbSet<TodoList> TodoLists { get; set; }
 71
 72        /// <inheritdoc/>
 73        public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
 874        {
 875            var result = await base.SaveChangesAsync(cancellationToken);
 876            return result;
 877        }
 78
 79        /// <summary>
 80        /// Adding more settings to the db context.
 81        /// </summary>
 82        /// <param name="builder">The model builder of the db context.</param>
 83        protected override void OnModelCreating(ModelBuilder builder)
 184        {
 185            base.OnModelCreating(builder);
 186            builder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
 87
 188            builder.ApplyConfiguration(new RoleClaimConfiguration());
 189            builder.ApplyConfiguration(new UserConfiguration());
 190            builder.ApplyConfiguration(new RoleConfiguration());
 191            builder.ApplyConfiguration(new UserClaimConfiguration());
 192            builder.ApplyConfiguration(new UserLoginConfiguration());
 193            builder.ApplyConfiguration(new UserRoleConfiguration());
 194            builder.ApplyConfiguration(new UserTokenConfiguration());
 95
 196            builder.ApplyConfiguration(new CartConfiguration());
 197            builder.ApplyConfiguration(new ClotheConfiguration());
 198            builder.ApplyConfiguration(new InvoiceConfiguration());
 199            builder.ApplyConfiguration(new MusicConfiguration());
 1100            builder.ApplyConfiguration(new OrderConfiguration());
 1101            builder.ApplyConfiguration(new ReceiptConfiguration());
 1102            builder.ApplyConfiguration(new SubscriberConfiguration());
 1103            builder.ApplyConfiguration(new SubscriptionConfiguration());
 1104            builder.ApplyConfiguration(new TodoItemConfiguration());
 1105            builder.ApplyConfiguration(new TodoListConfiguration());
 1106        }
 107    }
 108}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContextModelSnapshot.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContextModelSnapshot.html deleted file mode 100644 index c3d26cfb..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContextModelSnapshot.html +++ /dev/null @@ -1,923 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.ApplicationDbContextModelSnapshot - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Migrations.ApplicationDbContextModelSnapshot
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\ApplicationDbContextModelSnapshot.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:710
Coverable lines:710
Total lines:756
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\ApplicationDbContextModelSnapshot.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Infrastructure;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    [DbContext(typeof(ApplicationDbContext))]
 11    partial class ApplicationDbContextModelSnapshot : ModelSnapshot
 12    {
 13        protected override void BuildModel(ModelBuilder modelBuilder)
 014        {
 15#pragma warning disable 612, 618
 016            modelBuilder
 017                .HasAnnotation("ProductVersion", "6.0.1")
 018                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 19
 020            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 21
 022            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 023                {
 024                    b.Property<int>("Id")
 025                        .ValueGeneratedOnAdd()
 026                        .HasColumnType("int");
 027
 028                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 029
 030                    b.Property<int>("Amount")
 031                        .HasColumnType("int");
 032
 033                    b.Property<int?>("ClotheId")
 034                        .HasColumnType("int");
 035
 036                    b.Property<string>("Name")
 037                        .IsRequired()
 038                        .HasMaxLength(200)
 039                        .HasColumnType("nvarchar(200)");
 040
 041                    b.Property<decimal>("Price")
 042                        .HasColumnType("decimal(18,2)");
 043
 044                    b.Property<int?>("UserId")
 045                        .HasColumnType("int");
 046
 047                    b.HasKey("Id");
 048
 049                    b.HasIndex("ClotheId");
 050
 051                    b.HasIndex("UserId");
 052
 053                    b.ToTable("Carts", (string)null);
 054                });
 55
 056            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 057                {
 058                    b.Property<int>("Id")
 059                        .ValueGeneratedOnAdd()
 060                        .HasColumnType("int");
 061
 062                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 063
 064                    b.Property<int>("Amount")
 065                        .HasColumnType("int");
 066
 067                    b.Property<string>("Description")
 068                        .IsRequired()
 069                        .HasMaxLength(1000)
 070                        .HasColumnType("nvarchar(1000)");
 071
 072                    b.Property<string>("ImageName")
 073                        .IsRequired()
 074                        .HasMaxLength(200)
 075                        .HasColumnType("nvarchar(200)");
 076
 077                    b.Property<string>("ImagePath")
 078                        .IsRequired()
 079                        .HasMaxLength(200)
 080                        .HasColumnType("nvarchar(200)");
 081
 082                    b.Property<bool?>("IsActive")
 083                        .IsRequired()
 084                        .HasColumnType("bit");
 085
 086                    b.Property<string>("Name")
 087                        .IsRequired()
 088                        .HasMaxLength(200)
 089                        .HasColumnType("nvarchar(200)");
 090
 091                    b.Property<decimal?>("Price")
 092                        .IsRequired()
 093                        .HasColumnType("decimal(18,2)");
 094
 095                    b.HasKey("Id");
 096
 097                    b.ToTable("Clothes", (string)null);
 098                });
 99
 0100            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0101                {
 0102                    b.Property<int>("Id")
 0103                        .ValueGeneratedOnAdd()
 0104                        .HasColumnType("int");
 0105
 0106                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0107
 0108                    b.Property<string>("ConcurrencyStamp")
 0109                        .IsConcurrencyToken()
 0110                        .HasColumnType("nvarchar(max)");
 0111
 0112                    b.Property<string>("Name")
 0113                        .IsRequired()
 0114                        .HasMaxLength(100)
 0115                        .HasColumnType("nvarchar(100)");
 0116
 0117                    b.Property<string>("NormalizedName")
 0118                        .IsRequired()
 0119                        .HasMaxLength(100)
 0120                        .HasColumnType("nvarchar(100)");
 0121
 0122                    b.HasKey("Id");
 0123
 0124                    b.HasIndex("NormalizedName")
 0125                        .IsUnique()
 0126                        .HasDatabaseName("RoleNameIndex");
 0127
 0128                    b.ToTable("AppRoles", (string)null);
 0129                });
 130
 0131            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0132                {
 0133                    b.Property<int>("Id")
 0134                        .ValueGeneratedOnAdd()
 0135                        .HasColumnType("int");
 0136
 0137                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0138
 0139                    b.Property<string>("ClaimType")
 0140                        .IsRequired()
 0141                        .HasMaxLength(200)
 0142                        .HasColumnType("nvarchar(200)");
 0143
 0144                    b.Property<string>("ClaimValue")
 0145                        .IsRequired()
 0146                        .HasMaxLength(200)
 0147                        .HasColumnType("nvarchar(200)");
 0148
 0149                    b.Property<int>("RoleId")
 0150                        .HasColumnType("int");
 0151
 0152                    b.HasKey("Id");
 0153
 0154                    b.HasIndex("RoleId");
 0155
 0156                    b.ToTable("AppRoleClaims", (string)null);
 0157                });
 158
 0159            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0160                {
 0161                    b.Property<int>("Id")
 0162                        .ValueGeneratedOnAdd()
 0163                        .HasColumnType("int");
 0164
 0165                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0166
 0167                    b.Property<int>("AccessFailedCount")
 0168                        .HasColumnType("int");
 0169
 0170                    b.Property<string>("ConcurrencyStamp")
 0171                        .IsConcurrencyToken()
 0172                        .HasColumnType("nvarchar(max)");
 0173
 0174                    b.Property<string>("Email")
 0175                        .IsRequired()
 0176                        .HasMaxLength(150)
 0177                        .HasColumnType("nvarchar(150)");
 0178
 0179                    b.Property<bool>("EmailConfirmed")
 0180                        .HasColumnType("bit");
 0181
 0182                    b.Property<string>("FirstName")
 0183                        .IsRequired()
 0184                        .HasMaxLength(100)
 0185                        .HasColumnType("nvarchar(100)");
 0186
 0187                    b.Property<bool>("IsActive")
 0188                        .HasColumnType("bit");
 0189
 0190                    b.Property<string>("LastName")
 0191                        .IsRequired()
 0192                        .HasMaxLength(100)
 0193                        .HasColumnType("nvarchar(100)");
 0194
 0195                    b.Property<bool>("LockoutEnabled")
 0196                        .HasColumnType("bit");
 0197
 0198                    b.Property<DateTimeOffset?>("LockoutEnd")
 0199                        .HasColumnType("datetimeoffset");
 0200
 0201                    b.Property<string>("NormalizedEmail")
 0202                        .IsRequired()
 0203                        .HasMaxLength(150)
 0204                        .HasColumnType("nvarchar(150)");
 0205
 0206                    b.Property<string>("NormalizedUserName")
 0207                        .IsRequired()
 0208                        .HasMaxLength(250)
 0209                        .HasColumnType("nvarchar(250)");
 0210
 0211                    b.Property<string>("PasswordHash")
 0212                        .HasColumnType("nvarchar(max)");
 0213
 0214                    b.Property<string>("PhoneNumber")
 0215                        .HasColumnType("nvarchar(max)");
 0216
 0217                    b.Property<bool>("PhoneNumberConfirmed")
 0218                        .HasColumnType("bit");
 0219
 0220                    b.Property<string>("SecurityStamp")
 0221                        .HasColumnType("nvarchar(max)");
 0222
 0223                    b.Property<bool>("TwoFactorEnabled")
 0224                        .HasColumnType("bit");
 0225
 0226                    b.Property<string>("UserName")
 0227                        .IsRequired()
 0228                        .HasMaxLength(250)
 0229                        .HasColumnType("nvarchar(250)");
 0230
 0231                    b.HasKey("Id");
 0232
 0233                    b.HasIndex("NormalizedEmail")
 0234                        .HasDatabaseName("EmailIndex");
 0235
 0236                    b.HasIndex("NormalizedUserName")
 0237                        .IsUnique()
 0238                        .HasDatabaseName("UserNameIndex");
 0239
 0240                    b.ToTable("AppUsers", (string)null);
 0241                });
 242
 0243            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0244                {
 0245                    b.Property<int>("Id")
 0246                        .ValueGeneratedOnAdd()
 0247                        .HasColumnType("int");
 0248
 0249                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0250
 0251                    b.Property<string>("ClaimType")
 0252                        .IsRequired()
 0253                        .HasMaxLength(200)
 0254                        .HasColumnType("nvarchar(200)");
 0255
 0256                    b.Property<string>("ClaimValue")
 0257                        .IsRequired()
 0258                        .HasMaxLength(200)
 0259                        .HasColumnType("nvarchar(200)");
 0260
 0261                    b.Property<int>("UserId")
 0262                        .HasColumnType("int");
 0263
 0264                    b.HasKey("Id");
 0265
 0266                    b.HasIndex("UserId");
 0267
 0268                    b.ToTable("AppUserClaims", (string)null);
 0269                });
 270
 0271            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0272                {
 0273                    b.Property<string>("LoginProvider")
 0274                        .HasColumnType("nvarchar(450)");
 0275
 0276                    b.Property<string>("ProviderKey")
 0277                        .HasColumnType("nvarchar(450)");
 0278
 0279                    b.Property<string>("ProviderDisplayName")
 0280                        .HasColumnType("nvarchar(max)");
 0281
 0282                    b.Property<int>("UserId")
 0283                        .HasColumnType("int");
 0284
 0285                    b.HasKey("LoginProvider", "ProviderKey");
 0286
 0287                    b.HasIndex("UserId");
 0288
 0289                    b.ToTable("AppUserLogins", (string)null);
 0290                });
 291
 0292            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0293                {
 0294                    b.Property<int>("UserId")
 0295                        .HasColumnType("int");
 0296
 0297                    b.Property<int>("RoleId")
 0298                        .HasColumnType("int");
 0299
 0300                    b.HasKey("UserId", "RoleId");
 0301
 0302                    b.HasIndex("RoleId");
 0303
 0304                    b.ToTable("AppUserRoles", (string)null);
 0305                });
 306
 0307            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0308                {
 0309                    b.Property<int>("UserId")
 0310                        .HasColumnType("int");
 0311
 0312                    b.Property<string>("LoginProvider")
 0313                        .HasColumnType("nvarchar(450)");
 0314
 0315                    b.Property<string>("Name")
 0316                        .HasColumnType("nvarchar(450)");
 0317
 0318                    b.Property<string>("Value")
 0319                        .HasColumnType("nvarchar(max)");
 0320
 0321                    b.HasKey("UserId", "LoginProvider", "Name");
 0322
 0323                    b.ToTable("AppUserTokens", (string)null);
 0324                });
 325
 0326            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0327                {
 0328                    b.Property<int>("Id")
 0329                        .ValueGeneratedOnAdd()
 0330                        .HasColumnType("int");
 0331
 0332                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0333
 0334                    b.Property<int>("AmountSubTotal")
 0335                        .HasColumnType("int");
 0336
 0337                    b.Property<int>("AmountTotal")
 0338                        .HasColumnType("int");
 0339
 0340                    b.Property<string>("Name")
 0341                        .IsRequired()
 0342                        .HasMaxLength(200)
 0343                        .HasColumnType("nvarchar(200)");
 0344
 0345                    b.Property<int>("Quantity")
 0346                        .HasColumnType("int");
 0347
 0348                    b.Property<string>("UserEmail")
 0349                        .IsRequired()
 0350                        .HasMaxLength(100)
 0351                        .HasColumnType("nvarchar(100)");
 0352
 0353                    b.HasKey("Id");
 0354
 0355                    b.ToTable("Invoices", (string)null);
 0356                });
 357
 0358            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0359                {
 0360                    b.Property<int>("Id")
 0361                        .ValueGeneratedOnAdd()
 0362                        .HasColumnType("int");
 0363
 0364                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0365
 0366                    b.Property<int>("AccessLevel")
 0367                        .HasColumnType("int");
 0368
 0369                    b.Property<string>("Author")
 0370                        .IsRequired()
 0371                        .HasMaxLength(200)
 0372                        .HasColumnType("nvarchar(200)");
 0373
 0374                    b.Property<DateTime>("DateRelease")
 0375                        .HasColumnType("datetime2");
 0376
 0377                    b.Property<string>("Description")
 0378                        .IsRequired()
 0379                        .HasMaxLength(1000)
 0380                        .HasColumnType("nvarchar(1000)");
 0381
 0382                    b.Property<string>("ImageName")
 0383                        .IsRequired()
 0384                        .HasMaxLength(200)
 0385                        .HasColumnType("nvarchar(200)");
 0386
 0387                    b.Property<string>("ImagePath")
 0388                        .IsRequired()
 0389                        .HasMaxLength(200)
 0390                        .HasColumnType("nvarchar(200)");
 0391
 0392                    b.Property<string>("Title")
 0393                        .IsRequired()
 0394                        .HasMaxLength(200)
 0395                        .HasColumnType("nvarchar(200)");
 0396
 0397                    b.HasKey("Id");
 0398
 0399                    b.ToTable("Musics", (string)null);
 0400                });
 401
 0402            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0403                {
 0404                    b.Property<int>("Id")
 0405                        .ValueGeneratedOnAdd()
 0406                        .HasColumnType("int");
 0407
 0408                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0409
 0410                    b.Property<int>("AmountTotal")
 0411                        .HasMaxLength(50)
 0412                        .HasColumnType("int");
 0413
 0414                    b.Property<string>("LineItems")
 0415                        .IsRequired()
 0416                        .HasMaxLength(10000)
 0417                        .HasColumnType("nvarchar(max)");
 0418
 0419                    b.Property<DateTime>("OrderDate")
 0420                        .HasColumnType("datetime2");
 0421
 0422                    b.Property<string>("OrderName")
 0423                        .IsRequired()
 0424                        .HasMaxLength(200)
 0425                        .HasColumnType("nvarchar(200)");
 0426
 0427                    b.Property<string>("UserEmail")
 0428                        .IsRequired()
 0429                        .HasMaxLength(100)
 0430                        .HasColumnType("nvarchar(100)");
 0431
 0432                    b.HasKey("Id");
 0433
 0434                    b.ToTable("Orders", (string)null);
 0435                });
 436
 0437            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0438                {
 0439                    b.Property<int>("Id")
 0440                        .ValueGeneratedOnAdd()
 0441                        .HasColumnType("int");
 0442
 0443                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0444
 0445                    b.Property<DateTime>("ReceiptDate")
 0446                        .HasColumnType("datetime2");
 0447
 0448                    b.Property<string>("ReceiptName")
 0449                        .IsRequired()
 0450                        .HasMaxLength(200)
 0451                        .HasColumnType("nvarchar(200)");
 0452
 0453                    b.Property<string>("ReceiptUrl")
 0454                        .IsRequired()
 0455                        .HasMaxLength(500)
 0456                        .HasColumnType("nvarchar(500)");
 0457
 0458                    b.Property<string>("UserEmail")
 0459                        .IsRequired()
 0460                        .HasMaxLength(100)
 0461                        .HasColumnType("nvarchar(100)");
 0462
 0463                    b.HasKey("Id");
 0464
 0465                    b.ToTable("Receipts", (string)null);
 0466                });
 467
 0468            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0469                {
 0470                    b.Property<int>("Id")
 0471                        .ValueGeneratedOnAdd()
 0472                        .HasColumnType("int");
 0473
 0474                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0475
 0476                    b.Property<DateTime>("CurrentPeriodEnd")
 0477                        .HasColumnType("datetime2");
 0478
 0479                    b.Property<DateTime>("CurrentPeriodStart")
 0480                        .HasColumnType("datetime2");
 0481
 0482                    b.Property<int>("CustomerId")
 0483                        .HasColumnType("int");
 0484
 0485                    b.Property<DateTime>("DateStart")
 0486                        .HasColumnType("datetime2");
 0487
 0488                    b.Property<string>("HostedInvoiceUrl")
 0489                        .IsRequired()
 0490                        .HasMaxLength(700)
 0491                        .HasColumnType("nvarchar(700)");
 0492
 0493                    b.Property<int>("Status")
 0494                        .HasMaxLength(50)
 0495                        .HasColumnType("int");
 0496
 0497                    b.Property<string>("StripeSubscriberSubscriptionId")
 0498                        .IsRequired()
 0499                        .HasMaxLength(500)
 0500                        .HasColumnType("nvarchar(500)");
 0501
 0502                    b.Property<int>("SubscriptionId")
 0503                        .HasColumnType("int");
 0504
 0505                    b.HasKey("Id");
 0506
 0507                    b.HasIndex("CustomerId");
 0508
 0509                    b.HasIndex("SubscriptionId");
 0510
 0511                    b.ToTable("Subscribers", (string)null);
 0512                });
 513
 0514            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0515                {
 0516                    b.Property<int>("Id")
 0517                        .ValueGeneratedOnAdd()
 0518                        .HasColumnType("int");
 0519
 0520                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0521
 0522                    b.Property<string>("ChargeType")
 0523                        .IsRequired()
 0524                        .HasMaxLength(25)
 0525                        .HasColumnType("nvarchar(25)");
 0526
 0527                    b.Property<string>("Currency")
 0528                        .IsRequired()
 0529                        .HasMaxLength(25)
 0530                        .HasColumnType("nvarchar(25)");
 0531
 0532                    b.Property<string>("CurrencySymbol")
 0533                        .IsRequired()
 0534                        .HasMaxLength(5)
 0535                        .HasColumnType("nvarchar(5)");
 0536
 0537                    b.Property<string>("ImageName")
 0538                        .IsRequired()
 0539                        .HasMaxLength(200)
 0540                        .HasColumnType("nvarchar(200)");
 0541
 0542                    b.Property<string>("ImagePath")
 0543                        .IsRequired()
 0544                        .HasMaxLength(200)
 0545                        .HasColumnType("nvarchar(200)");
 0546
 0547                    b.Property<string>("Name")
 0548                        .IsRequired()
 0549                        .HasMaxLength(200)
 0550                        .HasColumnType("nvarchar(200)");
 0551
 0552                    b.Property<string>("Options")
 0553                        .IsRequired()
 0554                        .HasMaxLength(1000)
 0555                        .HasColumnType("nvarchar(1000)");
 0556
 0557                    b.Property<int>("Price")
 0558                        .HasColumnType("int");
 0559
 0560                    b.Property<string>("StripeSubscriptionId")
 0561                        .IsRequired()
 0562                        .HasColumnType("nvarchar(max)");
 0563
 0564                    b.HasKey("Id");
 0565
 0566                    b.ToTable("Subscriptions", (string)null);
 0567                });
 568
 0569            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoItem", b =>
 0570                {
 0571                    b.Property<int>("Id")
 0572                        .ValueGeneratedOnAdd()
 0573                        .HasColumnType("int");
 0574
 0575                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0576
 0577                    b.Property<bool>("Done")
 0578                        .HasColumnType("bit");
 0579
 0580                    b.Property<int>("ListId")
 0581                        .HasColumnType("int");
 0582
 0583                    b.Property<string>("Note")
 0584                        .HasMaxLength(1000)
 0585                        .HasColumnType("nvarchar(1000)");
 0586
 0587                    b.Property<int>("Priority")
 0588                        .HasColumnType("int");
 0589
 0590                    b.Property<int>("State")
 0591                        .HasColumnType("int");
 0592
 0593                    b.Property<string>("Title")
 0594                        .IsRequired()
 0595                        .HasMaxLength(200)
 0596                        .HasColumnType("nvarchar(200)");
 0597
 0598                    b.HasKey("Id");
 0599
 0600                    b.HasIndex("ListId");
 0601
 0602                    b.ToTable("TodoItems", (string)null);
 0603                });
 604
 0605            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoList", b =>
 0606                {
 0607                    b.Property<int>("Id")
 0608                        .ValueGeneratedOnAdd()
 0609                        .HasColumnType("int");
 0610
 0611                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0612
 0613                    b.Property<string>("Title")
 0614                        .IsRequired()
 0615                        .HasMaxLength(200)
 0616                        .HasColumnType("nvarchar(200)");
 0617
 0618                    b.HasKey("Id");
 0619
 0620                    b.ToTable("TodoLists", (string)null);
 0621                });
 622
 0623            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0624                {
 0625                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0626                        .WithMany()
 0627                        .HasForeignKey("ClotheId");
 0628
 0629                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0630                        .WithMany()
 0631                        .HasForeignKey("UserId");
 0632
 0633                    b.Navigation("Clothe");
 0634
 0635                    b.Navigation("User");
 0636                });
 637
 0638            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0639                {
 0640                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0641                        .WithMany("Claims")
 0642                        .HasForeignKey("RoleId")
 0643                        .OnDelete(DeleteBehavior.Cascade)
 0644                        .IsRequired();
 0645
 0646                    b.Navigation("Role");
 0647                });
 648
 0649            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0650                {
 0651                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0652                        .WithMany("Claims")
 0653                        .HasForeignKey("UserId")
 0654                        .OnDelete(DeleteBehavior.Cascade)
 0655                        .IsRequired();
 0656
 0657                    b.Navigation("User");
 0658                });
 659
 0660            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0661                {
 0662                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0663                        .WithMany("Logins")
 0664                        .HasForeignKey("UserId")
 0665                        .OnDelete(DeleteBehavior.Cascade)
 0666                        .IsRequired();
 0667
 0668                    b.Navigation("User");
 0669                });
 670
 0671            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0672                {
 0673                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0674                        .WithMany("Users")
 0675                        .HasForeignKey("RoleId")
 0676                        .OnDelete(DeleteBehavior.Cascade)
 0677                        .IsRequired();
 0678
 0679                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0680                        .WithMany("Roles")
 0681                        .HasForeignKey("UserId")
 0682                        .OnDelete(DeleteBehavior.Cascade)
 0683                        .IsRequired();
 0684
 0685                    b.Navigation("Role");
 0686
 0687                    b.Navigation("User");
 0688                });
 689
 0690            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0691                {
 0692                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0693                        .WithMany("UserTokens")
 0694                        .HasForeignKey("UserId")
 0695                        .OnDelete(DeleteBehavior.Cascade)
 0696                        .IsRequired();
 0697
 0698                    b.Navigation("User");
 0699                });
 700
 0701            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0702                {
 0703                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0704                        .WithMany()
 0705                        .HasForeignKey("CustomerId")
 0706                        .OnDelete(DeleteBehavior.Cascade)
 0707                        .IsRequired();
 0708
 0709                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0710                        .WithMany()
 0711                        .HasForeignKey("SubscriptionId")
 0712                        .OnDelete(DeleteBehavior.Cascade)
 0713                        .IsRequired();
 0714
 0715                    b.Navigation("Customer");
 0716
 0717                    b.Navigation("Subscription");
 0718                });
 719
 0720            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoItem", b =>
 0721                {
 0722                    b.HasOne("BlazorShop.Domain.Entities.TodoList", "List")
 0723                        .WithMany("Items")
 0724                        .HasForeignKey("ListId")
 0725                        .OnDelete(DeleteBehavior.Cascade)
 0726                        .IsRequired();
 0727
 0728                    b.Navigation("List");
 0729                });
 730
 0731            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0732                {
 0733                    b.Navigation("Claims");
 0734
 0735                    b.Navigation("Users");
 0736                });
 737
 0738            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0739                {
 0740                    b.Navigation("Claims");
 0741
 0742                    b.Navigation("Logins");
 0743
 0744                    b.Navigation("Roles");
 0745
 0746                    b.Navigation("UserTokens");
 0747                });
 748
 0749            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoList", b =>
 0750                {
 0751                    b.Navigation("Items");
 0752                });
 753#pragma warning restore 612, 618
 0754        }
 755    }
 756}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContextSeed.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContextSeed.html deleted file mode 100644 index a16c8752..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ApplicationDbContextSeed.html +++ /dev/null @@ -1,562 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.ApplicationDbContextSeed - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.ApplicationDbContextSeed
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\ApplicationDbContextSeed.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:317
Coverable lines:317
Total lines:385
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:20
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
SeedRolesAsync()0%60%
SeedAdminUserAsync()0%40%
SeedClothesDataAsync()0%20%
SeedMusicsDataAsync()0%20%
SeedSubscriptionsDataAsync()0%20%
SeedTodosDataAsync()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\ApplicationDbContextSeed.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ApplicationDbContextSeed.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence
 6{
 7    /// <summary>
 8    /// The database seed data to run at runtime.
 9    /// </summary>
 10    public static class ApplicationDbContextSeed
 11    {
 12        /// <summary>
 13        /// Adding the roles data when the app is deploy the first time.
 14        /// </summary>
 15        /// <param name="roleManager">The instance of <see cref="RoleManager{Role}"/> to use.</param>
 16        /// <param name="seedData">The seed data.</param>
 17        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 18        public static async Task SeedRolesAsync(RoleManager<Role> roleManager, RolesSeedModel seedData)
 019        {
 020            var adminRole = new Role
 021            {
 022                Name = seedData.AdminRoleName,
 023                NormalizedName = seedData.AdminRoleNormalizedName,
 024            };
 025            var defaultRole = new Role
 026            {
 027                Name = seedData.DefaultRoleName,
 028                NormalizedName = seedData.DefaultRoleNormalizedName,
 029            };
 030            var userRole = new Role
 031            {
 032                Name = seedData.UserRoleName,
 033                NormalizedName = seedData.UserRoleNormalizedName,
 034            };
 35
 036            if (roleManager.Roles.All(r => r.Name != adminRole.Name))
 037            {
 038                await roleManager.CreateAsync(adminRole);
 039            }
 40
 041            if (roleManager.Roles.All(r => r.Name != defaultRole.Name))
 042            {
 043                await roleManager.CreateAsync(defaultRole);
 044            }
 45
 046            if (roleManager.Roles.All(r => r.Name != userRole.Name))
 047            {
 048                await roleManager.CreateAsync(userRole);
 049            }
 050        }
 51
 52        /// <summary>
 53        /// Adding the admin data when the app is deploy the first time.
 54        /// </summary>
 55        /// <param name="userManager">The instance of <see cref="UserManager{User}"/> to use.</param>
 56        /// <param name="roleManager">The instance of <see cref="RoleManager{Role}"/> to use.</param>
 57        /// <param name="seedData">The seed data.</param>
 58        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 59        public static async Task SeedAdminUserAsync(UserManager<User> userManager, RoleManager<Role> roleManager, AdminS
 060        {
 061            var admin = new User
 062            {
 063                UserName = seedData.FirstName + "@" + seedData.LastName,
 064                Email = seedData.Email,
 065                FirstName = seedData.FirstName,
 066                LastName = seedData.LastName,
 067                IsActive = true,
 068            };
 069            var adminRole = roleManager.Roles.Where(x => x.Name == seedData.RoleName).FirstOrDefault();
 070            if (adminRole == null)
 071            {
 072                throw new Exception("The selected role does not exists.");
 73            }
 74
 075            if (userManager.Users.All(u => u.Email != admin.Email))
 076            {
 077                await userManager.CreateAsync(admin, seedData.Password);
 078                await userManager.AddToRoleAsync(admin, adminRole.Name);
 079            }
 080        }
 81
 82        /// <summary>
 83        /// Adding the clothes data when the app is deploy the first time.
 84        /// </summary>
 85        /// <param name="context">The instance of <see cref="IApplicationDbContext"/> to use.</param>
 86        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 87        public static async Task SeedClothesDataAsync(ApplicationDbContext context)
 088        {
 089            if (!context.Clothes.Any())
 090            {
 091                context.Clothes.Add(new Clothe
 092                {
 093                    Name = "Jeans 1",
 094                    Description = "asdsad sdasd sad asd dsa",
 095                    Price = new decimal(344.00), Amount = 12,
 096                    ImageName = "buy-3",
 097                    ImagePath = "buy-3.jpg",
 098                    IsActive = true,
 099                });
 0100                context.Clothes.Add(new Clothe
 0101                {
 0102                    Name = "Shoes 1",
 0103                    Description = "sadf adas das dasdasd",
 0104                    Price = new decimal(412.00),
 0105                    Amount = 3,
 0106                    ImageName = "category-1",
 0107                    ImagePath = "category-1.jpg",
 0108                    IsActive = true,
 0109                });
 0110                context.Clothes.Add(new Clothe
 0111                {
 0112                    Name = "Shoes 3",
 0113                    Description = "as asd asd asdsa d asdas asda sdasd",
 0114                    Price = new decimal(702.00),
 0115                    Amount = 16,
 0116                    ImageName = "category-2",
 0117                    ImagePath = "category-2.jpg",
 0118                    IsActive = true,
 0119                });
 0120                context.Clothes.Add(new Clothe
 0121                {
 0122                    Name = "Shoes 4",
 0123                    Description = "adsa sdas das das das dasdasd asdasdasd",
 0124                    Price = new decimal(353.00),
 0125                    Amount = 6,
 0126                    ImageName = "product-2",
 0127                    ImagePath = "product-2.jpg",
 0128                    IsActive = true,
 0129                });
 0130                context.Clothes.Add(new Clothe
 0131                {
 0132                    Name = "Jeans 2",
 0133                    Description = "dasd asd asdas dasdasdasdasd asdasdasdasd",
 0134                    Price = new decimal(1243.00),
 0135                    Amount = 13,
 0136                    ImageName = "product-3",
 0137                    ImagePath = "product-3.jpg",
 0138                    IsActive = true,
 0139                });
 0140                context.Clothes.Add(new Clothe
 0141                {
 0142                    Name = "T-shirt 1",
 0143                    Description = "fdg dfgdfgdf gdf gdfgdfdfg df",
 0144                    Price = new decimal(223.00),
 0145                    Amount = 10,
 0146                    ImageName = "product-4",
 0147                    ImagePath = "product-4.jpg",
 0148                    IsActive = true,
 0149                });
 0150                context.Clothes.Add(new Clothe
 0151                {
 0152                    Name = "Shoes 5",
 0153                    Description = "as asd as  sadas sad sa sd asdas",
 0154                    Price = new decimal(456.00),
 0155                    Amount = 3,
 0156                    ImageName = "product-5",
 0157                    ImagePath = "product-5.jpg",
 0158                    IsActive = true,
 0159                });
 0160                context.Clothes.Add(new Clothe
 0161                {
 0162                    Name = "T-shirt 2",
 0163                    Description = "sdf sdfsd sd dsf sdf sd fsdfds",
 0164                    Price = new decimal(324.00),
 0165                    Amount = 4,
 0166                    ImageName = "product-6",
 0167                    ImagePath = "product-6.jpg",
 0168                    IsActive = true,
 0169                });
 0170                context.Clothes.Add(new Clothe
 0171                {
 0172                    Name = "Socks",
 0173                    Description = "df fdg fdg dfg dfgdfgdfgfdgdfg",
 0174                    Price = new decimal(106.00),
 0175                    Amount = 8,
 0176                    ImageName = "product-7",
 0177                    ImagePath = "product-7.jpg",
 0178                    IsActive = true,
 0179                });
 0180                context.Clothes.Add(new Clothe
 0181                {
 0182                    Name = "Shoes 6",
 0183                    Description = "fdsf sdf sdfsdfsd sd sdf sdf sdfsd fsdf d  dfd fd d fd",
 0184                    Price = new decimal(353.00),
 0185                    Amount = 5,
 0186                    ImageName = "product-10",
 0187                    ImagePath = "product-10.jpg",
 0188                    IsActive = true,
 0189                });
 0190                context.Clothes.Add(new Clothe
 0191                {
 0192                    Name = "Shoes 7",
 0193                    Description = "asd asd asdf fg  hsd sdfs fdsg fg hsd",
 0194                    Price = new decimal(765.00),
 0195                    Amount = 8,
 0196                    ImageName = "product-11",
 0197                    ImagePath = "product-11.jpg",
 0198                    IsActive = true,
 0199                });
 0200                context.Clothes.Add(new Clothe
 0201                {
 0202                    Name = "Jeans 3",
 0203                    Description = "as  asd asd fgf ds sd fds sdf sfsd sdfsdf",
 0204                    Price = new decimal(867.00),
 0205                    Amount = 17,
 0206                    ImageName = "product-12",
 0207                    ImagePath = "product-12.jpg",
 0208                    IsActive = true,
 0209                });
 210
 0211                await context.SaveChangesAsync();
 0212            }
 0213        }
 214
 215        /// <summary>
 216        /// Adding the musics data when the app is deploy the first time.
 217        /// </summary>
 218        /// <param name="context">The instance of <see cref="IApplicationDbContext"/> to use.</param>
 219        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 220        public static async Task SeedMusicsDataAsync(ApplicationDbContext context)
 0221        {
 0222            if (!context.Musics.Any())
 0223            {
 0224                context.Musics.Add(new Music
 0225                {
 0226                    Title = "Green Day: American Idiot",
 0227                    Description = "Green Day were a defining band for a whole generation of kids in the 00s, and their s
 0228                    Author = "Lizzie Manno",
 0229                    DateRelease = new DateTime(2020, 12, 25),
 0230                    ImageName = "music-1",
 0231                    ImagePath = "music-1.jpg",
 0232                    AccessLevel = 1,
 0233                });
 0234                context.Musics.Add(new Music
 0235                {
 0236                    Title = "Supergrass: In It For The Money",
 0237                    Description = "Though Britpop stalwarts Supergrass were unfairly overshadowed by Oasis, Blur and Pul
 0238                    Author = "Lizzie Manno",
 0239                    DateRelease = new DateTime(2022, 1, 15),
 0240                    ImageName = "music-2",
 0241                    ImagePath = "music-2.jpg",
 0242                    AccessLevel = 1,
 0243                });
 0244                context.Musics.Add(new Music
 0245                {
 0246                    Title = "Joni Mitchell: Blue",
 0247                    Description = "The first side of Joni Mitchells fourth studio album Blue ends with its title track, 
 0248                    Author = "Robert Ham",
 0249                    DateRelease = new DateTime(2019, 8, 30),
 0250                    ImageName = "music-3",
 0251                    ImagePath = "music-3.jpg",
 0252                    AccessLevel = 2,
 0253                });
 0254                context.Musics.Add(new Music
 0255                {
 0256                    Title = "Brandi Carlile: The Story",
 0257                    Description = "Brandi Carlile doesnt just tell The Story, she releases it. The title track from her 
 0258                    Author = "Ellen Johnson",
 0259                    DateRelease = new DateTime(2011, 11, 11),
 0260                    ImageName = "music-4",
 0261                    ImagePath = "music-4.jpg",
 0262                    AccessLevel = 2,
 0263                });
 0264                context.Musics.Add(new Music
 0265                {
 0266                    Title = "Cher: Believe",
 0267                    Description = "Cher is an icon. Since the 1970s, shes been flawlessly transforming herself with ever
 0268                    Author = "Annie Black",
 0269                    DateRelease = new DateTime(2022, 1, 19),
 0270                    ImageName = "music-5",
 0271                    ImagePath = "music-5.jpg",
 0272                    AccessLevel = 2,
 0273                });
 0274                context.Musics.Add(new Music
 0275                {
 0276                    Title = "Kevin Morby: City Music",
 0277                    Description = "Kevin Morbys fourth solo album is a dusky ode to urban life, and its core is its seve
 0278                    Author = "Ben Salmon",
 0279                    DateRelease = new DateTime(2015, 5, 15),
 0280                    ImageName = "music-6",
 0281                    ImagePath = "music-6.jpg",
 0282                    AccessLevel = 3,
 0283                });
 0284                context.Musics.Add(new Music
 0285                {
 0286                    Title = "Mitski, 'The Only Heartbreaker'",
 0287                    Description = "Mitski couldn’t let 2021 end without dropping by to say hello, igniting an Eighties f
 0288                    Author = "Ben Salmon",
 0289                    DateRelease = new DateTime(2013, 9, 15),
 0290                    ImageName = "music-2",
 0291                    ImagePath = "music-2.jpg",
 0292                    AccessLevel = 3,
 0293                });
 0294                context.Musics.Add(new Music
 0295                {
 0296                    Title = "Kevin: City Music English",
 0297                    Description = "Kevin Morbys fourth solo album is a dusky ode to urban life, and its core is its seve
 0298                    Author = "Martin Salmon",
 0299                    DateRelease = new DateTime(2019, 5, 15),
 0300                    ImageName = "music-6",
 0301                    ImagePath = "music-6.jpg",
 0302                    AccessLevel = 3,
 0303                });
 304
 0305                await context.SaveChangesAsync();
 0306            }
 0307        }
 308
 309        /// <summary>
 310        /// Adding the subscription data when the app is deploy the first time.
 311        /// </summary>
 312        /// <param name="context">The instance of <see cref="IApplicationDbContext"/> to use.</param>
 313        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 314        public static async Task SeedSubscriptionsDataAsync(ApplicationDbContext context)
 0315        {
 0316            if (!context.Subscriptions.Any())
 0317            {
 0318                context.Subscriptions.Add(new Subscription
 0319                {
 0320                    Name = "Basic",
 0321                    Price = 10,
 0322                    Currency = "usd",
 0323                    CurrencySymbol = "$",
 0324                    ChargeType = "month",
 0325                    Options = "3 music songs included, Email support, 25% discount",
 0326                    StripeSubscriptionId = "price_1KKjybAtLEfG8Jr34XNaPOQ7",
 0327                    ImageName = "Basic Subscription",
 0328                    ImagePath = "basic_subscription.png",
 0329                });
 0330                context.Subscriptions.Add(new Subscription
 0331                {
 0332                    Name = "Pro",
 0333                    Price = 25,
 0334                    Currency = "usd",
 0335                    CurrencySymbol = "$",
 0336                    ChargeType = "month",
 0337                    Options = "5 music songs included, Priority Email support, 40% discount",
 0338                    StripeSubscriptionId = "price_1KKk3pAtLEfG8Jr3bF6j5iC4",
 0339                    ImageName = "Pro Subscription",
 0340                    ImagePath = "pro_subscription.png",
 0341                });
 0342                context.Subscriptions.Add(new Subscription
 0343                {
 0344                    Name = "Enterprise",
 0345                    Price = 50,
 0346                    Currency = "usd",
 0347                    CurrencySymbol = "$",
 0348                    ChargeType = "month",
 0349                    Options = "all music songs included, Phone and email support, Help center access",
 0350                    StripeSubscriptionId = "price_1KKk4AAtLEfG8Jr3HmFEpJkm",
 0351                    ImageName = "Enterprise Subscription",
 0352                    ImagePath = "enterprise_subscription.jpg",
 0353                });
 354
 0355                await context.SaveChangesAsync();
 0356            }
 0357        }
 358
 359        /// <summary>
 360        /// Adding the todos data when the app is deploy the first time.
 361        /// </summary>
 362        /// <param name="context">The instance of <see cref="IApplicationDbContext"/> to use.</param>
 363        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 364        public static async Task SeedTodosDataAsync(ApplicationDbContext context)
 0365        {
 0366            if (!context.TodoLists.Any())
 0367            {
 0368                context.TodoLists.Add(new TodoList { Title = "Todo List" });
 0369                await context.SaveChangesAsync();
 0370            }
 371
 0372            if (!context.TodoItems.Any())
 0373            {
 0374                var list = context.TodoLists.FirstOrDefault(x => x.Id == 1);
 375
 0376                context.TodoItems.Add(new TodoItem { List = list, Title = "Make a todo list" });
 0377                context.TodoItems.Add(new TodoItem { List = list, Title = "Check off the first item" });
 0378                context.TodoItems.Add(new TodoItem { List = list, Title = "Realise you've already done two things on the
 0379                context.TodoItems.Add(new TodoItem { List = list, Title = "Reward yourself with a nice, long nap" });
 380
 0381                await context.SaveChangesAsync();
 0382            }
 0383        }
 384    }
 385}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_CartConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_CartConfiguration.html deleted file mode 100644 index be60e254..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_CartConfiguration.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.CartConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.CartConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\CartConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:12
Uncovered lines:0
Coverable lines:12
Total lines:31
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\CartConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CartConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Cart"/>.
 9    /// </summary>
 10    public class CartConfiguration : IEntityTypeConfiguration<Cart>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Cart> builder)
 217        {
 218            builder.ToTable("Carts");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.Name)
 222                .HasMaxLength(200)
 223                .IsRequired();
 224            builder.Property(p => p.Price)
 225                .HasColumnType("decimal(18, 2)")
 226                .IsRequired();
 227            builder.Property(t => t.Amount)
 228                .IsRequired();
 229        }
 30    }
 31}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ClotheConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ClotheConfiguration.html deleted file mode 100644 index d40fa525..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ClotheConfiguration.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.ClotheConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.ClotheConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\ClotheConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:23
Uncovered lines:0
Coverable lines:23
Total lines:42
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\ClotheConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ClotheConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Clothe"/>.
 9    /// </summary>
 10    public class ClotheConfiguration : IEntityTypeConfiguration<Clothe>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Clothe> builder)
 217        {
 218            builder.ToTable("Clothes");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.Name)
 222                .HasMaxLength(200)
 223                .IsRequired();
 224            builder.Property(t => t.Description)
 225                .HasMaxLength(1000)
 226                .IsRequired();
 227            builder.Property(p => p.Price)
 228                .HasColumnType("decimal(18, 2)")
 229                .IsRequired();
 230            builder.Property(p => p.Amount)
 231                .IsRequired();
 232            builder.Property(t => t.ImageName)
 233                .HasMaxLength(200)
 234                .IsRequired();
 235            builder.Property(t => t.ImagePath)
 236                .HasMaxLength(200)
 237                .IsRequired();
 238            builder.Property(t => t.IsActive)
 239                .IsRequired();
 240        }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_DateTimeService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_DateTimeService.html deleted file mode 100644 index 4aa46579..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_DateTimeService.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Services.DateTimeService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Services.DateTimeService
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\DateTimeService.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:17
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Now()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\DateTimeService.cs

-
- - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DateTimeService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IDateTimeService"/>.
 9    /// </summary>
 10    public class DateTimeService : IDateTimeService
 11    {
 12        /// <summary>
 13        /// Gets the current time.
 14        /// </summary>
 015        public DateTime Now => DateTime.Now;
 16    }
 17}
-
-
-
-
-

Methods/Properties

-get_Now()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_DependencyInjection.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_DependencyInjection.html deleted file mode 100644 index 7aa21a34..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_DependencyInjection.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.DependencyInjection - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.DependencyInjection
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\DependencyInjection.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:32
Coverable lines:32
Total lines:59
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
AddInfrastructureLayer(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\DependencyInjection.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DependencyInjection.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure
 6{
 7    /// <summary>
 8    /// Extension methods on <see cref="IServiceCollection"/> at Infrastructure level.
 9    /// </summary>
 10    public static class DependencyInjection
 11    {
 12        /// <summary>
 13        /// Make service modules available to the infrastructure level via dependancy injection.
 14        /// </summary>
 15        /// <param name="services">The <see cref="IServiceCollection"/> instance to use.</param>
 16        /// <param name="configuration">The <see cref="IConfiguration"/> instance to use.</param>
 17        /// <returns>The services collection.</returns>
 18        public static IServiceCollection AddInfrastructureLayer(this IServiceCollection services, IConfiguration configu
 019        {
 020            services.AddDbContext<ApplicationDbContext>(options =>
 021                options.UseSqlServer(
 022                    configuration["ConnectionStrings:WebApiConnection"],
 023                    b => b.MigrationsAssembly(typeof(ApplicationDbContext).Assembly.FullName)));
 24
 25            // Inject services
 026            services.AddScoped<IApplicationDbContext>(provider => provider.GetRequiredService<ApplicationDbContext>());
 27
 028            services.AddTransient<IAccountService, AccountService>();
 029            services.AddTransient<IUserService, UserService>();
 030            services.AddTransient<IRoleService, RoleService>();
 31
 032            services.AddTransient<IDateTimeService, DateTimeService>();
 033            services.AddTransient<IEmailService, EmailService>();
 34
 035            var builder = services.AddIdentityCore<User>(opt =>
 036            {
 037                // configure password options & others
 038                opt.Password.RequireDigit = true;
 039                opt.Password.RequireLowercase = true;
 040                opt.Password.RequireNonAlphanumeric = true;
 041                opt.Password.RequireUppercase = true;
 042                opt.Password.RequiredLength = 6;
 043                opt.Password.RequiredUniqueChars = 1;
 044                opt.User.RequireUniqueEmail = true;
 045            });
 046            builder = new IdentityBuilder(builder.UserType, builder.RoleType, builder.Services);
 047            builder.AddRoles<Role>().AddEntityFrameworkStores<ApplicationDbContext>().AddDefaultTokenProviders();
 48
 049            services.AddAuthorizationCore(config =>
 050            {
 051                config.AddPolicy(StringRoleResources.Admin, policy => policy.RequireRole(ClaimTypes.Role, StringRoleReso
 052                config.AddPolicy(StringRoleResources.User, policy => policy.RequireRole(ClaimTypes.Role, StringRoleResou
 053                config.AddPolicy(StringRoleResources.Default, policy => policy.RequireRole(ClaimTypes.Role, StringRoleRe
 054            });
 55
 056            return services;
 057        }
 58    }
 59}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_EmailService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_EmailService.html deleted file mode 100644 index f46da98b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_EmailService.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Services.EmailService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Services.EmailService
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\EmailService.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:56
Coverable lines:56
Total lines:101
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:2
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
SendEmail()0%20%
AddImageLogo()100%10%
Add(...)100%10%
GetEmbeddedImage(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\EmailService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="EmailService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IEmailService"/>.
 9    /// </summary>
 10    public class EmailService : IEmailService
 11    {
 12        /// <inheritdoc/>
 13        public async Task SendEmail(string? email, EmailSettings mail)
 014        {
 015            if (string.IsNullOrEmpty(email))
 016            {
 017                throw new ArgumentNullException("The email should not be null or empty.");
 18            }
 19
 020            using (var client = new SmtpClient())
 021            {
 022                var credential = new NetworkCredential
 023                {
 024                    UserName = mail.Username,
 025                    Password = mail.Password,
 026                };
 27
 028                client.Credentials = credential;
 029                client.Host = mail.Host;
 030                client.Port = mail.Port;
 031                client.EnableSsl = true;
 32
 033                using var mailMessage = new MailMessage();
 034                mailMessage.To.Add(new MailAddress(email));
 035                mailMessage.From = new MailAddress(mail.Username);
 036                mailMessage.Subject = mail.Subject;
 037                mailMessage.Body = mail.Message;
 038                mailMessage.Priority = MailPriority.High;
 39
 040                client.Send(mailMessage);
 041            }
 42
 043            await Task.CompletedTask;
 044        }
 45
 46        /// <summary>
 47        /// Add image to the mail content.
 48        /// </summary>
 49        /// <returns>The view with the image.</returns>
 50        private static AlternateView AddImageLogo()
 051        {
 52            // In text where the image will be placed an cid:image must be set
 053            AlternateView avHtml = AlternateView.CreateAlternateViewFromString("Email Template", null, MediaTypeNames.Te
 054            LinkedResource inline = new ("filename.jpg", MediaTypeNames.Image.Jpeg)
 055            {
 056                ContentId = Guid.NewGuid().ToString(),
 057            };
 058            avHtml.LinkedResources.Add(inline);
 059            Attachment att = new ("filePath");
 060            att.ContentDisposition.Inline = true;
 061            return avHtml;
 062        }
 63
 64        /// <summary>
 65        /// Adding an attachment to the mail body.
 66        /// </summary>
 67        /// <param name="attachmentFilename">The attachment to be added to the mail.</param>
 68        /// <returns>The attachment.</returns>
 69        private static Attachment Add(Stream attachmentFilename)
 070        {
 071            Attachment attachment = new (attachmentFilename, MediaTypeNames.Application.Octet);
 072            ContentDisposition disposition = attachment.ContentDisposition;
 73
 074            disposition.CreationDate = File.GetCreationTime(attachmentFilename.ToString());
 075            disposition.ModificationDate = File.GetLastWriteTime(attachmentFilename.ToString());
 076            disposition.ReadDate = File.GetLastAccessTime(attachmentFilename.ToString());
 077            disposition.FileName = Path.GetFileName(attachmentFilename.ToString());
 078            disposition.Size = new FileInfo(attachmentFilename.ToString()).Length;
 079            disposition.DispositionType = DispositionTypeNames.Attachment;
 80
 081            return attachment;
 082        }
 83
 84        /// <summary>
 85        /// Creates an alternate view for the mail.
 86        /// </summary>
 87        /// <param name="filePath">The path for the file to create a view.</param>
 88        /// <param name="htmlBody">The body in html format.</param>
 89        /// <returns>The alternate view of the email.</returns>
 90        private static AlternateView GetEmbeddedImage(string? filePath, string? htmlBody)
 091        {
 092            LinkedResource res = new (filePath)
 093            {
 094                ContentId = "logo",
 095            };
 096            AlternateView alternateView = AlternateView.CreateAlternateViewFromString(htmlBody, null, MediaTypeNames.Tex
 097            alternateView.LinkedResources.Add(res);
 098            return alternateView;
 099        }
 100    }
 101}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_InvoiceConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_InvoiceConfiguration.html deleted file mode 100644 index db3eb67f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_InvoiceConfiguration.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.InvoiceConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.InvoiceConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\InvoiceConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:16
Uncovered lines:0
Coverable lines:16
Total lines:35
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\InvoiceConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="InvoiceConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Invoice"/>.
 9    /// </summary>
 10    public class InvoiceConfiguration : IEntityTypeConfiguration<Invoice>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Invoice> builder)
 217        {
 218            builder.ToTable("Invoices");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.UserEmail)
 222                .HasMaxLength(100)
 223                .IsRequired();
 224            builder.Property(t => t.Name)
 225                .HasMaxLength(200)
 226                .IsRequired();
 227            builder.Property(t => t.AmountSubTotal)
 228                .IsRequired();
 229            builder.Property(t => t.AmountTotal)
 230                .IsRequired();
 231            builder.Property(t => t.Quantity)
 232                .IsRequired();
 233        }
 34    }
 35}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration12.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration12.html deleted file mode 100644 index 1714046c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration12.html +++ /dev/null @@ -1,1009 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration12 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:758
Coverable lines:758
Total lines:830
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220209210341_Migration-12.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration12 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.CreateTable(
 015                name: "TodoLists",
 016                columns: table => new
 017                {
 018                    Id = table.Column<int>(type: "int", nullable: false)
 019                        .Annotation("SqlServer:Identity", "1, 1"),
 020                    Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false)
 021                },
 022                constraints: table =>
 023                {
 024                    table.PrimaryKey("PK_TodoLists", x => x.Id);
 025                });
 26
 027            migrationBuilder.CreateTable(
 028                name: "TodoItems",
 029                columns: table => new
 030                {
 031                    Id = table.Column<int>(type: "int", nullable: false)
 032                        .Annotation("SqlServer:Identity", "1, 1"),
 033                    Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 034                    Note = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
 035                    Priority = table.Column<int>(type: "int", nullable: false),
 036                    State = table.Column<int>(type: "int", nullable: false),
 037                    Done = table.Column<bool>(type: "bit", nullable: false),
 038                    ListId = table.Column<int>(type: "int", nullable: false)
 039                },
 040                constraints: table =>
 041                {
 042                    table.PrimaryKey("PK_TodoItems", x => x.Id);
 043                    table.ForeignKey(
 044                        name: "FK_TodoItems_TodoLists_ListId",
 045                        column: x => x.ListId,
 046                        principalTable: "TodoLists",
 047                        principalColumn: "Id",
 048                        onDelete: ReferentialAction.Cascade);
 049                });
 50
 051            migrationBuilder.CreateIndex(
 052                name: "IX_TodoItems_ListId",
 053                table: "TodoItems",
 054                column: "ListId");
 055        }
 56
 57        protected override void Down(MigrationBuilder migrationBuilder)
 058        {
 059            migrationBuilder.DropTable(
 060                name: "TodoItems");
 61
 062            migrationBuilder.DropTable(
 063                name: "TodoLists");
 064        }
 65    }
 66}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220209210341_Migration-12.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220209210341_Migration-12")]
 18    partial class Migration12
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .IsRequired()
 0121                        .HasMaxLength(100)
 0122                        .HasColumnType("nvarchar(100)");
 0123
 0124                    b.Property<string>("NormalizedName")
 0125                        .IsRequired()
 0126                        .HasMaxLength(100)
 0127                        .HasColumnType("nvarchar(100)");
 0128
 0129                    b.HasKey("Id");
 0130
 0131                    b.HasIndex("NormalizedName")
 0132                        .IsUnique()
 0133                        .HasDatabaseName("RoleNameIndex");
 0134
 0135                    b.ToTable("AppRoles", (string)null);
 0136                });
 137
 0138            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0139                {
 0140                    b.Property<int>("Id")
 0141                        .ValueGeneratedOnAdd()
 0142                        .HasColumnType("int");
 0143
 0144                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0145
 0146                    b.Property<string>("ClaimType")
 0147                        .IsRequired()
 0148                        .HasMaxLength(200)
 0149                        .HasColumnType("nvarchar(200)");
 0150
 0151                    b.Property<string>("ClaimValue")
 0152                        .IsRequired()
 0153                        .HasMaxLength(200)
 0154                        .HasColumnType("nvarchar(200)");
 0155
 0156                    b.Property<int>("RoleId")
 0157                        .HasColumnType("int");
 0158
 0159                    b.HasKey("Id");
 0160
 0161                    b.HasIndex("RoleId");
 0162
 0163                    b.ToTable("AppRoleClaims", (string)null);
 0164                });
 165
 0166            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0167                {
 0168                    b.Property<int>("Id")
 0169                        .ValueGeneratedOnAdd()
 0170                        .HasColumnType("int");
 0171
 0172                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0173
 0174                    b.Property<int>("AccessFailedCount")
 0175                        .HasColumnType("int");
 0176
 0177                    b.Property<string>("ConcurrencyStamp")
 0178                        .IsConcurrencyToken()
 0179                        .HasColumnType("nvarchar(max)");
 0180
 0181                    b.Property<string>("Email")
 0182                        .IsRequired()
 0183                        .HasMaxLength(150)
 0184                        .HasColumnType("nvarchar(150)");
 0185
 0186                    b.Property<bool>("EmailConfirmed")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("FirstName")
 0190                        .IsRequired()
 0191                        .HasMaxLength(100)
 0192                        .HasColumnType("nvarchar(100)");
 0193
 0194                    b.Property<bool>("IsActive")
 0195                        .HasColumnType("bit");
 0196
 0197                    b.Property<string>("LastName")
 0198                        .IsRequired()
 0199                        .HasMaxLength(100)
 0200                        .HasColumnType("nvarchar(100)");
 0201
 0202                    b.Property<bool>("LockoutEnabled")
 0203                        .HasColumnType("bit");
 0204
 0205                    b.Property<DateTimeOffset?>("LockoutEnd")
 0206                        .HasColumnType("datetimeoffset");
 0207
 0208                    b.Property<string>("NormalizedEmail")
 0209                        .IsRequired()
 0210                        .HasMaxLength(150)
 0211                        .HasColumnType("nvarchar(150)");
 0212
 0213                    b.Property<string>("NormalizedUserName")
 0214                        .IsRequired()
 0215                        .HasMaxLength(250)
 0216                        .HasColumnType("nvarchar(250)");
 0217
 0218                    b.Property<string>("PasswordHash")
 0219                        .HasColumnType("nvarchar(max)");
 0220
 0221                    b.Property<string>("PhoneNumber")
 0222                        .HasColumnType("nvarchar(max)");
 0223
 0224                    b.Property<bool>("PhoneNumberConfirmed")
 0225                        .HasColumnType("bit");
 0226
 0227                    b.Property<string>("SecurityStamp")
 0228                        .HasColumnType("nvarchar(max)");
 0229
 0230                    b.Property<bool>("TwoFactorEnabled")
 0231                        .HasColumnType("bit");
 0232
 0233                    b.Property<string>("UserName")
 0234                        .IsRequired()
 0235                        .HasMaxLength(250)
 0236                        .HasColumnType("nvarchar(250)");
 0237
 0238                    b.HasKey("Id");
 0239
 0240                    b.HasIndex("NormalizedEmail")
 0241                        .HasDatabaseName("EmailIndex");
 0242
 0243                    b.HasIndex("NormalizedUserName")
 0244                        .IsUnique()
 0245                        .HasDatabaseName("UserNameIndex");
 0246
 0247                    b.ToTable("AppUsers", (string)null);
 0248                });
 249
 0250            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0251                {
 0252                    b.Property<int>("Id")
 0253                        .ValueGeneratedOnAdd()
 0254                        .HasColumnType("int");
 0255
 0256                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0257
 0258                    b.Property<string>("ClaimType")
 0259                        .IsRequired()
 0260                        .HasMaxLength(200)
 0261                        .HasColumnType("nvarchar(200)");
 0262
 0263                    b.Property<string>("ClaimValue")
 0264                        .IsRequired()
 0265                        .HasMaxLength(200)
 0266                        .HasColumnType("nvarchar(200)");
 0267
 0268                    b.Property<int>("UserId")
 0269                        .HasColumnType("int");
 0270
 0271                    b.HasKey("Id");
 0272
 0273                    b.HasIndex("UserId");
 0274
 0275                    b.ToTable("AppUserClaims", (string)null);
 0276                });
 277
 0278            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0279                {
 0280                    b.Property<string>("LoginProvider")
 0281                        .HasColumnType("nvarchar(450)");
 0282
 0283                    b.Property<string>("ProviderKey")
 0284                        .HasColumnType("nvarchar(450)");
 0285
 0286                    b.Property<string>("ProviderDisplayName")
 0287                        .HasColumnType("nvarchar(max)");
 0288
 0289                    b.Property<int>("UserId")
 0290                        .HasColumnType("int");
 0291
 0292                    b.HasKey("LoginProvider", "ProviderKey");
 0293
 0294                    b.HasIndex("UserId");
 0295
 0296                    b.ToTable("AppUserLogins", (string)null);
 0297                });
 298
 0299            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0300                {
 0301                    b.Property<int>("UserId")
 0302                        .HasColumnType("int");
 0303
 0304                    b.Property<int>("RoleId")
 0305                        .HasColumnType("int");
 0306
 0307                    b.HasKey("UserId", "RoleId");
 0308
 0309                    b.HasIndex("RoleId");
 0310
 0311                    b.ToTable("AppUserRoles", (string)null);
 0312                });
 313
 0314            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0315                {
 0316                    b.Property<int>("UserId")
 0317                        .HasColumnType("int");
 0318
 0319                    b.Property<string>("LoginProvider")
 0320                        .HasColumnType("nvarchar(450)");
 0321
 0322                    b.Property<string>("Name")
 0323                        .HasColumnType("nvarchar(450)");
 0324
 0325                    b.Property<string>("Value")
 0326                        .HasColumnType("nvarchar(max)");
 0327
 0328                    b.HasKey("UserId", "LoginProvider", "Name");
 0329
 0330                    b.ToTable("AppUserTokens", (string)null);
 0331                });
 332
 0333            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0334                {
 0335                    b.Property<int>("Id")
 0336                        .ValueGeneratedOnAdd()
 0337                        .HasColumnType("int");
 0338
 0339                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0340
 0341                    b.Property<int>("AmountSubTotal")
 0342                        .HasColumnType("int");
 0343
 0344                    b.Property<int>("AmountTotal")
 0345                        .HasColumnType("int");
 0346
 0347                    b.Property<string>("Name")
 0348                        .IsRequired()
 0349                        .HasMaxLength(200)
 0350                        .HasColumnType("nvarchar(200)");
 0351
 0352                    b.Property<int>("Quantity")
 0353                        .HasColumnType("int");
 0354
 0355                    b.Property<string>("UserEmail")
 0356                        .IsRequired()
 0357                        .HasMaxLength(100)
 0358                        .HasColumnType("nvarchar(100)");
 0359
 0360                    b.HasKey("Id");
 0361
 0362                    b.ToTable("Invoices", (string)null);
 0363                });
 364
 0365            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0366                {
 0367                    b.Property<int>("Id")
 0368                        .ValueGeneratedOnAdd()
 0369                        .HasColumnType("int");
 0370
 0371                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0372
 0373                    b.Property<int>("AccessLevel")
 0374                        .HasColumnType("int");
 0375
 0376                    b.Property<string>("Author")
 0377                        .IsRequired()
 0378                        .HasMaxLength(200)
 0379                        .HasColumnType("nvarchar(200)");
 0380
 0381                    b.Property<DateTime>("DateRelease")
 0382                        .HasColumnType("datetime2");
 0383
 0384                    b.Property<string>("Description")
 0385                        .IsRequired()
 0386                        .HasMaxLength(1000)
 0387                        .HasColumnType("nvarchar(1000)");
 0388
 0389                    b.Property<string>("ImageName")
 0390                        .IsRequired()
 0391                        .HasMaxLength(200)
 0392                        .HasColumnType("nvarchar(200)");
 0393
 0394                    b.Property<string>("ImagePath")
 0395                        .IsRequired()
 0396                        .HasMaxLength(200)
 0397                        .HasColumnType("nvarchar(200)");
 0398
 0399                    b.Property<string>("Title")
 0400                        .IsRequired()
 0401                        .HasMaxLength(200)
 0402                        .HasColumnType("nvarchar(200)");
 0403
 0404                    b.HasKey("Id");
 0405
 0406                    b.ToTable("Musics", (string)null);
 0407                });
 408
 0409            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0410                {
 0411                    b.Property<int>("Id")
 0412                        .ValueGeneratedOnAdd()
 0413                        .HasColumnType("int");
 0414
 0415                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0416
 0417                    b.Property<int>("AmountTotal")
 0418                        .HasMaxLength(50)
 0419                        .HasColumnType("int");
 0420
 0421                    b.Property<string>("LineItems")
 0422                        .IsRequired()
 0423                        .HasMaxLength(10000)
 0424                        .HasColumnType("nvarchar(max)");
 0425
 0426                    b.Property<DateTime>("OrderDate")
 0427                        .HasColumnType("datetime2");
 0428
 0429                    b.Property<string>("OrderName")
 0430                        .IsRequired()
 0431                        .HasMaxLength(200)
 0432                        .HasColumnType("nvarchar(200)");
 0433
 0434                    b.Property<string>("UserEmail")
 0435                        .IsRequired()
 0436                        .HasMaxLength(100)
 0437                        .HasColumnType("nvarchar(100)");
 0438
 0439                    b.HasKey("Id");
 0440
 0441                    b.ToTable("Orders", (string)null);
 0442                });
 443
 0444            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0445                {
 0446                    b.Property<int>("Id")
 0447                        .ValueGeneratedOnAdd()
 0448                        .HasColumnType("int");
 0449
 0450                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0451
 0452                    b.Property<DateTime>("ReceiptDate")
 0453                        .HasColumnType("datetime2");
 0454
 0455                    b.Property<string>("ReceiptName")
 0456                        .IsRequired()
 0457                        .HasMaxLength(200)
 0458                        .HasColumnType("nvarchar(200)");
 0459
 0460                    b.Property<string>("ReceiptUrl")
 0461                        .IsRequired()
 0462                        .HasMaxLength(500)
 0463                        .HasColumnType("nvarchar(500)");
 0464
 0465                    b.Property<string>("UserEmail")
 0466                        .IsRequired()
 0467                        .HasMaxLength(100)
 0468                        .HasColumnType("nvarchar(100)");
 0469
 0470                    b.HasKey("Id");
 0471
 0472                    b.ToTable("Receipts", (string)null);
 0473                });
 474
 0475            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0476                {
 0477                    b.Property<int>("Id")
 0478                        .ValueGeneratedOnAdd()
 0479                        .HasColumnType("int");
 0480
 0481                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0482
 0483                    b.Property<DateTime>("CurrentPeriodEnd")
 0484                        .HasColumnType("datetime2");
 0485
 0486                    b.Property<DateTime>("CurrentPeriodStart")
 0487                        .HasColumnType("datetime2");
 0488
 0489                    b.Property<int>("CustomerId")
 0490                        .HasColumnType("int");
 0491
 0492                    b.Property<DateTime>("DateStart")
 0493                        .HasColumnType("datetime2");
 0494
 0495                    b.Property<string>("HostedInvoiceUrl")
 0496                        .IsRequired()
 0497                        .HasMaxLength(700)
 0498                        .HasColumnType("nvarchar(700)");
 0499
 0500                    b.Property<int>("Status")
 0501                        .HasMaxLength(50)
 0502                        .HasColumnType("int");
 0503
 0504                    b.Property<string>("StripeSubscriberSubscriptionId")
 0505                        .IsRequired()
 0506                        .HasMaxLength(500)
 0507                        .HasColumnType("nvarchar(500)");
 0508
 0509                    b.Property<int>("SubscriptionId")
 0510                        .HasColumnType("int");
 0511
 0512                    b.HasKey("Id");
 0513
 0514                    b.HasIndex("CustomerId");
 0515
 0516                    b.HasIndex("SubscriptionId");
 0517
 0518                    b.ToTable("Subscribers", (string)null);
 0519                });
 520
 0521            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0522                {
 0523                    b.Property<int>("Id")
 0524                        .ValueGeneratedOnAdd()
 0525                        .HasColumnType("int");
 0526
 0527                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0528
 0529                    b.Property<string>("ChargeType")
 0530                        .IsRequired()
 0531                        .HasMaxLength(25)
 0532                        .HasColumnType("nvarchar(25)");
 0533
 0534                    b.Property<string>("Currency")
 0535                        .IsRequired()
 0536                        .HasMaxLength(25)
 0537                        .HasColumnType("nvarchar(25)");
 0538
 0539                    b.Property<string>("CurrencySymbol")
 0540                        .IsRequired()
 0541                        .HasMaxLength(5)
 0542                        .HasColumnType("nvarchar(5)");
 0543
 0544                    b.Property<string>("ImageName")
 0545                        .IsRequired()
 0546                        .HasMaxLength(200)
 0547                        .HasColumnType("nvarchar(200)");
 0548
 0549                    b.Property<string>("ImagePath")
 0550                        .IsRequired()
 0551                        .HasMaxLength(200)
 0552                        .HasColumnType("nvarchar(200)");
 0553
 0554                    b.Property<string>("Name")
 0555                        .IsRequired()
 0556                        .HasMaxLength(200)
 0557                        .HasColumnType("nvarchar(200)");
 0558
 0559                    b.Property<string>("Options")
 0560                        .IsRequired()
 0561                        .HasMaxLength(1000)
 0562                        .HasColumnType("nvarchar(1000)");
 0563
 0564                    b.Property<int>("Price")
 0565                        .HasColumnType("int");
 0566
 0567                    b.Property<string>("StripeSubscriptionId")
 0568                        .IsRequired()
 0569                        .HasColumnType("nvarchar(max)");
 0570
 0571                    b.HasKey("Id");
 0572
 0573                    b.ToTable("Subscriptions", (string)null);
 0574                });
 575
 0576            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoItem", b =>
 0577                {
 0578                    b.Property<int>("Id")
 0579                        .ValueGeneratedOnAdd()
 0580                        .HasColumnType("int");
 0581
 0582                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0583
 0584                    b.Property<bool>("Done")
 0585                        .HasColumnType("bit");
 0586
 0587                    b.Property<int>("ListId")
 0588                        .HasColumnType("int");
 0589
 0590                    b.Property<string>("Note")
 0591                        .IsRequired()
 0592                        .HasMaxLength(1000)
 0593                        .HasColumnType("nvarchar(1000)");
 0594
 0595                    b.Property<int>("Priority")
 0596                        .HasColumnType("int");
 0597
 0598                    b.Property<int>("State")
 0599                        .HasColumnType("int");
 0600
 0601                    b.Property<string>("Title")
 0602                        .IsRequired()
 0603                        .HasMaxLength(200)
 0604                        .HasColumnType("nvarchar(200)");
 0605
 0606                    b.HasKey("Id");
 0607
 0608                    b.HasIndex("ListId");
 0609
 0610                    b.ToTable("TodoItems", (string)null);
 0611                });
 612
 0613            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoList", b =>
 0614                {
 0615                    b.Property<int>("Id")
 0616                        .ValueGeneratedOnAdd()
 0617                        .HasColumnType("int");
 0618
 0619                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0620
 0621                    b.Property<string>("Title")
 0622                        .IsRequired()
 0623                        .HasMaxLength(200)
 0624                        .HasColumnType("nvarchar(200)");
 0625
 0626                    b.HasKey("Id");
 0627
 0628                    b.ToTable("TodoLists", (string)null);
 0629                });
 630
 0631            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0632                {
 0633                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0634                        .WithMany()
 0635                        .HasForeignKey("ClotheId");
 0636
 0637                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0638                        .WithMany()
 0639                        .HasForeignKey("UserId");
 0640
 0641                    b.Navigation("Clothe");
 0642
 0643                    b.Navigation("User");
 0644                });
 645
 0646            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0647                {
 0648                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0649                        .WithMany("Claims")
 0650                        .HasForeignKey("RoleId")
 0651                        .OnDelete(DeleteBehavior.Cascade)
 0652                        .IsRequired();
 0653
 0654                    b.Navigation("Role");
 0655                });
 656
 0657            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0658                {
 0659                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0660                        .WithMany("Claims")
 0661                        .HasForeignKey("UserId")
 0662                        .OnDelete(DeleteBehavior.Cascade)
 0663                        .IsRequired();
 0664
 0665                    b.Navigation("User");
 0666                });
 667
 0668            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0669                {
 0670                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0671                        .WithMany("Logins")
 0672                        .HasForeignKey("UserId")
 0673                        .OnDelete(DeleteBehavior.Cascade)
 0674                        .IsRequired();
 0675
 0676                    b.Navigation("User");
 0677                });
 678
 0679            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0680                {
 0681                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0682                        .WithMany("Users")
 0683                        .HasForeignKey("RoleId")
 0684                        .OnDelete(DeleteBehavior.Cascade)
 0685                        .IsRequired();
 0686
 0687                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0688                        .WithMany("Roles")
 0689                        .HasForeignKey("UserId")
 0690                        .OnDelete(DeleteBehavior.Cascade)
 0691                        .IsRequired();
 0692
 0693                    b.Navigation("Role");
 0694
 0695                    b.Navigation("User");
 0696                });
 697
 0698            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0699                {
 0700                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0701                        .WithMany("UserTokens")
 0702                        .HasForeignKey("UserId")
 0703                        .OnDelete(DeleteBehavior.Cascade)
 0704                        .IsRequired();
 0705
 0706                    b.Navigation("User");
 0707                });
 708
 0709            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0710                {
 0711                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0712                        .WithMany()
 0713                        .HasForeignKey("CustomerId")
 0714                        .OnDelete(DeleteBehavior.Cascade)
 0715                        .IsRequired();
 0716
 0717                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0718                        .WithMany()
 0719                        .HasForeignKey("SubscriptionId")
 0720                        .OnDelete(DeleteBehavior.Cascade)
 0721                        .IsRequired();
 0722
 0723                    b.Navigation("Customer");
 0724
 0725                    b.Navigation("Subscription");
 0726                });
 727
 0728            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoItem", b =>
 0729                {
 0730                    b.HasOne("BlazorShop.Domain.Entities.TodoList", "List")
 0731                        .WithMany("Items")
 0732                        .HasForeignKey("ListId")
 0733                        .OnDelete(DeleteBehavior.Cascade)
 0734                        .IsRequired();
 0735
 0736                    b.Navigation("List");
 0737                });
 738
 0739            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0740                {
 0741                    b.Navigation("Claims");
 0742
 0743                    b.Navigation("Users");
 0744                });
 745
 0746            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0747                {
 0748                    b.Navigation("Claims");
 0749
 0750                    b.Navigation("Logins");
 0751
 0752                    b.Navigation("Roles");
 0753
 0754                    b.Navigation("UserTokens");
 0755                });
 756
 0757            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoList", b =>
 0758                {
 0759                    b.Navigation("Items");
 0760                });
 761#pragma warning restore 612, 618
 0762        }
 763    }
 764}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration13.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration13.html deleted file mode 100644 index 5c5c4afd..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration13.html +++ /dev/null @@ -1,982 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration13 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:734
Coverable lines:734
Total lines:803
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220209213040_Migration-13.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration13 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AlterColumn<string>(
 015                name: "Note",
 016                table: "TodoItems",
 017                type: "nvarchar(1000)",
 018                maxLength: 1000,
 019                nullable: true,
 020                oldClrType: typeof(string),
 021                oldType: "nvarchar(1000)",
 022                oldMaxLength: 1000);
 023        }
 24
 25        protected override void Down(MigrationBuilder migrationBuilder)
 026        {
 027            migrationBuilder.AlterColumn<string>(
 028                name: "Note",
 029                table: "TodoItems",
 030                type: "nvarchar(1000)",
 031                maxLength: 1000,
 032                nullable: false,
 033                defaultValue: "",
 034                oldClrType: typeof(string),
 035                oldType: "nvarchar(1000)",
 036                oldMaxLength: 1000,
 037                oldNullable: true);
 038        }
 39    }
 40}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220209213040_Migration-13.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220209213040_Migration-13")]
 18    partial class Migration13
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .IsRequired()
 0121                        .HasMaxLength(100)
 0122                        .HasColumnType("nvarchar(100)");
 0123
 0124                    b.Property<string>("NormalizedName")
 0125                        .IsRequired()
 0126                        .HasMaxLength(100)
 0127                        .HasColumnType("nvarchar(100)");
 0128
 0129                    b.HasKey("Id");
 0130
 0131                    b.HasIndex("NormalizedName")
 0132                        .IsUnique()
 0133                        .HasDatabaseName("RoleNameIndex");
 0134
 0135                    b.ToTable("AppRoles", (string)null);
 0136                });
 137
 0138            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0139                {
 0140                    b.Property<int>("Id")
 0141                        .ValueGeneratedOnAdd()
 0142                        .HasColumnType("int");
 0143
 0144                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0145
 0146                    b.Property<string>("ClaimType")
 0147                        .IsRequired()
 0148                        .HasMaxLength(200)
 0149                        .HasColumnType("nvarchar(200)");
 0150
 0151                    b.Property<string>("ClaimValue")
 0152                        .IsRequired()
 0153                        .HasMaxLength(200)
 0154                        .HasColumnType("nvarchar(200)");
 0155
 0156                    b.Property<int>("RoleId")
 0157                        .HasColumnType("int");
 0158
 0159                    b.HasKey("Id");
 0160
 0161                    b.HasIndex("RoleId");
 0162
 0163                    b.ToTable("AppRoleClaims", (string)null);
 0164                });
 165
 0166            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0167                {
 0168                    b.Property<int>("Id")
 0169                        .ValueGeneratedOnAdd()
 0170                        .HasColumnType("int");
 0171
 0172                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0173
 0174                    b.Property<int>("AccessFailedCount")
 0175                        .HasColumnType("int");
 0176
 0177                    b.Property<string>("ConcurrencyStamp")
 0178                        .IsConcurrencyToken()
 0179                        .HasColumnType("nvarchar(max)");
 0180
 0181                    b.Property<string>("Email")
 0182                        .IsRequired()
 0183                        .HasMaxLength(150)
 0184                        .HasColumnType("nvarchar(150)");
 0185
 0186                    b.Property<bool>("EmailConfirmed")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("FirstName")
 0190                        .IsRequired()
 0191                        .HasMaxLength(100)
 0192                        .HasColumnType("nvarchar(100)");
 0193
 0194                    b.Property<bool>("IsActive")
 0195                        .HasColumnType("bit");
 0196
 0197                    b.Property<string>("LastName")
 0198                        .IsRequired()
 0199                        .HasMaxLength(100)
 0200                        .HasColumnType("nvarchar(100)");
 0201
 0202                    b.Property<bool>("LockoutEnabled")
 0203                        .HasColumnType("bit");
 0204
 0205                    b.Property<DateTimeOffset?>("LockoutEnd")
 0206                        .HasColumnType("datetimeoffset");
 0207
 0208                    b.Property<string>("NormalizedEmail")
 0209                        .IsRequired()
 0210                        .HasMaxLength(150)
 0211                        .HasColumnType("nvarchar(150)");
 0212
 0213                    b.Property<string>("NormalizedUserName")
 0214                        .IsRequired()
 0215                        .HasMaxLength(250)
 0216                        .HasColumnType("nvarchar(250)");
 0217
 0218                    b.Property<string>("PasswordHash")
 0219                        .HasColumnType("nvarchar(max)");
 0220
 0221                    b.Property<string>("PhoneNumber")
 0222                        .HasColumnType("nvarchar(max)");
 0223
 0224                    b.Property<bool>("PhoneNumberConfirmed")
 0225                        .HasColumnType("bit");
 0226
 0227                    b.Property<string>("SecurityStamp")
 0228                        .HasColumnType("nvarchar(max)");
 0229
 0230                    b.Property<bool>("TwoFactorEnabled")
 0231                        .HasColumnType("bit");
 0232
 0233                    b.Property<string>("UserName")
 0234                        .IsRequired()
 0235                        .HasMaxLength(250)
 0236                        .HasColumnType("nvarchar(250)");
 0237
 0238                    b.HasKey("Id");
 0239
 0240                    b.HasIndex("NormalizedEmail")
 0241                        .HasDatabaseName("EmailIndex");
 0242
 0243                    b.HasIndex("NormalizedUserName")
 0244                        .IsUnique()
 0245                        .HasDatabaseName("UserNameIndex");
 0246
 0247                    b.ToTable("AppUsers", (string)null);
 0248                });
 249
 0250            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0251                {
 0252                    b.Property<int>("Id")
 0253                        .ValueGeneratedOnAdd()
 0254                        .HasColumnType("int");
 0255
 0256                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0257
 0258                    b.Property<string>("ClaimType")
 0259                        .IsRequired()
 0260                        .HasMaxLength(200)
 0261                        .HasColumnType("nvarchar(200)");
 0262
 0263                    b.Property<string>("ClaimValue")
 0264                        .IsRequired()
 0265                        .HasMaxLength(200)
 0266                        .HasColumnType("nvarchar(200)");
 0267
 0268                    b.Property<int>("UserId")
 0269                        .HasColumnType("int");
 0270
 0271                    b.HasKey("Id");
 0272
 0273                    b.HasIndex("UserId");
 0274
 0275                    b.ToTable("AppUserClaims", (string)null);
 0276                });
 277
 0278            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0279                {
 0280                    b.Property<string>("LoginProvider")
 0281                        .HasColumnType("nvarchar(450)");
 0282
 0283                    b.Property<string>("ProviderKey")
 0284                        .HasColumnType("nvarchar(450)");
 0285
 0286                    b.Property<string>("ProviderDisplayName")
 0287                        .HasColumnType("nvarchar(max)");
 0288
 0289                    b.Property<int>("UserId")
 0290                        .HasColumnType("int");
 0291
 0292                    b.HasKey("LoginProvider", "ProviderKey");
 0293
 0294                    b.HasIndex("UserId");
 0295
 0296                    b.ToTable("AppUserLogins", (string)null);
 0297                });
 298
 0299            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0300                {
 0301                    b.Property<int>("UserId")
 0302                        .HasColumnType("int");
 0303
 0304                    b.Property<int>("RoleId")
 0305                        .HasColumnType("int");
 0306
 0307                    b.HasKey("UserId", "RoleId");
 0308
 0309                    b.HasIndex("RoleId");
 0310
 0311                    b.ToTable("AppUserRoles", (string)null);
 0312                });
 313
 0314            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0315                {
 0316                    b.Property<int>("UserId")
 0317                        .HasColumnType("int");
 0318
 0319                    b.Property<string>("LoginProvider")
 0320                        .HasColumnType("nvarchar(450)");
 0321
 0322                    b.Property<string>("Name")
 0323                        .HasColumnType("nvarchar(450)");
 0324
 0325                    b.Property<string>("Value")
 0326                        .HasColumnType("nvarchar(max)");
 0327
 0328                    b.HasKey("UserId", "LoginProvider", "Name");
 0329
 0330                    b.ToTable("AppUserTokens", (string)null);
 0331                });
 332
 0333            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0334                {
 0335                    b.Property<int>("Id")
 0336                        .ValueGeneratedOnAdd()
 0337                        .HasColumnType("int");
 0338
 0339                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0340
 0341                    b.Property<int>("AmountSubTotal")
 0342                        .HasColumnType("int");
 0343
 0344                    b.Property<int>("AmountTotal")
 0345                        .HasColumnType("int");
 0346
 0347                    b.Property<string>("Name")
 0348                        .IsRequired()
 0349                        .HasMaxLength(200)
 0350                        .HasColumnType("nvarchar(200)");
 0351
 0352                    b.Property<int>("Quantity")
 0353                        .HasColumnType("int");
 0354
 0355                    b.Property<string>("UserEmail")
 0356                        .IsRequired()
 0357                        .HasMaxLength(100)
 0358                        .HasColumnType("nvarchar(100)");
 0359
 0360                    b.HasKey("Id");
 0361
 0362                    b.ToTable("Invoices", (string)null);
 0363                });
 364
 0365            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0366                {
 0367                    b.Property<int>("Id")
 0368                        .ValueGeneratedOnAdd()
 0369                        .HasColumnType("int");
 0370
 0371                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0372
 0373                    b.Property<int>("AccessLevel")
 0374                        .HasColumnType("int");
 0375
 0376                    b.Property<string>("Author")
 0377                        .IsRequired()
 0378                        .HasMaxLength(200)
 0379                        .HasColumnType("nvarchar(200)");
 0380
 0381                    b.Property<DateTime>("DateRelease")
 0382                        .HasColumnType("datetime2");
 0383
 0384                    b.Property<string>("Description")
 0385                        .IsRequired()
 0386                        .HasMaxLength(1000)
 0387                        .HasColumnType("nvarchar(1000)");
 0388
 0389                    b.Property<string>("ImageName")
 0390                        .IsRequired()
 0391                        .HasMaxLength(200)
 0392                        .HasColumnType("nvarchar(200)");
 0393
 0394                    b.Property<string>("ImagePath")
 0395                        .IsRequired()
 0396                        .HasMaxLength(200)
 0397                        .HasColumnType("nvarchar(200)");
 0398
 0399                    b.Property<string>("Title")
 0400                        .IsRequired()
 0401                        .HasMaxLength(200)
 0402                        .HasColumnType("nvarchar(200)");
 0403
 0404                    b.HasKey("Id");
 0405
 0406                    b.ToTable("Musics", (string)null);
 0407                });
 408
 0409            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0410                {
 0411                    b.Property<int>("Id")
 0412                        .ValueGeneratedOnAdd()
 0413                        .HasColumnType("int");
 0414
 0415                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0416
 0417                    b.Property<int>("AmountTotal")
 0418                        .HasMaxLength(50)
 0419                        .HasColumnType("int");
 0420
 0421                    b.Property<string>("LineItems")
 0422                        .IsRequired()
 0423                        .HasMaxLength(10000)
 0424                        .HasColumnType("nvarchar(max)");
 0425
 0426                    b.Property<DateTime>("OrderDate")
 0427                        .HasColumnType("datetime2");
 0428
 0429                    b.Property<string>("OrderName")
 0430                        .IsRequired()
 0431                        .HasMaxLength(200)
 0432                        .HasColumnType("nvarchar(200)");
 0433
 0434                    b.Property<string>("UserEmail")
 0435                        .IsRequired()
 0436                        .HasMaxLength(100)
 0437                        .HasColumnType("nvarchar(100)");
 0438
 0439                    b.HasKey("Id");
 0440
 0441                    b.ToTable("Orders", (string)null);
 0442                });
 443
 0444            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0445                {
 0446                    b.Property<int>("Id")
 0447                        .ValueGeneratedOnAdd()
 0448                        .HasColumnType("int");
 0449
 0450                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0451
 0452                    b.Property<DateTime>("ReceiptDate")
 0453                        .HasColumnType("datetime2");
 0454
 0455                    b.Property<string>("ReceiptName")
 0456                        .IsRequired()
 0457                        .HasMaxLength(200)
 0458                        .HasColumnType("nvarchar(200)");
 0459
 0460                    b.Property<string>("ReceiptUrl")
 0461                        .IsRequired()
 0462                        .HasMaxLength(500)
 0463                        .HasColumnType("nvarchar(500)");
 0464
 0465                    b.Property<string>("UserEmail")
 0466                        .IsRequired()
 0467                        .HasMaxLength(100)
 0468                        .HasColumnType("nvarchar(100)");
 0469
 0470                    b.HasKey("Id");
 0471
 0472                    b.ToTable("Receipts", (string)null);
 0473                });
 474
 0475            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0476                {
 0477                    b.Property<int>("Id")
 0478                        .ValueGeneratedOnAdd()
 0479                        .HasColumnType("int");
 0480
 0481                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0482
 0483                    b.Property<DateTime>("CurrentPeriodEnd")
 0484                        .HasColumnType("datetime2");
 0485
 0486                    b.Property<DateTime>("CurrentPeriodStart")
 0487                        .HasColumnType("datetime2");
 0488
 0489                    b.Property<int>("CustomerId")
 0490                        .HasColumnType("int");
 0491
 0492                    b.Property<DateTime>("DateStart")
 0493                        .HasColumnType("datetime2");
 0494
 0495                    b.Property<string>("HostedInvoiceUrl")
 0496                        .IsRequired()
 0497                        .HasMaxLength(700)
 0498                        .HasColumnType("nvarchar(700)");
 0499
 0500                    b.Property<int>("Status")
 0501                        .HasMaxLength(50)
 0502                        .HasColumnType("int");
 0503
 0504                    b.Property<string>("StripeSubscriberSubscriptionId")
 0505                        .IsRequired()
 0506                        .HasMaxLength(500)
 0507                        .HasColumnType("nvarchar(500)");
 0508
 0509                    b.Property<int>("SubscriptionId")
 0510                        .HasColumnType("int");
 0511
 0512                    b.HasKey("Id");
 0513
 0514                    b.HasIndex("CustomerId");
 0515
 0516                    b.HasIndex("SubscriptionId");
 0517
 0518                    b.ToTable("Subscribers", (string)null);
 0519                });
 520
 0521            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0522                {
 0523                    b.Property<int>("Id")
 0524                        .ValueGeneratedOnAdd()
 0525                        .HasColumnType("int");
 0526
 0527                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0528
 0529                    b.Property<string>("ChargeType")
 0530                        .IsRequired()
 0531                        .HasMaxLength(25)
 0532                        .HasColumnType("nvarchar(25)");
 0533
 0534                    b.Property<string>("Currency")
 0535                        .IsRequired()
 0536                        .HasMaxLength(25)
 0537                        .HasColumnType("nvarchar(25)");
 0538
 0539                    b.Property<string>("CurrencySymbol")
 0540                        .IsRequired()
 0541                        .HasMaxLength(5)
 0542                        .HasColumnType("nvarchar(5)");
 0543
 0544                    b.Property<string>("ImageName")
 0545                        .IsRequired()
 0546                        .HasMaxLength(200)
 0547                        .HasColumnType("nvarchar(200)");
 0548
 0549                    b.Property<string>("ImagePath")
 0550                        .IsRequired()
 0551                        .HasMaxLength(200)
 0552                        .HasColumnType("nvarchar(200)");
 0553
 0554                    b.Property<string>("Name")
 0555                        .IsRequired()
 0556                        .HasMaxLength(200)
 0557                        .HasColumnType("nvarchar(200)");
 0558
 0559                    b.Property<string>("Options")
 0560                        .IsRequired()
 0561                        .HasMaxLength(1000)
 0562                        .HasColumnType("nvarchar(1000)");
 0563
 0564                    b.Property<int>("Price")
 0565                        .HasColumnType("int");
 0566
 0567                    b.Property<string>("StripeSubscriptionId")
 0568                        .IsRequired()
 0569                        .HasColumnType("nvarchar(max)");
 0570
 0571                    b.HasKey("Id");
 0572
 0573                    b.ToTable("Subscriptions", (string)null);
 0574                });
 575
 0576            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoItem", b =>
 0577                {
 0578                    b.Property<int>("Id")
 0579                        .ValueGeneratedOnAdd()
 0580                        .HasColumnType("int");
 0581
 0582                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0583
 0584                    b.Property<bool>("Done")
 0585                        .HasColumnType("bit");
 0586
 0587                    b.Property<int>("ListId")
 0588                        .HasColumnType("int");
 0589
 0590                    b.Property<string>("Note")
 0591                        .HasMaxLength(1000)
 0592                        .HasColumnType("nvarchar(1000)");
 0593
 0594                    b.Property<int>("Priority")
 0595                        .HasColumnType("int");
 0596
 0597                    b.Property<int>("State")
 0598                        .HasColumnType("int");
 0599
 0600                    b.Property<string>("Title")
 0601                        .IsRequired()
 0602                        .HasMaxLength(200)
 0603                        .HasColumnType("nvarchar(200)");
 0604
 0605                    b.HasKey("Id");
 0606
 0607                    b.HasIndex("ListId");
 0608
 0609                    b.ToTable("TodoItems", (string)null);
 0610                });
 611
 0612            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoList", b =>
 0613                {
 0614                    b.Property<int>("Id")
 0615                        .ValueGeneratedOnAdd()
 0616                        .HasColumnType("int");
 0617
 0618                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0619
 0620                    b.Property<string>("Title")
 0621                        .IsRequired()
 0622                        .HasMaxLength(200)
 0623                        .HasColumnType("nvarchar(200)");
 0624
 0625                    b.HasKey("Id");
 0626
 0627                    b.ToTable("TodoLists", (string)null);
 0628                });
 629
 0630            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0631                {
 0632                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0633                        .WithMany()
 0634                        .HasForeignKey("ClotheId");
 0635
 0636                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0637                        .WithMany()
 0638                        .HasForeignKey("UserId");
 0639
 0640                    b.Navigation("Clothe");
 0641
 0642                    b.Navigation("User");
 0643                });
 644
 0645            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0646                {
 0647                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0648                        .WithMany("Claims")
 0649                        .HasForeignKey("RoleId")
 0650                        .OnDelete(DeleteBehavior.Cascade)
 0651                        .IsRequired();
 0652
 0653                    b.Navigation("Role");
 0654                });
 655
 0656            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0657                {
 0658                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0659                        .WithMany("Claims")
 0660                        .HasForeignKey("UserId")
 0661                        .OnDelete(DeleteBehavior.Cascade)
 0662                        .IsRequired();
 0663
 0664                    b.Navigation("User");
 0665                });
 666
 0667            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0668                {
 0669                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0670                        .WithMany("Logins")
 0671                        .HasForeignKey("UserId")
 0672                        .OnDelete(DeleteBehavior.Cascade)
 0673                        .IsRequired();
 0674
 0675                    b.Navigation("User");
 0676                });
 677
 0678            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0679                {
 0680                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0681                        .WithMany("Users")
 0682                        .HasForeignKey("RoleId")
 0683                        .OnDelete(DeleteBehavior.Cascade)
 0684                        .IsRequired();
 0685
 0686                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0687                        .WithMany("Roles")
 0688                        .HasForeignKey("UserId")
 0689                        .OnDelete(DeleteBehavior.Cascade)
 0690                        .IsRequired();
 0691
 0692                    b.Navigation("Role");
 0693
 0694                    b.Navigation("User");
 0695                });
 696
 0697            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0698                {
 0699                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0700                        .WithMany("UserTokens")
 0701                        .HasForeignKey("UserId")
 0702                        .OnDelete(DeleteBehavior.Cascade)
 0703                        .IsRequired();
 0704
 0705                    b.Navigation("User");
 0706                });
 707
 0708            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0709                {
 0710                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0711                        .WithMany()
 0712                        .HasForeignKey("CustomerId")
 0713                        .OnDelete(DeleteBehavior.Cascade)
 0714                        .IsRequired();
 0715
 0716                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0717                        .WithMany()
 0718                        .HasForeignKey("SubscriptionId")
 0719                        .OnDelete(DeleteBehavior.Cascade)
 0720                        .IsRequired();
 0721
 0722                    b.Navigation("Customer");
 0723
 0724                    b.Navigation("Subscription");
 0725                });
 726
 0727            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoItem", b =>
 0728                {
 0729                    b.HasOne("BlazorShop.Domain.Entities.TodoList", "List")
 0730                        .WithMany("Items")
 0731                        .HasForeignKey("ListId")
 0732                        .OnDelete(DeleteBehavior.Cascade)
 0733                        .IsRequired();
 0734
 0735                    b.Navigation("List");
 0736                });
 737
 0738            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0739                {
 0740                    b.Navigation("Claims");
 0741
 0742                    b.Navigation("Users");
 0743                });
 744
 0745            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0746                {
 0747                    b.Navigation("Claims");
 0748
 0749                    b.Navigation("Logins");
 0750
 0751                    b.Navigation("Roles");
 0752
 0753                    b.Navigation("UserTokens");
 0754                });
 755
 0756            modelBuilder.Entity("BlazorShop.Domain.Entities.TodoList", b =>
 0757                {
 0758                    b.Navigation("Items");
 0759                });
 760#pragma warning restore 612, 618
 0761        }
 762    }
 763}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_1.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_1.html deleted file mode 100644 index 2b5af6ad..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_1.html +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_1 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:881
Coverable lines:881
Total lines:979
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220121091524_Migration_1.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_1 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.CreateTable(
 015                name: "AppRoles",
 016                columns: table => new
 017                {
 018                    Id = table.Column<int>(type: "int", nullable: false)
 019                        .Annotation("SqlServer:Identity", "1, 1"),
 020                    Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 021                    NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 022                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true)
 023                },
 024                constraints: table =>
 025                {
 026                    table.PrimaryKey("PK_AppRoles", x => x.Id);
 027                });
 28
 029            migrationBuilder.CreateTable(
 030                name: "AppUsers",
 031                columns: table => new
 032                {
 033                    Id = table.Column<int>(type: "int", nullable: false)
 034                        .Annotation("SqlServer:Identity", "1, 1"),
 035                    FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 036                    LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 037                    IsActive = table.Column<bool>(type: "bit", nullable: false),
 038                    UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 039                    NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 040                    Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 041                    NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
 042                    EmailConfirmed = table.Column<bool>(type: "bit", nullable: false),
 043                    PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
 044                    SecurityStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
 045                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
 046                    PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
 047                    PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false),
 048                    TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false),
 049                    LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
 050                    LockoutEnabled = table.Column<bool>(type: "bit", nullable: false),
 051                    AccessFailedCount = table.Column<int>(type: "int", nullable: false)
 052                },
 053                constraints: table =>
 054                {
 055                    table.PrimaryKey("PK_AppUsers", x => x.Id);
 056                });
 57
 058            migrationBuilder.CreateTable(
 059                name: "Clothes",
 060                columns: table => new
 061                {
 062                    Id = table.Column<int>(type: "int", nullable: false)
 063                        .Annotation("SqlServer:Identity", "1, 1"),
 064                    Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 065                    Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
 066                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
 067                    Amount = table.Column<int>(type: "int", nullable: false),
 068                    ImageName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 069                    ImagePath = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 070                    IsActive = table.Column<bool>(type: "bit", nullable: false)
 071                },
 072                constraints: table =>
 073                {
 074                    table.PrimaryKey("PK_Clothes", x => x.Id);
 075                });
 76
 077            migrationBuilder.CreateTable(
 078                name: "Musics",
 079                columns: table => new
 080                {
 081                    Id = table.Column<int>(type: "int", nullable: false)
 082                        .Annotation("SqlServer:Identity", "1, 1"),
 083                    Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 084                    Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
 085                    Author = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 086                    DateRelease = table.Column<DateTime>(type: "datetime2", nullable: false),
 087                    ImageName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 088                    ImagePath = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false)
 089                },
 090                constraints: table =>
 091                {
 092                    table.PrimaryKey("PK_Musics", x => x.Id);
 093                });
 94
 095            migrationBuilder.CreateTable(
 096                name: "Orders",
 097                columns: table => new
 098                {
 099                    Id = table.Column<int>(type: "int", nullable: false)
 0100                        .Annotation("SqlServer:Identity", "1, 1"),
 0101                    Description = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 0102                    ListPrice = table.Column<string>(type: "nvarchar(max)", nullable: true),
 0103                    Discount = table.Column<string>(type: "nvarchar(max)", nullable: true),
 0104                    SalePrice = table.Column<string>(type: "nvarchar(max)", nullable: true),
 0105                    Quantity = table.Column<int>(type: "int", nullable: false),
 0106                    Tax = table.Column<string>(type: "nvarchar(max)", nullable: true),
 0107                    Total = table.Column<string>(type: "nvarchar(max)", nullable: true)
 0108                },
 0109                constraints: table =>
 0110                {
 0111                    table.PrimaryKey("PK_Orders", x => x.Id);
 0112                });
 113
 0114            migrationBuilder.CreateTable(
 0115                name: "Subscriptions",
 0116                columns: table => new
 0117                {
 0118                    Id = table.Column<int>(type: "int", nullable: false)
 0119                        .Annotation("SqlServer:Identity", "1, 1"),
 0120                    Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 0121                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
 0122                    Currency = table.Column<string>(type: "nvarchar(max)", nullable: false),
 0123                    CurrencySymbol = table.Column<string>(type: "nvarchar(max)", nullable: false),
 0124                    ChargeType = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
 0125                    Options = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false)
 0126                },
 0127                constraints: table =>
 0128                {
 0129                    table.PrimaryKey("PK_Subscriptions", x => x.Id);
 0130                });
 131
 0132            migrationBuilder.CreateTable(
 0133                name: "AppRoleClaims",
 0134                columns: table => new
 0135                {
 0136                    Id = table.Column<int>(type: "int", nullable: false)
 0137                        .Annotation("SqlServer:Identity", "1, 1"),
 0138                    RoleId = table.Column<int>(type: "int", nullable: false),
 0139                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
 0140                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
 0141                },
 0142                constraints: table =>
 0143                {
 0144                    table.PrimaryKey("PK_AppRoleClaims", x => x.Id);
 0145                    table.ForeignKey(
 0146                        name: "FK_AppRoleClaims_AppRoles_RoleId",
 0147                        column: x => x.RoleId,
 0148                        principalTable: "AppRoles",
 0149                        principalColumn: "Id",
 0150                        onDelete: ReferentialAction.Cascade);
 0151                });
 152
 0153            migrationBuilder.CreateTable(
 0154                name: "AppUserClaims",
 0155                columns: table => new
 0156                {
 0157                    Id = table.Column<int>(type: "int", nullable: false)
 0158                        .Annotation("SqlServer:Identity", "1, 1"),
 0159                    UserId = table.Column<int>(type: "int", nullable: false),
 0160                    ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
 0161                    ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
 0162                },
 0163                constraints: table =>
 0164                {
 0165                    table.PrimaryKey("PK_AppUserClaims", x => x.Id);
 0166                    table.ForeignKey(
 0167                        name: "FK_AppUserClaims_AppUsers_UserId",
 0168                        column: x => x.UserId,
 0169                        principalTable: "AppUsers",
 0170                        principalColumn: "Id",
 0171                        onDelete: ReferentialAction.Cascade);
 0172                });
 173
 0174            migrationBuilder.CreateTable(
 0175                name: "AppUserLogins",
 0176                columns: table => new
 0177                {
 0178                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
 0179                    ProviderKey = table.Column<string>(type: "nvarchar(450)", nullable: false),
 0180                    ProviderDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
 0181                    UserId = table.Column<int>(type: "int", nullable: false)
 0182                },
 0183                constraints: table =>
 0184                {
 0185                    table.PrimaryKey("PK_AppUserLogins", x => new { x.LoginProvider, x.ProviderKey });
 0186                    table.ForeignKey(
 0187                        name: "FK_AppUserLogins_AppUsers_UserId",
 0188                        column: x => x.UserId,
 0189                        principalTable: "AppUsers",
 0190                        principalColumn: "Id",
 0191                        onDelete: ReferentialAction.Cascade);
 0192                });
 193
 0194            migrationBuilder.CreateTable(
 0195                name: "AppUserRoles",
 0196                columns: table => new
 0197                {
 0198                    UserId = table.Column<int>(type: "int", nullable: false),
 0199                    RoleId = table.Column<int>(type: "int", nullable: false)
 0200                },
 0201                constraints: table =>
 0202                {
 0203                    table.PrimaryKey("PK_AppUserRoles", x => new { x.UserId, x.RoleId });
 0204                    table.ForeignKey(
 0205                        name: "FK_AppUserRoles_AppRoles_RoleId",
 0206                        column: x => x.RoleId,
 0207                        principalTable: "AppRoles",
 0208                        principalColumn: "Id",
 0209                        onDelete: ReferentialAction.Cascade);
 0210                    table.ForeignKey(
 0211                        name: "FK_AppUserRoles_AppUsers_UserId",
 0212                        column: x => x.UserId,
 0213                        principalTable: "AppUsers",
 0214                        principalColumn: "Id",
 0215                        onDelete: ReferentialAction.Cascade);
 0216                });
 217
 0218            migrationBuilder.CreateTable(
 0219                name: "AppUserTokens",
 0220                columns: table => new
 0221                {
 0222                    UserId = table.Column<int>(type: "int", nullable: false),
 0223                    LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
 0224                    Name = table.Column<string>(type: "nvarchar(450)", nullable: false),
 0225                    Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
 0226                },
 0227                constraints: table =>
 0228                {
 0229                    table.PrimaryKey("PK_AppUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
 0230                    table.ForeignKey(
 0231                        name: "FK_AppUserTokens_AppUsers_UserId",
 0232                        column: x => x.UserId,
 0233                        principalTable: "AppUsers",
 0234                        principalColumn: "Id",
 0235                        onDelete: ReferentialAction.Cascade);
 0236                });
 237
 0238            migrationBuilder.CreateTable(
 0239                name: "Carts",
 0240                columns: table => new
 0241                {
 0242                    Id = table.Column<int>(type: "int", nullable: false)
 0243                        .Annotation("SqlServer:Identity", "1, 1"),
 0244                    Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 0245                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
 0246                    Amount = table.Column<int>(type: "int", nullable: false),
 0247                    ClotheId = table.Column<int>(type: "int", nullable: true),
 0248                    UserId = table.Column<int>(type: "int", nullable: true)
 0249                },
 0250                constraints: table =>
 0251                {
 0252                    table.PrimaryKey("PK_Carts", x => x.Id);
 0253                    table.ForeignKey(
 0254                        name: "FK_Carts_AppUsers_UserId",
 0255                        column: x => x.UserId,
 0256                        principalTable: "AppUsers",
 0257                        principalColumn: "Id");
 0258                    table.ForeignKey(
 0259                        name: "FK_Carts_Clothes_ClotheId",
 0260                        column: x => x.ClotheId,
 0261                        principalTable: "Clothes",
 0262                        principalColumn: "Id");
 0263                });
 264
 0265            migrationBuilder.CreateTable(
 0266                name: "Subscribers",
 0267                columns: table => new
 0268                {
 0269                    Id = table.Column<int>(type: "int", nullable: false)
 0270                        .Annotation("SqlServer:Identity", "1, 1"),
 0271                    Status = table.Column<int>(type: "int", maxLength: 200, nullable: false),
 0272                    DateStart = table.Column<DateTime>(type: "datetime2", nullable: false),
 0273                    CurrentPeriodEnd = table.Column<DateTime>(type: "datetime2", nullable: false),
 0274                    CustomerId = table.Column<int>(type: "int", nullable: false),
 0275                    SubscriptionId = table.Column<int>(type: "int", nullable: false)
 0276                },
 0277                constraints: table =>
 0278                {
 0279                    table.PrimaryKey("PK_Subscribers", x => x.Id);
 0280                    table.ForeignKey(
 0281                        name: "FK_Subscribers_AppUsers_CustomerId",
 0282                        column: x => x.CustomerId,
 0283                        principalTable: "AppUsers",
 0284                        principalColumn: "Id",
 0285                        onDelete: ReferentialAction.Cascade);
 0286                    table.ForeignKey(
 0287                        name: "FK_Subscribers_Subscriptions_SubscriptionId",
 0288                        column: x => x.SubscriptionId,
 0289                        principalTable: "Subscriptions",
 0290                        principalColumn: "Id",
 0291                        onDelete: ReferentialAction.Cascade);
 0292                });
 293
 0294            migrationBuilder.CreateIndex(
 0295                name: "IX_AppRoleClaims_RoleId",
 0296                table: "AppRoleClaims",
 0297                column: "RoleId");
 298
 0299            migrationBuilder.CreateIndex(
 0300                name: "RoleNameIndex",
 0301                table: "AppRoles",
 0302                column: "NormalizedName",
 0303                unique: true,
 0304                filter: "[NormalizedName] IS NOT NULL");
 305
 0306            migrationBuilder.CreateIndex(
 0307                name: "IX_AppUserClaims_UserId",
 0308                table: "AppUserClaims",
 0309                column: "UserId");
 310
 0311            migrationBuilder.CreateIndex(
 0312                name: "IX_AppUserLogins_UserId",
 0313                table: "AppUserLogins",
 0314                column: "UserId");
 315
 0316            migrationBuilder.CreateIndex(
 0317                name: "IX_AppUserRoles_RoleId",
 0318                table: "AppUserRoles",
 0319                column: "RoleId");
 320
 0321            migrationBuilder.CreateIndex(
 0322                name: "EmailIndex",
 0323                table: "AppUsers",
 0324                column: "NormalizedEmail");
 325
 0326            migrationBuilder.CreateIndex(
 0327                name: "UserNameIndex",
 0328                table: "AppUsers",
 0329                column: "NormalizedUserName",
 0330                unique: true,
 0331                filter: "[NormalizedUserName] IS NOT NULL");
 332
 0333            migrationBuilder.CreateIndex(
 0334                name: "IX_Carts_ClotheId",
 0335                table: "Carts",
 0336                column: "ClotheId");
 337
 0338            migrationBuilder.CreateIndex(
 0339                name: "IX_Carts_UserId",
 0340                table: "Carts",
 0341                column: "UserId");
 342
 0343            migrationBuilder.CreateIndex(
 0344                name: "IX_Subscribers_CustomerId",
 0345                table: "Subscribers",
 0346                column: "CustomerId");
 347
 0348            migrationBuilder.CreateIndex(
 0349                name: "IX_Subscribers_SubscriptionId",
 0350                table: "Subscribers",
 0351                column: "SubscriptionId");
 0352        }
 353
 354        protected override void Down(MigrationBuilder migrationBuilder)
 0355        {
 0356            migrationBuilder.DropTable(
 0357                name: "AppRoleClaims");
 358
 0359            migrationBuilder.DropTable(
 0360                name: "AppUserClaims");
 361
 0362            migrationBuilder.DropTable(
 0363                name: "AppUserLogins");
 364
 0365            migrationBuilder.DropTable(
 0366                name: "AppUserRoles");
 367
 0368            migrationBuilder.DropTable(
 0369                name: "AppUserTokens");
 370
 0371            migrationBuilder.DropTable(
 0372                name: "Carts");
 373
 0374            migrationBuilder.DropTable(
 0375                name: "Musics");
 376
 0377            migrationBuilder.DropTable(
 0378                name: "Orders");
 379
 0380            migrationBuilder.DropTable(
 0381                name: "Subscribers");
 382
 0383            migrationBuilder.DropTable(
 0384                name: "AppRoles");
 385
 0386            migrationBuilder.DropTable(
 0387                name: "Clothes");
 388
 0389            migrationBuilder.DropTable(
 0390                name: "AppUsers");
 391
 0392            migrationBuilder.DropTable(
 0393                name: "Subscriptions");
 0394        }
 395    }
 396}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220121091524_Migration_1.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220121091524_Migration_1")]
 18    partial class Migration_1
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<string>("Author")
 0326                        .IsRequired()
 0327                        .HasMaxLength(200)
 0328                        .HasColumnType("nvarchar(200)");
 0329
 0330                    b.Property<DateTime>("DateRelease")
 0331                        .HasColumnType("datetime2");
 0332
 0333                    b.Property<string>("Description")
 0334                        .IsRequired()
 0335                        .HasMaxLength(1000)
 0336                        .HasColumnType("nvarchar(1000)");
 0337
 0338                    b.Property<string>("ImageName")
 0339                        .IsRequired()
 0340                        .HasMaxLength(200)
 0341                        .HasColumnType("nvarchar(200)");
 0342
 0343                    b.Property<string>("ImagePath")
 0344                        .IsRequired()
 0345                        .HasMaxLength(200)
 0346                        .HasColumnType("nvarchar(200)");
 0347
 0348                    b.Property<string>("Title")
 0349                        .IsRequired()
 0350                        .HasMaxLength(200)
 0351                        .HasColumnType("nvarchar(200)");
 0352
 0353                    b.HasKey("Id");
 0354
 0355                    b.ToTable("Musics", (string)null);
 0356                });
 357
 0358            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0359                {
 0360                    b.Property<int>("Id")
 0361                        .ValueGeneratedOnAdd()
 0362                        .HasColumnType("int");
 0363
 0364                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0365
 0366                    b.Property<string>("Description")
 0367                        .IsRequired()
 0368                        .HasMaxLength(200)
 0369                        .HasColumnType("nvarchar(200)");
 0370
 0371                    b.Property<string>("Discount")
 0372                        .HasColumnType("nvarchar(max)");
 0373
 0374                    b.Property<string>("ListPrice")
 0375                        .HasColumnType("nvarchar(max)");
 0376
 0377                    b.Property<int>("Quantity")
 0378                        .HasColumnType("int");
 0379
 0380                    b.Property<string>("SalePrice")
 0381                        .HasColumnType("nvarchar(max)");
 0382
 0383                    b.Property<string>("Tax")
 0384                        .HasColumnType("nvarchar(max)");
 0385
 0386                    b.Property<string>("Total")
 0387                        .HasColumnType("nvarchar(max)");
 0388
 0389                    b.HasKey("Id");
 0390
 0391                    b.ToTable("Orders", (string)null);
 0392                });
 393
 0394            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0395                {
 0396                    b.Property<int>("Id")
 0397                        .ValueGeneratedOnAdd()
 0398                        .HasColumnType("int");
 0399
 0400                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0401
 0402                    b.Property<DateTime>("CurrentPeriodEnd")
 0403                        .HasColumnType("datetime2");
 0404
 0405                    b.Property<int>("CustomerId")
 0406                        .HasColumnType("int");
 0407
 0408                    b.Property<DateTime>("DateStart")
 0409                        .HasColumnType("datetime2");
 0410
 0411                    b.Property<int>("Status")
 0412                        .HasMaxLength(200)
 0413                        .HasColumnType("int");
 0414
 0415                    b.Property<int>("SubscriptionId")
 0416                        .HasColumnType("int");
 0417
 0418                    b.HasKey("Id");
 0419
 0420                    b.HasIndex("CustomerId");
 0421
 0422                    b.HasIndex("SubscriptionId");
 0423
 0424                    b.ToTable("Subscribers", (string)null);
 0425                });
 426
 0427            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0428                {
 0429                    b.Property<int>("Id")
 0430                        .ValueGeneratedOnAdd()
 0431                        .HasColumnType("int");
 0432
 0433                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0434
 0435                    b.Property<string>("ChargeType")
 0436                        .IsRequired()
 0437                        .HasMaxLength(100)
 0438                        .HasColumnType("nvarchar(100)");
 0439
 0440                    b.Property<string>("Currency")
 0441                        .IsRequired()
 0442                        .HasColumnType("nvarchar(max)");
 0443
 0444                    b.Property<string>("CurrencySymbol")
 0445                        .IsRequired()
 0446                        .HasColumnType("nvarchar(max)");
 0447
 0448                    b.Property<string>("Name")
 0449                        .IsRequired()
 0450                        .HasMaxLength(200)
 0451                        .HasColumnType("nvarchar(200)");
 0452
 0453                    b.Property<string>("Options")
 0454                        .IsRequired()
 0455                        .HasMaxLength(500)
 0456                        .HasColumnType("nvarchar(500)");
 0457
 0458                    b.Property<decimal>("Price")
 0459                        .HasColumnType("decimal(18,2)");
 0460
 0461                    b.HasKey("Id");
 0462
 0463                    b.ToTable("Subscriptions", (string)null);
 0464                });
 465
 0466            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0467                {
 0468                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0469                        .WithMany()
 0470                        .HasForeignKey("ClotheId");
 0471
 0472                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0473                        .WithMany()
 0474                        .HasForeignKey("UserId");
 0475
 0476                    b.Navigation("Clothe");
 0477
 0478                    b.Navigation("User");
 0479                });
 480
 0481            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0482                {
 0483                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0484                        .WithMany("Claims")
 0485                        .HasForeignKey("RoleId")
 0486                        .OnDelete(DeleteBehavior.Cascade)
 0487                        .IsRequired();
 0488
 0489                    b.Navigation("Role");
 0490                });
 491
 0492            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0493                {
 0494                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0495                        .WithMany("Claims")
 0496                        .HasForeignKey("UserId")
 0497                        .OnDelete(DeleteBehavior.Cascade)
 0498                        .IsRequired();
 0499
 0500                    b.Navigation("User");
 0501                });
 502
 0503            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0504                {
 0505                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0506                        .WithMany("Logins")
 0507                        .HasForeignKey("UserId")
 0508                        .OnDelete(DeleteBehavior.Cascade)
 0509                        .IsRequired();
 0510
 0511                    b.Navigation("User");
 0512                });
 513
 0514            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0515                {
 0516                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0517                        .WithMany("Users")
 0518                        .HasForeignKey("RoleId")
 0519                        .OnDelete(DeleteBehavior.Cascade)
 0520                        .IsRequired();
 0521
 0522                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0523                        .WithMany("Roles")
 0524                        .HasForeignKey("UserId")
 0525                        .OnDelete(DeleteBehavior.Cascade)
 0526                        .IsRequired();
 0527
 0528                    b.Navigation("Role");
 0529
 0530                    b.Navigation("User");
 0531                });
 532
 0533            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0534                {
 0535                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0536                        .WithMany("UserTokens")
 0537                        .HasForeignKey("UserId")
 0538                        .OnDelete(DeleteBehavior.Cascade)
 0539                        .IsRequired();
 0540
 0541                    b.Navigation("User");
 0542                });
 543
 0544            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0545                {
 0546                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0547                        .WithMany()
 0548                        .HasForeignKey("CustomerId")
 0549                        .OnDelete(DeleteBehavior.Cascade)
 0550                        .IsRequired();
 0551
 0552                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0553                        .WithMany()
 0554                        .HasForeignKey("SubscriptionId")
 0555                        .OnDelete(DeleteBehavior.Cascade)
 0556                        .IsRequired();
 0557
 0558                    b.Navigation("Customer");
 0559
 0560                    b.Navigation("Subscription");
 0561                });
 562
 0563            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0564                {
 0565                    b.Navigation("Claims");
 0566
 0567                    b.Navigation("Users");
 0568                });
 569
 0570            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0571                {
 0572                    b.Navigation("Claims");
 0573
 0574                    b.Navigation("Logins");
 0575
 0576                    b.Navigation("Roles");
 0577
 0578                    b.Navigation("UserTokens");
 0579                });
 580#pragma warning restore 612, 618
 0581        }
 582    }
 583}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_10.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_10.html deleted file mode 100644 index 8e0869d0..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_10.html +++ /dev/null @@ -1,1449 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_10 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:1147
Coverable lines:1147
Total lines:1270
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220128192523_Migration_10.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_10 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.DropIndex(
 015                name: "UserNameIndex",
 016                table: "AppUsers");
 17
 018            migrationBuilder.DropIndex(
 019                name: "RoleNameIndex",
 020                table: "AppRoles");
 21
 022            migrationBuilder.AlterColumn<int>(
 023                name: "Price",
 024                table: "Subscriptions",
 025                type: "int",
 026                nullable: false,
 027                oldClrType: typeof(decimal),
 028                oldType: "decimal(18,2)");
 29
 030            migrationBuilder.AlterColumn<string>(
 031                name: "Options",
 032                table: "Subscriptions",
 033                type: "nvarchar(1000)",
 034                maxLength: 1000,
 035                nullable: false,
 036                oldClrType: typeof(string),
 037                oldType: "nvarchar(500)",
 038                oldMaxLength: 500);
 39
 040            migrationBuilder.AlterColumn<string>(
 041                name: "ImagePath",
 042                table: "Subscriptions",
 043                type: "nvarchar(200)",
 044                maxLength: 200,
 045                nullable: false,
 046                oldClrType: typeof(string),
 047                oldType: "nvarchar(500)",
 048                oldMaxLength: 500);
 49
 050            migrationBuilder.AlterColumn<string>(
 051                name: "ImageName",
 052                table: "Subscriptions",
 053                type: "nvarchar(200)",
 054                maxLength: 200,
 055                nullable: false,
 056                oldClrType: typeof(string),
 057                oldType: "nvarchar(500)",
 058                oldMaxLength: 500);
 59
 060            migrationBuilder.AlterColumn<string>(
 061                name: "CurrencySymbol",
 062                table: "Subscriptions",
 063                type: "nvarchar(5)",
 064                maxLength: 5,
 065                nullable: false,
 066                oldClrType: typeof(string),
 067                oldType: "nvarchar(max)");
 68
 069            migrationBuilder.AlterColumn<string>(
 070                name: "Currency",
 071                table: "Subscriptions",
 072                type: "nvarchar(25)",
 073                maxLength: 25,
 074                nullable: false,
 075                oldClrType: typeof(string),
 076                oldType: "nvarchar(max)");
 77
 078            migrationBuilder.AlterColumn<string>(
 079                name: "ChargeType",
 080                table: "Subscriptions",
 081                type: "nvarchar(25)",
 082                maxLength: 25,
 083                nullable: false,
 084                oldClrType: typeof(string),
 085                oldType: "nvarchar(100)",
 086                oldMaxLength: 100);
 87
 088            migrationBuilder.AlterColumn<string>(
 089                name: "StripeSubscriberSubscriptionId",
 090                table: "Subscribers",
 091                type: "nvarchar(500)",
 092                maxLength: 500,
 093                nullable: false,
 094                oldClrType: typeof(string),
 095                oldType: "nvarchar(max)");
 96
 097            migrationBuilder.AlterColumn<string>(
 098                name: "HostedInvoiceUrl",
 099                table: "Subscribers",
 0100                type: "nvarchar(700)",
 0101                maxLength: 700,
 0102                nullable: false,
 0103                oldClrType: typeof(string),
 0104                oldType: "nvarchar(max)");
 105
 0106            migrationBuilder.AlterColumn<string>(
 0107                name: "UserEmail",
 0108                table: "Receipts",
 0109                type: "nvarchar(100)",
 0110                maxLength: 100,
 0111                nullable: false,
 0112                oldClrType: typeof(string),
 0113                oldType: "nvarchar(200)",
 0114                oldMaxLength: 200);
 115
 0116            migrationBuilder.AlterColumn<string>(
 0117                name: "UserEmail",
 0118                table: "Orders",
 0119                type: "nvarchar(100)",
 0120                maxLength: 100,
 0121                nullable: false,
 0122                oldClrType: typeof(string),
 0123                oldType: "nvarchar(200)",
 0124                oldMaxLength: 200);
 125
 0126            migrationBuilder.AlterColumn<string>(
 0127                name: "UserName",
 0128                table: "AppUsers",
 0129                type: "nvarchar(250)",
 0130                maxLength: 250,
 0131                nullable: false,
 0132                defaultValue: "",
 0133                oldClrType: typeof(string),
 0134                oldType: "nvarchar(256)",
 0135                oldMaxLength: 256,
 0136                oldNullable: true);
 137
 0138            migrationBuilder.AlterColumn<string>(
 0139                name: "SecurityStamp",
 0140                table: "AppUsers",
 0141                type: "nvarchar(max)",
 0142                nullable: false,
 0143                defaultValue: "",
 0144                oldClrType: typeof(string),
 0145                oldType: "nvarchar(max)",
 0146                oldNullable: true);
 147
 0148            migrationBuilder.AlterColumn<string>(
 0149                name: "PasswordHash",
 0150                table: "AppUsers",
 0151                type: "nvarchar(max)",
 0152                nullable: false,
 0153                defaultValue: "",
 0154                oldClrType: typeof(string),
 0155                oldType: "nvarchar(max)",
 0156                oldNullable: true);
 157
 0158            migrationBuilder.AlterColumn<string>(
 0159                name: "NormalizedUserName",
 0160                table: "AppUsers",
 0161                type: "nvarchar(250)",
 0162                maxLength: 250,
 0163                nullable: false,
 0164                defaultValue: "",
 0165                oldClrType: typeof(string),
 0166                oldType: "nvarchar(256)",
 0167                oldMaxLength: 256,
 0168                oldNullable: true);
 169
 0170            migrationBuilder.AlterColumn<string>(
 0171                name: "NormalizedEmail",
 0172                table: "AppUsers",
 0173                type: "nvarchar(150)",
 0174                maxLength: 150,
 0175                nullable: false,
 0176                defaultValue: "",
 0177                oldClrType: typeof(string),
 0178                oldType: "nvarchar(256)",
 0179                oldMaxLength: 256,
 0180                oldNullable: true);
 181
 0182            migrationBuilder.AlterColumn<string>(
 0183                name: "LastName",
 0184                table: "AppUsers",
 0185                type: "nvarchar(100)",
 0186                maxLength: 100,
 0187                nullable: false,
 0188                defaultValue: "",
 0189                oldClrType: typeof(string),
 0190                oldType: "nvarchar(max)",
 0191                oldNullable: true);
 192
 0193            migrationBuilder.AlterColumn<string>(
 0194                name: "FirstName",
 0195                table: "AppUsers",
 0196                type: "nvarchar(100)",
 0197                maxLength: 100,
 0198                nullable: false,
 0199                defaultValue: "",
 0200                oldClrType: typeof(string),
 0201                oldType: "nvarchar(max)",
 0202                oldNullable: true);
 203
 0204            migrationBuilder.AlterColumn<string>(
 0205                name: "Email",
 0206                table: "AppUsers",
 0207                type: "nvarchar(150)",
 0208                maxLength: 150,
 0209                nullable: false,
 0210                defaultValue: "",
 0211                oldClrType: typeof(string),
 0212                oldType: "nvarchar(256)",
 0213                oldMaxLength: 256,
 0214                oldNullable: true);
 215
 0216            migrationBuilder.AlterColumn<string>(
 0217                name: "ConcurrencyStamp",
 0218                table: "AppUsers",
 0219                type: "nvarchar(max)",
 0220                nullable: false,
 0221                defaultValue: "",
 0222                oldClrType: typeof(string),
 0223                oldType: "nvarchar(max)",
 0224                oldNullable: true);
 225
 0226            migrationBuilder.AlterColumn<string>(
 0227                name: "ClaimValue",
 0228                table: "AppUserClaims",
 0229                type: "nvarchar(200)",
 0230                maxLength: 200,
 0231                nullable: false,
 0232                defaultValue: "",
 0233                oldClrType: typeof(string),
 0234                oldType: "nvarchar(max)",
 0235                oldNullable: true);
 236
 0237            migrationBuilder.AlterColumn<string>(
 0238                name: "ClaimType",
 0239                table: "AppUserClaims",
 0240                type: "nvarchar(200)",
 0241                maxLength: 200,
 0242                nullable: false,
 0243                defaultValue: "",
 0244                oldClrType: typeof(string),
 0245                oldType: "nvarchar(max)",
 0246                oldNullable: true);
 247
 0248            migrationBuilder.AlterColumn<string>(
 0249                name: "NormalizedName",
 0250                table: "AppRoles",
 0251                type: "nvarchar(100)",
 0252                maxLength: 100,
 0253                nullable: false,
 0254                defaultValue: "",
 0255                oldClrType: typeof(string),
 0256                oldType: "nvarchar(256)",
 0257                oldMaxLength: 256,
 0258                oldNullable: true);
 259
 0260            migrationBuilder.AlterColumn<string>(
 0261                name: "Name",
 0262                table: "AppRoles",
 0263                type: "nvarchar(100)",
 0264                maxLength: 100,
 0265                nullable: false,
 0266                defaultValue: "",
 0267                oldClrType: typeof(string),
 0268                oldType: "nvarchar(256)",
 0269                oldMaxLength: 256,
 0270                oldNullable: true);
 271
 0272            migrationBuilder.AlterColumn<string>(
 0273                name: "ClaimValue",
 0274                table: "AppRoleClaims",
 0275                type: "nvarchar(200)",
 0276                maxLength: 200,
 0277                nullable: false,
 0278                defaultValue: "",
 0279                oldClrType: typeof(string),
 0280                oldType: "nvarchar(max)",
 0281                oldNullable: true);
 282
 0283            migrationBuilder.AlterColumn<string>(
 0284                name: "ClaimType",
 0285                table: "AppRoleClaims",
 0286                type: "nvarchar(200)",
 0287                maxLength: 200,
 0288                nullable: false,
 0289                defaultValue: "",
 0290                oldClrType: typeof(string),
 0291                oldType: "nvarchar(max)",
 0292                oldNullable: true);
 293
 0294            migrationBuilder.CreateIndex(
 0295                name: "UserNameIndex",
 0296                table: "AppUsers",
 0297                column: "NormalizedUserName",
 0298                unique: true);
 299
 0300            migrationBuilder.CreateIndex(
 0301                name: "RoleNameIndex",
 0302                table: "AppRoles",
 0303                column: "NormalizedName",
 0304                unique: true);
 0305        }
 306
 307        protected override void Down(MigrationBuilder migrationBuilder)
 0308        {
 0309            migrationBuilder.DropIndex(
 0310                name: "UserNameIndex",
 0311                table: "AppUsers");
 312
 0313            migrationBuilder.DropIndex(
 0314                name: "RoleNameIndex",
 0315                table: "AppRoles");
 316
 0317            migrationBuilder.AlterColumn<decimal>(
 0318                name: "Price",
 0319                table: "Subscriptions",
 0320                type: "decimal(18,2)",
 0321                nullable: false,
 0322                oldClrType: typeof(int),
 0323                oldType: "int");
 324
 0325            migrationBuilder.AlterColumn<string>(
 0326                name: "Options",
 0327                table: "Subscriptions",
 0328                type: "nvarchar(500)",
 0329                maxLength: 500,
 0330                nullable: false,
 0331                oldClrType: typeof(string),
 0332                oldType: "nvarchar(1000)",
 0333                oldMaxLength: 1000);
 334
 0335            migrationBuilder.AlterColumn<string>(
 0336                name: "ImagePath",
 0337                table: "Subscriptions",
 0338                type: "nvarchar(500)",
 0339                maxLength: 500,
 0340                nullable: false,
 0341                oldClrType: typeof(string),
 0342                oldType: "nvarchar(200)",
 0343                oldMaxLength: 200);
 344
 0345            migrationBuilder.AlterColumn<string>(
 0346                name: "ImageName",
 0347                table: "Subscriptions",
 0348                type: "nvarchar(500)",
 0349                maxLength: 500,
 0350                nullable: false,
 0351                oldClrType: typeof(string),
 0352                oldType: "nvarchar(200)",
 0353                oldMaxLength: 200);
 354
 0355            migrationBuilder.AlterColumn<string>(
 0356                name: "CurrencySymbol",
 0357                table: "Subscriptions",
 0358                type: "nvarchar(max)",
 0359                nullable: false,
 0360                oldClrType: typeof(string),
 0361                oldType: "nvarchar(5)",
 0362                oldMaxLength: 5);
 363
 0364            migrationBuilder.AlterColumn<string>(
 0365                name: "Currency",
 0366                table: "Subscriptions",
 0367                type: "nvarchar(max)",
 0368                nullable: false,
 0369                oldClrType: typeof(string),
 0370                oldType: "nvarchar(25)",
 0371                oldMaxLength: 25);
 372
 0373            migrationBuilder.AlterColumn<string>(
 0374                name: "ChargeType",
 0375                table: "Subscriptions",
 0376                type: "nvarchar(100)",
 0377                maxLength: 100,
 0378                nullable: false,
 0379                oldClrType: typeof(string),
 0380                oldType: "nvarchar(25)",
 0381                oldMaxLength: 25);
 382
 0383            migrationBuilder.AlterColumn<string>(
 0384                name: "StripeSubscriberSubscriptionId",
 0385                table: "Subscribers",
 0386                type: "nvarchar(max)",
 0387                nullable: false,
 0388                oldClrType: typeof(string),
 0389                oldType: "nvarchar(500)",
 0390                oldMaxLength: 500);
 391
 0392            migrationBuilder.AlterColumn<string>(
 0393                name: "HostedInvoiceUrl",
 0394                table: "Subscribers",
 0395                type: "nvarchar(max)",
 0396                nullable: false,
 0397                oldClrType: typeof(string),
 0398                oldType: "nvarchar(700)",
 0399                oldMaxLength: 700);
 400
 0401            migrationBuilder.AlterColumn<string>(
 0402                name: "UserEmail",
 0403                table: "Receipts",
 0404                type: "nvarchar(200)",
 0405                maxLength: 200,
 0406                nullable: false,
 0407                oldClrType: typeof(string),
 0408                oldType: "nvarchar(100)",
 0409                oldMaxLength: 100);
 410
 0411            migrationBuilder.AlterColumn<string>(
 0412                name: "UserEmail",
 0413                table: "Orders",
 0414                type: "nvarchar(200)",
 0415                maxLength: 200,
 0416                nullable: false,
 0417                oldClrType: typeof(string),
 0418                oldType: "nvarchar(100)",
 0419                oldMaxLength: 100);
 420
 0421            migrationBuilder.AlterColumn<string>(
 0422                name: "UserName",
 0423                table: "AppUsers",
 0424                type: "nvarchar(256)",
 0425                maxLength: 256,
 0426                nullable: true,
 0427                oldClrType: typeof(string),
 0428                oldType: "nvarchar(250)",
 0429                oldMaxLength: 250);
 430
 0431            migrationBuilder.AlterColumn<string>(
 0432                name: "SecurityStamp",
 0433                table: "AppUsers",
 0434                type: "nvarchar(max)",
 0435                nullable: true,
 0436                oldClrType: typeof(string),
 0437                oldType: "nvarchar(max)");
 438
 0439            migrationBuilder.AlterColumn<string>(
 0440                name: "PasswordHash",
 0441                table: "AppUsers",
 0442                type: "nvarchar(max)",
 0443                nullable: true,
 0444                oldClrType: typeof(string),
 0445                oldType: "nvarchar(max)");
 446
 0447            migrationBuilder.AlterColumn<string>(
 0448                name: "NormalizedUserName",
 0449                table: "AppUsers",
 0450                type: "nvarchar(256)",
 0451                maxLength: 256,
 0452                nullable: true,
 0453                oldClrType: typeof(string),
 0454                oldType: "nvarchar(250)",
 0455                oldMaxLength: 250);
 456
 0457            migrationBuilder.AlterColumn<string>(
 0458                name: "NormalizedEmail",
 0459                table: "AppUsers",
 0460                type: "nvarchar(256)",
 0461                maxLength: 256,
 0462                nullable: true,
 0463                oldClrType: typeof(string),
 0464                oldType: "nvarchar(150)",
 0465                oldMaxLength: 150);
 466
 0467            migrationBuilder.AlterColumn<string>(
 0468                name: "LastName",
 0469                table: "AppUsers",
 0470                type: "nvarchar(max)",
 0471                nullable: true,
 0472                oldClrType: typeof(string),
 0473                oldType: "nvarchar(100)",
 0474                oldMaxLength: 100);
 475
 0476            migrationBuilder.AlterColumn<string>(
 0477                name: "FirstName",
 0478                table: "AppUsers",
 0479                type: "nvarchar(max)",
 0480                nullable: true,
 0481                oldClrType: typeof(string),
 0482                oldType: "nvarchar(100)",
 0483                oldMaxLength: 100);
 484
 0485            migrationBuilder.AlterColumn<string>(
 0486                name: "Email",
 0487                table: "AppUsers",
 0488                type: "nvarchar(256)",
 0489                maxLength: 256,
 0490                nullable: true,
 0491                oldClrType: typeof(string),
 0492                oldType: "nvarchar(150)",
 0493                oldMaxLength: 150);
 494
 0495            migrationBuilder.AlterColumn<string>(
 0496                name: "ConcurrencyStamp",
 0497                table: "AppUsers",
 0498                type: "nvarchar(max)",
 0499                nullable: true,
 0500                oldClrType: typeof(string),
 0501                oldType: "nvarchar(max)");
 502
 0503            migrationBuilder.AlterColumn<string>(
 0504                name: "ClaimValue",
 0505                table: "AppUserClaims",
 0506                type: "nvarchar(max)",
 0507                nullable: true,
 0508                oldClrType: typeof(string),
 0509                oldType: "nvarchar(200)",
 0510                oldMaxLength: 200);
 511
 0512            migrationBuilder.AlterColumn<string>(
 0513                name: "ClaimType",
 0514                table: "AppUserClaims",
 0515                type: "nvarchar(max)",
 0516                nullable: true,
 0517                oldClrType: typeof(string),
 0518                oldType: "nvarchar(200)",
 0519                oldMaxLength: 200);
 520
 0521            migrationBuilder.AlterColumn<string>(
 0522                name: "NormalizedName",
 0523                table: "AppRoles",
 0524                type: "nvarchar(256)",
 0525                maxLength: 256,
 0526                nullable: true,
 0527                oldClrType: typeof(string),
 0528                oldType: "nvarchar(100)",
 0529                oldMaxLength: 100);
 530
 0531            migrationBuilder.AlterColumn<string>(
 0532                name: "Name",
 0533                table: "AppRoles",
 0534                type: "nvarchar(256)",
 0535                maxLength: 256,
 0536                nullable: true,
 0537                oldClrType: typeof(string),
 0538                oldType: "nvarchar(100)",
 0539                oldMaxLength: 100);
 540
 0541            migrationBuilder.AlterColumn<string>(
 0542                name: "ClaimValue",
 0543                table: "AppRoleClaims",
 0544                type: "nvarchar(max)",
 0545                nullable: true,
 0546                oldClrType: typeof(string),
 0547                oldType: "nvarchar(200)",
 0548                oldMaxLength: 200);
 549
 0550            migrationBuilder.AlterColumn<string>(
 0551                name: "ClaimType",
 0552                table: "AppRoleClaims",
 0553                type: "nvarchar(max)",
 0554                nullable: true,
 0555                oldClrType: typeof(string),
 0556                oldType: "nvarchar(200)",
 0557                oldMaxLength: 200);
 558
 0559            migrationBuilder.CreateIndex(
 0560                name: "UserNameIndex",
 0561                table: "AppUsers",
 0562                column: "NormalizedUserName",
 0563                unique: true,
 0564                filter: "[NormalizedUserName] IS NOT NULL");
 565
 0566            migrationBuilder.CreateIndex(
 0567                name: "RoleNameIndex",
 0568                table: "AppRoles",
 0569                column: "NormalizedName",
 0570                unique: true,
 0571                filter: "[NormalizedName] IS NOT NULL");
 0572        }
 573    }
 574}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220128192523_Migration_10.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220128192523_Migration_10")]
 18    partial class Migration_10
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .IsRequired()
 0121                        .HasMaxLength(100)
 0122                        .HasColumnType("nvarchar(100)");
 0123
 0124                    b.Property<string>("NormalizedName")
 0125                        .IsRequired()
 0126                        .HasMaxLength(100)
 0127                        .HasColumnType("nvarchar(100)");
 0128
 0129                    b.HasKey("Id");
 0130
 0131                    b.HasIndex("NormalizedName")
 0132                        .IsUnique()
 0133                        .HasDatabaseName("RoleNameIndex");
 0134
 0135                    b.ToTable("AppRoles", (string)null);
 0136                });
 137
 0138            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0139                {
 0140                    b.Property<int>("Id")
 0141                        .ValueGeneratedOnAdd()
 0142                        .HasColumnType("int");
 0143
 0144                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0145
 0146                    b.Property<string>("ClaimType")
 0147                        .IsRequired()
 0148                        .HasMaxLength(200)
 0149                        .HasColumnType("nvarchar(200)");
 0150
 0151                    b.Property<string>("ClaimValue")
 0152                        .IsRequired()
 0153                        .HasMaxLength(200)
 0154                        .HasColumnType("nvarchar(200)");
 0155
 0156                    b.Property<int>("RoleId")
 0157                        .HasColumnType("int");
 0158
 0159                    b.HasKey("Id");
 0160
 0161                    b.HasIndex("RoleId");
 0162
 0163                    b.ToTable("AppRoleClaims", (string)null);
 0164                });
 165
 0166            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0167                {
 0168                    b.Property<int>("Id")
 0169                        .ValueGeneratedOnAdd()
 0170                        .HasColumnType("int");
 0171
 0172                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0173
 0174                    b.Property<int>("AccessFailedCount")
 0175                        .HasColumnType("int");
 0176
 0177                    b.Property<string>("ConcurrencyStamp")
 0178                        .IsConcurrencyToken()
 0179                        .IsRequired()
 0180                        .HasColumnType("nvarchar(max)");
 0181
 0182                    b.Property<string>("Email")
 0183                        .IsRequired()
 0184                        .HasMaxLength(150)
 0185                        .HasColumnType("nvarchar(150)");
 0186
 0187                    b.Property<bool>("EmailConfirmed")
 0188                        .HasColumnType("bit");
 0189
 0190                    b.Property<string>("FirstName")
 0191                        .IsRequired()
 0192                        .HasMaxLength(100)
 0193                        .HasColumnType("nvarchar(100)");
 0194
 0195                    b.Property<bool>("IsActive")
 0196                        .HasColumnType("bit");
 0197
 0198                    b.Property<string>("LastName")
 0199                        .IsRequired()
 0200                        .HasMaxLength(100)
 0201                        .HasColumnType("nvarchar(100)");
 0202
 0203                    b.Property<bool>("LockoutEnabled")
 0204                        .HasColumnType("bit");
 0205
 0206                    b.Property<DateTimeOffset?>("LockoutEnd")
 0207                        .HasColumnType("datetimeoffset");
 0208
 0209                    b.Property<string>("NormalizedEmail")
 0210                        .IsRequired()
 0211                        .HasMaxLength(150)
 0212                        .HasColumnType("nvarchar(150)");
 0213
 0214                    b.Property<string>("NormalizedUserName")
 0215                        .IsRequired()
 0216                        .HasMaxLength(250)
 0217                        .HasColumnType("nvarchar(250)");
 0218
 0219                    b.Property<string>("PasswordHash")
 0220                        .IsRequired()
 0221                        .HasColumnType("nvarchar(max)");
 0222
 0223                    b.Property<string>("PhoneNumber")
 0224                        .HasColumnType("nvarchar(max)");
 0225
 0226                    b.Property<bool>("PhoneNumberConfirmed")
 0227                        .HasColumnType("bit");
 0228
 0229                    b.Property<string>("SecurityStamp")
 0230                        .IsRequired()
 0231                        .HasColumnType("nvarchar(max)");
 0232
 0233                    b.Property<bool>("TwoFactorEnabled")
 0234                        .HasColumnType("bit");
 0235
 0236                    b.Property<string>("UserName")
 0237                        .IsRequired()
 0238                        .HasMaxLength(250)
 0239                        .HasColumnType("nvarchar(250)");
 0240
 0241                    b.HasKey("Id");
 0242
 0243                    b.HasIndex("NormalizedEmail")
 0244                        .HasDatabaseName("EmailIndex");
 0245
 0246                    b.HasIndex("NormalizedUserName")
 0247                        .IsUnique()
 0248                        .HasDatabaseName("UserNameIndex");
 0249
 0250                    b.ToTable("AppUsers", (string)null);
 0251                });
 252
 0253            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0254                {
 0255                    b.Property<int>("Id")
 0256                        .ValueGeneratedOnAdd()
 0257                        .HasColumnType("int");
 0258
 0259                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0260
 0261                    b.Property<string>("ClaimType")
 0262                        .IsRequired()
 0263                        .HasMaxLength(200)
 0264                        .HasColumnType("nvarchar(200)");
 0265
 0266                    b.Property<string>("ClaimValue")
 0267                        .IsRequired()
 0268                        .HasMaxLength(200)
 0269                        .HasColumnType("nvarchar(200)");
 0270
 0271                    b.Property<int>("UserId")
 0272                        .HasColumnType("int");
 0273
 0274                    b.HasKey("Id");
 0275
 0276                    b.HasIndex("UserId");
 0277
 0278                    b.ToTable("AppUserClaims", (string)null);
 0279                });
 280
 0281            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0282                {
 0283                    b.Property<string>("LoginProvider")
 0284                        .HasColumnType("nvarchar(450)");
 0285
 0286                    b.Property<string>("ProviderKey")
 0287                        .HasColumnType("nvarchar(450)");
 0288
 0289                    b.Property<string>("ProviderDisplayName")
 0290                        .HasColumnType("nvarchar(max)");
 0291
 0292                    b.Property<int>("UserId")
 0293                        .HasColumnType("int");
 0294
 0295                    b.HasKey("LoginProvider", "ProviderKey");
 0296
 0297                    b.HasIndex("UserId");
 0298
 0299                    b.ToTable("AppUserLogins", (string)null);
 0300                });
 301
 0302            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0303                {
 0304                    b.Property<int>("UserId")
 0305                        .HasColumnType("int");
 0306
 0307                    b.Property<int>("RoleId")
 0308                        .HasColumnType("int");
 0309
 0310                    b.HasKey("UserId", "RoleId");
 0311
 0312                    b.HasIndex("RoleId");
 0313
 0314                    b.ToTable("AppUserRoles", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0318                {
 0319                    b.Property<int>("UserId")
 0320                        .HasColumnType("int");
 0321
 0322                    b.Property<string>("LoginProvider")
 0323                        .HasColumnType("nvarchar(450)");
 0324
 0325                    b.Property<string>("Name")
 0326                        .HasColumnType("nvarchar(450)");
 0327
 0328                    b.Property<string>("Value")
 0329                        .HasColumnType("nvarchar(max)");
 0330
 0331                    b.HasKey("UserId", "LoginProvider", "Name");
 0332
 0333                    b.ToTable("AppUserTokens", (string)null);
 0334                });
 335
 0336            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0337                {
 0338                    b.Property<int>("Id")
 0339                        .ValueGeneratedOnAdd()
 0340                        .HasColumnType("int");
 0341
 0342                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0343
 0344                    b.Property<int>("AmountSubTotal")
 0345                        .HasColumnType("int");
 0346
 0347                    b.Property<int>("AmountTotal")
 0348                        .HasColumnType("int");
 0349
 0350                    b.Property<string>("Name")
 0351                        .IsRequired()
 0352                        .HasMaxLength(200)
 0353                        .HasColumnType("nvarchar(200)");
 0354
 0355                    b.Property<int>("Quantity")
 0356                        .HasColumnType("int");
 0357
 0358                    b.Property<string>("UserEmail")
 0359                        .IsRequired()
 0360                        .HasMaxLength(100)
 0361                        .HasColumnType("nvarchar(100)");
 0362
 0363                    b.HasKey("Id");
 0364
 0365                    b.ToTable("Invoices", (string)null);
 0366                });
 367
 0368            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0369                {
 0370                    b.Property<int>("Id")
 0371                        .ValueGeneratedOnAdd()
 0372                        .HasColumnType("int");
 0373
 0374                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0375
 0376                    b.Property<int>("AccessLevel")
 0377                        .HasColumnType("int");
 0378
 0379                    b.Property<string>("Author")
 0380                        .IsRequired()
 0381                        .HasMaxLength(200)
 0382                        .HasColumnType("nvarchar(200)");
 0383
 0384                    b.Property<DateTime>("DateRelease")
 0385                        .HasColumnType("datetime2");
 0386
 0387                    b.Property<string>("Description")
 0388                        .IsRequired()
 0389                        .HasMaxLength(1000)
 0390                        .HasColumnType("nvarchar(1000)");
 0391
 0392                    b.Property<string>("ImageName")
 0393                        .IsRequired()
 0394                        .HasMaxLength(200)
 0395                        .HasColumnType("nvarchar(200)");
 0396
 0397                    b.Property<string>("ImagePath")
 0398                        .IsRequired()
 0399                        .HasMaxLength(200)
 0400                        .HasColumnType("nvarchar(200)");
 0401
 0402                    b.Property<string>("Title")
 0403                        .IsRequired()
 0404                        .HasMaxLength(200)
 0405                        .HasColumnType("nvarchar(200)");
 0406
 0407                    b.HasKey("Id");
 0408
 0409                    b.ToTable("Musics", (string)null);
 0410                });
 411
 0412            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0413                {
 0414                    b.Property<int>("Id")
 0415                        .ValueGeneratedOnAdd()
 0416                        .HasColumnType("int");
 0417
 0418                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0419
 0420                    b.Property<int>("AmountTotal")
 0421                        .HasMaxLength(50)
 0422                        .HasColumnType("int");
 0423
 0424                    b.Property<string>("LineItems")
 0425                        .IsRequired()
 0426                        .HasMaxLength(10000)
 0427                        .HasColumnType("nvarchar(max)");
 0428
 0429                    b.Property<DateTime>("OrderDate")
 0430                        .HasColumnType("datetime2");
 0431
 0432                    b.Property<string>("OrderName")
 0433                        .IsRequired()
 0434                        .HasMaxLength(200)
 0435                        .HasColumnType("nvarchar(200)");
 0436
 0437                    b.Property<string>("UserEmail")
 0438                        .IsRequired()
 0439                        .HasMaxLength(100)
 0440                        .HasColumnType("nvarchar(100)");
 0441
 0442                    b.HasKey("Id");
 0443
 0444                    b.ToTable("Orders", (string)null);
 0445                });
 446
 0447            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0448                {
 0449                    b.Property<int>("Id")
 0450                        .ValueGeneratedOnAdd()
 0451                        .HasColumnType("int");
 0452
 0453                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0454
 0455                    b.Property<DateTime>("ReceiptDate")
 0456                        .HasColumnType("datetime2");
 0457
 0458                    b.Property<string>("ReceiptName")
 0459                        .IsRequired()
 0460                        .HasMaxLength(200)
 0461                        .HasColumnType("nvarchar(200)");
 0462
 0463                    b.Property<string>("ReceiptUrl")
 0464                        .IsRequired()
 0465                        .HasMaxLength(500)
 0466                        .HasColumnType("nvarchar(500)");
 0467
 0468                    b.Property<string>("UserEmail")
 0469                        .IsRequired()
 0470                        .HasMaxLength(100)
 0471                        .HasColumnType("nvarchar(100)");
 0472
 0473                    b.HasKey("Id");
 0474
 0475                    b.ToTable("Receipts", (string)null);
 0476                });
 477
 0478            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0479                {
 0480                    b.Property<int>("Id")
 0481                        .ValueGeneratedOnAdd()
 0482                        .HasColumnType("int");
 0483
 0484                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0485
 0486                    b.Property<DateTime>("CurrentPeriodEnd")
 0487                        .HasColumnType("datetime2");
 0488
 0489                    b.Property<DateTime>("CurrentPeriodStart")
 0490                        .HasColumnType("datetime2");
 0491
 0492                    b.Property<int>("CustomerId")
 0493                        .HasColumnType("int");
 0494
 0495                    b.Property<DateTime>("DateStart")
 0496                        .HasColumnType("datetime2");
 0497
 0498                    b.Property<string>("HostedInvoiceUrl")
 0499                        .IsRequired()
 0500                        .HasMaxLength(700)
 0501                        .HasColumnType("nvarchar(700)");
 0502
 0503                    b.Property<int>("Status")
 0504                        .HasMaxLength(50)
 0505                        .HasColumnType("int");
 0506
 0507                    b.Property<string>("StripeSubscriberSubscriptionId")
 0508                        .IsRequired()
 0509                        .HasMaxLength(500)
 0510                        .HasColumnType("nvarchar(500)");
 0511
 0512                    b.Property<int>("SubscriptionId")
 0513                        .HasColumnType("int");
 0514
 0515                    b.HasKey("Id");
 0516
 0517                    b.HasIndex("CustomerId");
 0518
 0519                    b.HasIndex("SubscriptionId");
 0520
 0521                    b.ToTable("Subscribers", (string)null);
 0522                });
 523
 0524            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0525                {
 0526                    b.Property<int>("Id")
 0527                        .ValueGeneratedOnAdd()
 0528                        .HasColumnType("int");
 0529
 0530                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0531
 0532                    b.Property<string>("ChargeType")
 0533                        .IsRequired()
 0534                        .HasMaxLength(25)
 0535                        .HasColumnType("nvarchar(25)");
 0536
 0537                    b.Property<string>("Currency")
 0538                        .IsRequired()
 0539                        .HasMaxLength(25)
 0540                        .HasColumnType("nvarchar(25)");
 0541
 0542                    b.Property<string>("CurrencySymbol")
 0543                        .IsRequired()
 0544                        .HasMaxLength(5)
 0545                        .HasColumnType("nvarchar(5)");
 0546
 0547                    b.Property<string>("ImageName")
 0548                        .IsRequired()
 0549                        .HasMaxLength(200)
 0550                        .HasColumnType("nvarchar(200)");
 0551
 0552                    b.Property<string>("ImagePath")
 0553                        .IsRequired()
 0554                        .HasMaxLength(200)
 0555                        .HasColumnType("nvarchar(200)");
 0556
 0557                    b.Property<string>("Name")
 0558                        .IsRequired()
 0559                        .HasMaxLength(200)
 0560                        .HasColumnType("nvarchar(200)");
 0561
 0562                    b.Property<string>("Options")
 0563                        .IsRequired()
 0564                        .HasMaxLength(1000)
 0565                        .HasColumnType("nvarchar(1000)");
 0566
 0567                    b.Property<int>("Price")
 0568                        .HasColumnType("int");
 0569
 0570                    b.Property<string>("StripeSubscriptionId")
 0571                        .IsRequired()
 0572                        .HasColumnType("nvarchar(max)");
 0573
 0574                    b.HasKey("Id");
 0575
 0576                    b.ToTable("Subscriptions", (string)null);
 0577                });
 578
 0579            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0580                {
 0581                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0582                        .WithMany()
 0583                        .HasForeignKey("ClotheId");
 0584
 0585                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0586                        .WithMany()
 0587                        .HasForeignKey("UserId");
 0588
 0589                    b.Navigation("Clothe");
 0590
 0591                    b.Navigation("User");
 0592                });
 593
 0594            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0595                {
 0596                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0597                        .WithMany("Claims")
 0598                        .HasForeignKey("RoleId")
 0599                        .OnDelete(DeleteBehavior.Cascade)
 0600                        .IsRequired();
 0601
 0602                    b.Navigation("Role");
 0603                });
 604
 0605            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0606                {
 0607                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0608                        .WithMany("Claims")
 0609                        .HasForeignKey("UserId")
 0610                        .OnDelete(DeleteBehavior.Cascade)
 0611                        .IsRequired();
 0612
 0613                    b.Navigation("User");
 0614                });
 615
 0616            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0617                {
 0618                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0619                        .WithMany("Logins")
 0620                        .HasForeignKey("UserId")
 0621                        .OnDelete(DeleteBehavior.Cascade)
 0622                        .IsRequired();
 0623
 0624                    b.Navigation("User");
 0625                });
 626
 0627            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0628                {
 0629                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0630                        .WithMany("Users")
 0631                        .HasForeignKey("RoleId")
 0632                        .OnDelete(DeleteBehavior.Cascade)
 0633                        .IsRequired();
 0634
 0635                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0636                        .WithMany("Roles")
 0637                        .HasForeignKey("UserId")
 0638                        .OnDelete(DeleteBehavior.Cascade)
 0639                        .IsRequired();
 0640
 0641                    b.Navigation("Role");
 0642
 0643                    b.Navigation("User");
 0644                });
 645
 0646            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0647                {
 0648                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0649                        .WithMany("UserTokens")
 0650                        .HasForeignKey("UserId")
 0651                        .OnDelete(DeleteBehavior.Cascade)
 0652                        .IsRequired();
 0653
 0654                    b.Navigation("User");
 0655                });
 656
 0657            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0658                {
 0659                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0660                        .WithMany()
 0661                        .HasForeignKey("CustomerId")
 0662                        .OnDelete(DeleteBehavior.Cascade)
 0663                        .IsRequired();
 0664
 0665                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0666                        .WithMany()
 0667                        .HasForeignKey("SubscriptionId")
 0668                        .OnDelete(DeleteBehavior.Cascade)
 0669                        .IsRequired();
 0670
 0671                    b.Navigation("Customer");
 0672
 0673                    b.Navigation("Subscription");
 0674                });
 675
 0676            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0677                {
 0678                    b.Navigation("Claims");
 0679
 0680                    b.Navigation("Users");
 0681                });
 682
 0683            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0684                {
 0685                    b.Navigation("Claims");
 0686
 0687                    b.Navigation("Logins");
 0688
 0689                    b.Navigation("Roles");
 0690
 0691                    b.Navigation("UserTokens");
 0692                });
 693#pragma warning restore 612, 618
 0694        }
 695    }
 696}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_11.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_11.html deleted file mode 100644 index 7ca98c17..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_11.html +++ /dev/null @@ -1,944 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_11 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:696
Coverable lines:696
Total lines:765
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220129065440_Migration_11.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_11 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AlterColumn<string>(
 015                name: "SecurityStamp",
 016                table: "AppUsers",
 017                type: "nvarchar(max)",
 018                nullable: true,
 019                oldClrType: typeof(string),
 020                oldType: "nvarchar(max)");
 21
 022            migrationBuilder.AlterColumn<string>(
 023                name: "PasswordHash",
 024                table: "AppUsers",
 025                type: "nvarchar(max)",
 026                nullable: true,
 027                oldClrType: typeof(string),
 028                oldType: "nvarchar(max)");
 29
 030            migrationBuilder.AlterColumn<string>(
 031                name: "ConcurrencyStamp",
 032                table: "AppUsers",
 033                type: "nvarchar(max)",
 034                nullable: true,
 035                oldClrType: typeof(string),
 036                oldType: "nvarchar(max)");
 037        }
 38
 39        protected override void Down(MigrationBuilder migrationBuilder)
 040        {
 041            migrationBuilder.AlterColumn<string>(
 042                name: "SecurityStamp",
 043                table: "AppUsers",
 044                type: "nvarchar(max)",
 045                nullable: false,
 046                defaultValue: "",
 047                oldClrType: typeof(string),
 048                oldType: "nvarchar(max)",
 049                oldNullable: true);
 50
 051            migrationBuilder.AlterColumn<string>(
 052                name: "PasswordHash",
 053                table: "AppUsers",
 054                type: "nvarchar(max)",
 055                nullable: false,
 056                defaultValue: "",
 057                oldClrType: typeof(string),
 058                oldType: "nvarchar(max)",
 059                oldNullable: true);
 60
 061            migrationBuilder.AlterColumn<string>(
 062                name: "ConcurrencyStamp",
 063                table: "AppUsers",
 064                type: "nvarchar(max)",
 065                nullable: false,
 066                defaultValue: "",
 067                oldClrType: typeof(string),
 068                oldType: "nvarchar(max)",
 069                oldNullable: true);
 070        }
 71    }
 72}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220129065440_Migration_11.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220129065440_Migration_11")]
 18    partial class Migration_11
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .IsRequired()
 0121                        .HasMaxLength(100)
 0122                        .HasColumnType("nvarchar(100)");
 0123
 0124                    b.Property<string>("NormalizedName")
 0125                        .IsRequired()
 0126                        .HasMaxLength(100)
 0127                        .HasColumnType("nvarchar(100)");
 0128
 0129                    b.HasKey("Id");
 0130
 0131                    b.HasIndex("NormalizedName")
 0132                        .IsUnique()
 0133                        .HasDatabaseName("RoleNameIndex");
 0134
 0135                    b.ToTable("AppRoles", (string)null);
 0136                });
 137
 0138            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0139                {
 0140                    b.Property<int>("Id")
 0141                        .ValueGeneratedOnAdd()
 0142                        .HasColumnType("int");
 0143
 0144                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0145
 0146                    b.Property<string>("ClaimType")
 0147                        .IsRequired()
 0148                        .HasMaxLength(200)
 0149                        .HasColumnType("nvarchar(200)");
 0150
 0151                    b.Property<string>("ClaimValue")
 0152                        .IsRequired()
 0153                        .HasMaxLength(200)
 0154                        .HasColumnType("nvarchar(200)");
 0155
 0156                    b.Property<int>("RoleId")
 0157                        .HasColumnType("int");
 0158
 0159                    b.HasKey("Id");
 0160
 0161                    b.HasIndex("RoleId");
 0162
 0163                    b.ToTable("AppRoleClaims", (string)null);
 0164                });
 165
 0166            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0167                {
 0168                    b.Property<int>("Id")
 0169                        .ValueGeneratedOnAdd()
 0170                        .HasColumnType("int");
 0171
 0172                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0173
 0174                    b.Property<int>("AccessFailedCount")
 0175                        .HasColumnType("int");
 0176
 0177                    b.Property<string>("ConcurrencyStamp")
 0178                        .IsConcurrencyToken()
 0179                        .HasColumnType("nvarchar(max)");
 0180
 0181                    b.Property<string>("Email")
 0182                        .IsRequired()
 0183                        .HasMaxLength(150)
 0184                        .HasColumnType("nvarchar(150)");
 0185
 0186                    b.Property<bool>("EmailConfirmed")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("FirstName")
 0190                        .IsRequired()
 0191                        .HasMaxLength(100)
 0192                        .HasColumnType("nvarchar(100)");
 0193
 0194                    b.Property<bool>("IsActive")
 0195                        .HasColumnType("bit");
 0196
 0197                    b.Property<string>("LastName")
 0198                        .IsRequired()
 0199                        .HasMaxLength(100)
 0200                        .HasColumnType("nvarchar(100)");
 0201
 0202                    b.Property<bool>("LockoutEnabled")
 0203                        .HasColumnType("bit");
 0204
 0205                    b.Property<DateTimeOffset?>("LockoutEnd")
 0206                        .HasColumnType("datetimeoffset");
 0207
 0208                    b.Property<string>("NormalizedEmail")
 0209                        .IsRequired()
 0210                        .HasMaxLength(150)
 0211                        .HasColumnType("nvarchar(150)");
 0212
 0213                    b.Property<string>("NormalizedUserName")
 0214                        .IsRequired()
 0215                        .HasMaxLength(250)
 0216                        .HasColumnType("nvarchar(250)");
 0217
 0218                    b.Property<string>("PasswordHash")
 0219                        .HasColumnType("nvarchar(max)");
 0220
 0221                    b.Property<string>("PhoneNumber")
 0222                        .HasColumnType("nvarchar(max)");
 0223
 0224                    b.Property<bool>("PhoneNumberConfirmed")
 0225                        .HasColumnType("bit");
 0226
 0227                    b.Property<string>("SecurityStamp")
 0228                        .HasColumnType("nvarchar(max)");
 0229
 0230                    b.Property<bool>("TwoFactorEnabled")
 0231                        .HasColumnType("bit");
 0232
 0233                    b.Property<string>("UserName")
 0234                        .IsRequired()
 0235                        .HasMaxLength(250)
 0236                        .HasColumnType("nvarchar(250)");
 0237
 0238                    b.HasKey("Id");
 0239
 0240                    b.HasIndex("NormalizedEmail")
 0241                        .HasDatabaseName("EmailIndex");
 0242
 0243                    b.HasIndex("NormalizedUserName")
 0244                        .IsUnique()
 0245                        .HasDatabaseName("UserNameIndex");
 0246
 0247                    b.ToTable("AppUsers", (string)null);
 0248                });
 249
 0250            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0251                {
 0252                    b.Property<int>("Id")
 0253                        .ValueGeneratedOnAdd()
 0254                        .HasColumnType("int");
 0255
 0256                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0257
 0258                    b.Property<string>("ClaimType")
 0259                        .IsRequired()
 0260                        .HasMaxLength(200)
 0261                        .HasColumnType("nvarchar(200)");
 0262
 0263                    b.Property<string>("ClaimValue")
 0264                        .IsRequired()
 0265                        .HasMaxLength(200)
 0266                        .HasColumnType("nvarchar(200)");
 0267
 0268                    b.Property<int>("UserId")
 0269                        .HasColumnType("int");
 0270
 0271                    b.HasKey("Id");
 0272
 0273                    b.HasIndex("UserId");
 0274
 0275                    b.ToTable("AppUserClaims", (string)null);
 0276                });
 277
 0278            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0279                {
 0280                    b.Property<string>("LoginProvider")
 0281                        .HasColumnType("nvarchar(450)");
 0282
 0283                    b.Property<string>("ProviderKey")
 0284                        .HasColumnType("nvarchar(450)");
 0285
 0286                    b.Property<string>("ProviderDisplayName")
 0287                        .HasColumnType("nvarchar(max)");
 0288
 0289                    b.Property<int>("UserId")
 0290                        .HasColumnType("int");
 0291
 0292                    b.HasKey("LoginProvider", "ProviderKey");
 0293
 0294                    b.HasIndex("UserId");
 0295
 0296                    b.ToTable("AppUserLogins", (string)null);
 0297                });
 298
 0299            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0300                {
 0301                    b.Property<int>("UserId")
 0302                        .HasColumnType("int");
 0303
 0304                    b.Property<int>("RoleId")
 0305                        .HasColumnType("int");
 0306
 0307                    b.HasKey("UserId", "RoleId");
 0308
 0309                    b.HasIndex("RoleId");
 0310
 0311                    b.ToTable("AppUserRoles", (string)null);
 0312                });
 313
 0314            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0315                {
 0316                    b.Property<int>("UserId")
 0317                        .HasColumnType("int");
 0318
 0319                    b.Property<string>("LoginProvider")
 0320                        .HasColumnType("nvarchar(450)");
 0321
 0322                    b.Property<string>("Name")
 0323                        .HasColumnType("nvarchar(450)");
 0324
 0325                    b.Property<string>("Value")
 0326                        .HasColumnType("nvarchar(max)");
 0327
 0328                    b.HasKey("UserId", "LoginProvider", "Name");
 0329
 0330                    b.ToTable("AppUserTokens", (string)null);
 0331                });
 332
 0333            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0334                {
 0335                    b.Property<int>("Id")
 0336                        .ValueGeneratedOnAdd()
 0337                        .HasColumnType("int");
 0338
 0339                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0340
 0341                    b.Property<int>("AmountSubTotal")
 0342                        .HasColumnType("int");
 0343
 0344                    b.Property<int>("AmountTotal")
 0345                        .HasColumnType("int");
 0346
 0347                    b.Property<string>("Name")
 0348                        .IsRequired()
 0349                        .HasMaxLength(200)
 0350                        .HasColumnType("nvarchar(200)");
 0351
 0352                    b.Property<int>("Quantity")
 0353                        .HasColumnType("int");
 0354
 0355                    b.Property<string>("UserEmail")
 0356                        .IsRequired()
 0357                        .HasMaxLength(100)
 0358                        .HasColumnType("nvarchar(100)");
 0359
 0360                    b.HasKey("Id");
 0361
 0362                    b.ToTable("Invoices", (string)null);
 0363                });
 364
 0365            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0366                {
 0367                    b.Property<int>("Id")
 0368                        .ValueGeneratedOnAdd()
 0369                        .HasColumnType("int");
 0370
 0371                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0372
 0373                    b.Property<int>("AccessLevel")
 0374                        .HasColumnType("int");
 0375
 0376                    b.Property<string>("Author")
 0377                        .IsRequired()
 0378                        .HasMaxLength(200)
 0379                        .HasColumnType("nvarchar(200)");
 0380
 0381                    b.Property<DateTime>("DateRelease")
 0382                        .HasColumnType("datetime2");
 0383
 0384                    b.Property<string>("Description")
 0385                        .IsRequired()
 0386                        .HasMaxLength(1000)
 0387                        .HasColumnType("nvarchar(1000)");
 0388
 0389                    b.Property<string>("ImageName")
 0390                        .IsRequired()
 0391                        .HasMaxLength(200)
 0392                        .HasColumnType("nvarchar(200)");
 0393
 0394                    b.Property<string>("ImagePath")
 0395                        .IsRequired()
 0396                        .HasMaxLength(200)
 0397                        .HasColumnType("nvarchar(200)");
 0398
 0399                    b.Property<string>("Title")
 0400                        .IsRequired()
 0401                        .HasMaxLength(200)
 0402                        .HasColumnType("nvarchar(200)");
 0403
 0404                    b.HasKey("Id");
 0405
 0406                    b.ToTable("Musics", (string)null);
 0407                });
 408
 0409            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0410                {
 0411                    b.Property<int>("Id")
 0412                        .ValueGeneratedOnAdd()
 0413                        .HasColumnType("int");
 0414
 0415                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0416
 0417                    b.Property<int>("AmountTotal")
 0418                        .HasMaxLength(50)
 0419                        .HasColumnType("int");
 0420
 0421                    b.Property<string>("LineItems")
 0422                        .IsRequired()
 0423                        .HasMaxLength(10000)
 0424                        .HasColumnType("nvarchar(max)");
 0425
 0426                    b.Property<DateTime>("OrderDate")
 0427                        .HasColumnType("datetime2");
 0428
 0429                    b.Property<string>("OrderName")
 0430                        .IsRequired()
 0431                        .HasMaxLength(200)
 0432                        .HasColumnType("nvarchar(200)");
 0433
 0434                    b.Property<string>("UserEmail")
 0435                        .IsRequired()
 0436                        .HasMaxLength(100)
 0437                        .HasColumnType("nvarchar(100)");
 0438
 0439                    b.HasKey("Id");
 0440
 0441                    b.ToTable("Orders", (string)null);
 0442                });
 443
 0444            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0445                {
 0446                    b.Property<int>("Id")
 0447                        .ValueGeneratedOnAdd()
 0448                        .HasColumnType("int");
 0449
 0450                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0451
 0452                    b.Property<DateTime>("ReceiptDate")
 0453                        .HasColumnType("datetime2");
 0454
 0455                    b.Property<string>("ReceiptName")
 0456                        .IsRequired()
 0457                        .HasMaxLength(200)
 0458                        .HasColumnType("nvarchar(200)");
 0459
 0460                    b.Property<string>("ReceiptUrl")
 0461                        .IsRequired()
 0462                        .HasMaxLength(500)
 0463                        .HasColumnType("nvarchar(500)");
 0464
 0465                    b.Property<string>("UserEmail")
 0466                        .IsRequired()
 0467                        .HasMaxLength(100)
 0468                        .HasColumnType("nvarchar(100)");
 0469
 0470                    b.HasKey("Id");
 0471
 0472                    b.ToTable("Receipts", (string)null);
 0473                });
 474
 0475            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0476                {
 0477                    b.Property<int>("Id")
 0478                        .ValueGeneratedOnAdd()
 0479                        .HasColumnType("int");
 0480
 0481                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0482
 0483                    b.Property<DateTime>("CurrentPeriodEnd")
 0484                        .HasColumnType("datetime2");
 0485
 0486                    b.Property<DateTime>("CurrentPeriodStart")
 0487                        .HasColumnType("datetime2");
 0488
 0489                    b.Property<int>("CustomerId")
 0490                        .HasColumnType("int");
 0491
 0492                    b.Property<DateTime>("DateStart")
 0493                        .HasColumnType("datetime2");
 0494
 0495                    b.Property<string>("HostedInvoiceUrl")
 0496                        .IsRequired()
 0497                        .HasMaxLength(700)
 0498                        .HasColumnType("nvarchar(700)");
 0499
 0500                    b.Property<int>("Status")
 0501                        .HasMaxLength(50)
 0502                        .HasColumnType("int");
 0503
 0504                    b.Property<string>("StripeSubscriberSubscriptionId")
 0505                        .IsRequired()
 0506                        .HasMaxLength(500)
 0507                        .HasColumnType("nvarchar(500)");
 0508
 0509                    b.Property<int>("SubscriptionId")
 0510                        .HasColumnType("int");
 0511
 0512                    b.HasKey("Id");
 0513
 0514                    b.HasIndex("CustomerId");
 0515
 0516                    b.HasIndex("SubscriptionId");
 0517
 0518                    b.ToTable("Subscribers", (string)null);
 0519                });
 520
 0521            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0522                {
 0523                    b.Property<int>("Id")
 0524                        .ValueGeneratedOnAdd()
 0525                        .HasColumnType("int");
 0526
 0527                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0528
 0529                    b.Property<string>("ChargeType")
 0530                        .IsRequired()
 0531                        .HasMaxLength(25)
 0532                        .HasColumnType("nvarchar(25)");
 0533
 0534                    b.Property<string>("Currency")
 0535                        .IsRequired()
 0536                        .HasMaxLength(25)
 0537                        .HasColumnType("nvarchar(25)");
 0538
 0539                    b.Property<string>("CurrencySymbol")
 0540                        .IsRequired()
 0541                        .HasMaxLength(5)
 0542                        .HasColumnType("nvarchar(5)");
 0543
 0544                    b.Property<string>("ImageName")
 0545                        .IsRequired()
 0546                        .HasMaxLength(200)
 0547                        .HasColumnType("nvarchar(200)");
 0548
 0549                    b.Property<string>("ImagePath")
 0550                        .IsRequired()
 0551                        .HasMaxLength(200)
 0552                        .HasColumnType("nvarchar(200)");
 0553
 0554                    b.Property<string>("Name")
 0555                        .IsRequired()
 0556                        .HasMaxLength(200)
 0557                        .HasColumnType("nvarchar(200)");
 0558
 0559                    b.Property<string>("Options")
 0560                        .IsRequired()
 0561                        .HasMaxLength(1000)
 0562                        .HasColumnType("nvarchar(1000)");
 0563
 0564                    b.Property<int>("Price")
 0565                        .HasColumnType("int");
 0566
 0567                    b.Property<string>("StripeSubscriptionId")
 0568                        .IsRequired()
 0569                        .HasColumnType("nvarchar(max)");
 0570
 0571                    b.HasKey("Id");
 0572
 0573                    b.ToTable("Subscriptions", (string)null);
 0574                });
 575
 0576            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0577                {
 0578                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0579                        .WithMany()
 0580                        .HasForeignKey("ClotheId");
 0581
 0582                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0583                        .WithMany()
 0584                        .HasForeignKey("UserId");
 0585
 0586                    b.Navigation("Clothe");
 0587
 0588                    b.Navigation("User");
 0589                });
 590
 0591            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0592                {
 0593                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0594                        .WithMany("Claims")
 0595                        .HasForeignKey("RoleId")
 0596                        .OnDelete(DeleteBehavior.Cascade)
 0597                        .IsRequired();
 0598
 0599                    b.Navigation("Role");
 0600                });
 601
 0602            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0603                {
 0604                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0605                        .WithMany("Claims")
 0606                        .HasForeignKey("UserId")
 0607                        .OnDelete(DeleteBehavior.Cascade)
 0608                        .IsRequired();
 0609
 0610                    b.Navigation("User");
 0611                });
 612
 0613            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0614                {
 0615                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0616                        .WithMany("Logins")
 0617                        .HasForeignKey("UserId")
 0618                        .OnDelete(DeleteBehavior.Cascade)
 0619                        .IsRequired();
 0620
 0621                    b.Navigation("User");
 0622                });
 623
 0624            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0625                {
 0626                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0627                        .WithMany("Users")
 0628                        .HasForeignKey("RoleId")
 0629                        .OnDelete(DeleteBehavior.Cascade)
 0630                        .IsRequired();
 0631
 0632                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0633                        .WithMany("Roles")
 0634                        .HasForeignKey("UserId")
 0635                        .OnDelete(DeleteBehavior.Cascade)
 0636                        .IsRequired();
 0637
 0638                    b.Navigation("Role");
 0639
 0640                    b.Navigation("User");
 0641                });
 642
 0643            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0644                {
 0645                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0646                        .WithMany("UserTokens")
 0647                        .HasForeignKey("UserId")
 0648                        .OnDelete(DeleteBehavior.Cascade)
 0649                        .IsRequired();
 0650
 0651                    b.Navigation("User");
 0652                });
 653
 0654            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0655                {
 0656                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0657                        .WithMany()
 0658                        .HasForeignKey("CustomerId")
 0659                        .OnDelete(DeleteBehavior.Cascade)
 0660                        .IsRequired();
 0661
 0662                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0663                        .WithMany()
 0664                        .HasForeignKey("SubscriptionId")
 0665                        .OnDelete(DeleteBehavior.Cascade)
 0666                        .IsRequired();
 0667
 0668                    b.Navigation("Customer");
 0669
 0670                    b.Navigation("Subscription");
 0671                });
 672
 0673            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0674                {
 0675                    b.Navigation("Claims");
 0676
 0677                    b.Navigation("Users");
 0678                });
 679
 0680            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0681                {
 0682                    b.Navigation("Claims");
 0683
 0684                    b.Navigation("Logins");
 0685
 0686                    b.Navigation("Roles");
 0687
 0688                    b.Navigation("UserTokens");
 0689                });
 690#pragma warning restore 612, 618
 0691        }
 692    }
 693}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_2.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_2.html deleted file mode 100644 index 81ea15b3..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_2.html +++ /dev/null @@ -1,977 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_2 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:710
Coverable lines:710
Total lines:798
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220121214941_Migration_2.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using System;
 5using Microsoft.EntityFrameworkCore.Migrations;
 6
 7#nullable disable
 8
 9namespace BlazorShop.Infrastructure.Migrations
 10{
 11    public partial class Migration_2 : Migration
 12    {
 13        protected override void Up(MigrationBuilder migrationBuilder)
 014        {
 015            migrationBuilder.DropColumn(
 016                name: "Discount",
 017                table: "Orders");
 18
 019            migrationBuilder.DropColumn(
 020                name: "ListPrice",
 021                table: "Orders");
 22
 023            migrationBuilder.DropColumn(
 024                name: "Quantity",
 025                table: "Orders");
 26
 027            migrationBuilder.DropColumn(
 028                name: "SalePrice",
 029                table: "Orders");
 30
 031            migrationBuilder.DropColumn(
 032                name: "Tax",
 033                table: "Orders");
 34
 035            migrationBuilder.DropColumn(
 036                name: "Total",
 037                table: "Orders");
 38
 039            migrationBuilder.RenameColumn(
 040                name: "Description",
 041                table: "Orders",
 042                newName: "UserEmail");
 43
 044            migrationBuilder.AddColumn<int>(
 045                name: "AmountTotal",
 046                table: "Orders",
 047                type: "int",
 048                maxLength: 200,
 049                nullable: false,
 050                defaultValue: 0);
 51
 052            migrationBuilder.AddColumn<string>(
 053                name: "LineItems",
 054                table: "Orders",
 055                type: "nvarchar(max)",
 056                maxLength: 10000,
 057                nullable: false,
 058                defaultValue: "");
 59
 060            migrationBuilder.AddColumn<DateTime>(
 061                name: "OrderDate",
 062                table: "Orders",
 063                type: "datetime2",
 064                nullable: false,
 065                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
 66
 067            migrationBuilder.CreateTable(
 068                name: "Invoices",
 069                columns: table => new
 070                {
 071                    Id = table.Column<int>(type: "int", nullable: false)
 072                        .Annotation("SqlServer:Identity", "1, 1"),
 073                    UserEmail = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
 074                    Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 075                    AmountSubTotal = table.Column<int>(type: "int", nullable: false),
 076                    AmountTotal = table.Column<int>(type: "int", nullable: false),
 077                    Quantity = table.Column<int>(type: "int", nullable: false)
 078                },
 079                constraints: table =>
 080                {
 081                    table.PrimaryKey("PK_Invoices", x => x.Id);
 082                });
 83
 084            migrationBuilder.CreateTable(
 085                name: "Receipts",
 086                columns: table => new
 087                {
 088                    Id = table.Column<int>(type: "int", nullable: false)
 089                        .Annotation("SqlServer:Identity", "1, 1"),
 090                    ReceiptDate = table.Column<DateTime>(type: "datetime2", nullable: false),
 091                    ReceiptName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
 092                    ReceiptUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false)
 093                },
 094                constraints: table =>
 095                {
 096                    table.PrimaryKey("PK_Receipts", x => x.Id);
 097                });
 098        }
 99
 100        protected override void Down(MigrationBuilder migrationBuilder)
 0101        {
 0102            migrationBuilder.DropTable(
 0103                name: "Invoices");
 104
 0105            migrationBuilder.DropTable(
 0106                name: "Receipts");
 107
 0108            migrationBuilder.DropColumn(
 0109                name: "AmountTotal",
 0110                table: "Orders");
 111
 0112            migrationBuilder.DropColumn(
 0113                name: "LineItems",
 0114                table: "Orders");
 115
 0116            migrationBuilder.DropColumn(
 0117                name: "OrderDate",
 0118                table: "Orders");
 119
 0120            migrationBuilder.RenameColumn(
 0121                name: "UserEmail",
 0122                table: "Orders",
 0123                newName: "Description");
 124
 0125            migrationBuilder.AddColumn<string>(
 0126                name: "Discount",
 0127                table: "Orders",
 0128                type: "nvarchar(max)",
 0129                nullable: true);
 130
 0131            migrationBuilder.AddColumn<string>(
 0132                name: "ListPrice",
 0133                table: "Orders",
 0134                type: "nvarchar(max)",
 0135                nullable: true);
 136
 0137            migrationBuilder.AddColumn<int>(
 0138                name: "Quantity",
 0139                table: "Orders",
 0140                type: "int",
 0141                nullable: false,
 0142                defaultValue: 0);
 143
 0144            migrationBuilder.AddColumn<string>(
 0145                name: "SalePrice",
 0146                table: "Orders",
 0147                type: "nvarchar(max)",
 0148                nullable: true);
 149
 0150            migrationBuilder.AddColumn<string>(
 0151                name: "Tax",
 0152                table: "Orders",
 0153                type: "nvarchar(max)",
 0154                nullable: true);
 155
 0156            migrationBuilder.AddColumn<string>(
 0157                name: "Total",
 0158                table: "Orders",
 0159                type: "nvarchar(max)",
 0160                nullable: true);
 0161        }
 162    }
 163}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220121214941_Migration_2.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220121214941_Migration_2")]
 18    partial class Migration_2
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<int>("AmountSubTotal")
 0326                        .HasColumnType("int");
 0327
 0328                    b.Property<int>("AmountTotal")
 0329                        .HasColumnType("int");
 0330
 0331                    b.Property<string>("Name")
 0332                        .IsRequired()
 0333                        .HasMaxLength(200)
 0334                        .HasColumnType("nvarchar(200)");
 0335
 0336                    b.Property<int>("Quantity")
 0337                        .HasColumnType("int");
 0338
 0339                    b.Property<string>("UserEmail")
 0340                        .IsRequired()
 0341                        .HasMaxLength(100)
 0342                        .HasColumnType("nvarchar(100)");
 0343
 0344                    b.HasKey("Id");
 0345
 0346                    b.ToTable("Invoices", (string)null);
 0347                });
 348
 0349            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0350                {
 0351                    b.Property<int>("Id")
 0352                        .ValueGeneratedOnAdd()
 0353                        .HasColumnType("int");
 0354
 0355                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0356
 0357                    b.Property<string>("Author")
 0358                        .IsRequired()
 0359                        .HasMaxLength(200)
 0360                        .HasColumnType("nvarchar(200)");
 0361
 0362                    b.Property<DateTime>("DateRelease")
 0363                        .HasColumnType("datetime2");
 0364
 0365                    b.Property<string>("Description")
 0366                        .IsRequired()
 0367                        .HasMaxLength(1000)
 0368                        .HasColumnType("nvarchar(1000)");
 0369
 0370                    b.Property<string>("ImageName")
 0371                        .IsRequired()
 0372                        .HasMaxLength(200)
 0373                        .HasColumnType("nvarchar(200)");
 0374
 0375                    b.Property<string>("ImagePath")
 0376                        .IsRequired()
 0377                        .HasMaxLength(200)
 0378                        .HasColumnType("nvarchar(200)");
 0379
 0380                    b.Property<string>("Title")
 0381                        .IsRequired()
 0382                        .HasMaxLength(200)
 0383                        .HasColumnType("nvarchar(200)");
 0384
 0385                    b.HasKey("Id");
 0386
 0387                    b.ToTable("Musics", (string)null);
 0388                });
 389
 0390            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0391                {
 0392                    b.Property<int>("Id")
 0393                        .ValueGeneratedOnAdd()
 0394                        .HasColumnType("int");
 0395
 0396                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0397
 0398                    b.Property<int>("AmountTotal")
 0399                        .HasMaxLength(200)
 0400                        .HasColumnType("int");
 0401
 0402                    b.Property<string>("LineItems")
 0403                        .IsRequired()
 0404                        .HasMaxLength(10000)
 0405                        .HasColumnType("nvarchar(max)");
 0406
 0407                    b.Property<DateTime>("OrderDate")
 0408                        .HasColumnType("datetime2");
 0409
 0410                    b.Property<string>("UserEmail")
 0411                        .IsRequired()
 0412                        .HasMaxLength(200)
 0413                        .HasColumnType("nvarchar(200)");
 0414
 0415                    b.HasKey("Id");
 0416
 0417                    b.ToTable("Orders", (string)null);
 0418                });
 419
 0420            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0421                {
 0422                    b.Property<int>("Id")
 0423                        .ValueGeneratedOnAdd()
 0424                        .HasColumnType("int");
 0425
 0426                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0427
 0428                    b.Property<DateTime>("ReceiptDate")
 0429                        .HasColumnType("datetime2");
 0430
 0431                    b.Property<string>("ReceiptName")
 0432                        .IsRequired()
 0433                        .HasMaxLength(200)
 0434                        .HasColumnType("nvarchar(200)");
 0435
 0436                    b.Property<string>("ReceiptUrl")
 0437                        .IsRequired()
 0438                        .HasMaxLength(500)
 0439                        .HasColumnType("nvarchar(500)");
 0440
 0441                    b.HasKey("Id");
 0442
 0443                    b.ToTable("Receipts", (string)null);
 0444                });
 445
 0446            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0447                {
 0448                    b.Property<int>("Id")
 0449                        .ValueGeneratedOnAdd()
 0450                        .HasColumnType("int");
 0451
 0452                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0453
 0454                    b.Property<DateTime>("CurrentPeriodEnd")
 0455                        .HasColumnType("datetime2");
 0456
 0457                    b.Property<int>("CustomerId")
 0458                        .HasColumnType("int");
 0459
 0460                    b.Property<DateTime>("DateStart")
 0461                        .HasColumnType("datetime2");
 0462
 0463                    b.Property<int>("Status")
 0464                        .HasMaxLength(200)
 0465                        .HasColumnType("int");
 0466
 0467                    b.Property<int>("SubscriptionId")
 0468                        .HasColumnType("int");
 0469
 0470                    b.HasKey("Id");
 0471
 0472                    b.HasIndex("CustomerId");
 0473
 0474                    b.HasIndex("SubscriptionId");
 0475
 0476                    b.ToTable("Subscribers", (string)null);
 0477                });
 478
 0479            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0480                {
 0481                    b.Property<int>("Id")
 0482                        .ValueGeneratedOnAdd()
 0483                        .HasColumnType("int");
 0484
 0485                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0486
 0487                    b.Property<string>("ChargeType")
 0488                        .IsRequired()
 0489                        .HasMaxLength(100)
 0490                        .HasColumnType("nvarchar(100)");
 0491
 0492                    b.Property<string>("Currency")
 0493                        .IsRequired()
 0494                        .HasColumnType("nvarchar(max)");
 0495
 0496                    b.Property<string>("CurrencySymbol")
 0497                        .IsRequired()
 0498                        .HasColumnType("nvarchar(max)");
 0499
 0500                    b.Property<string>("Name")
 0501                        .IsRequired()
 0502                        .HasMaxLength(200)
 0503                        .HasColumnType("nvarchar(200)");
 0504
 0505                    b.Property<string>("Options")
 0506                        .IsRequired()
 0507                        .HasMaxLength(500)
 0508                        .HasColumnType("nvarchar(500)");
 0509
 0510                    b.Property<decimal>("Price")
 0511                        .HasColumnType("decimal(18,2)");
 0512
 0513                    b.HasKey("Id");
 0514
 0515                    b.ToTable("Subscriptions", (string)null);
 0516                });
 517
 0518            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0519                {
 0520                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0521                        .WithMany()
 0522                        .HasForeignKey("ClotheId");
 0523
 0524                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0525                        .WithMany()
 0526                        .HasForeignKey("UserId");
 0527
 0528                    b.Navigation("Clothe");
 0529
 0530                    b.Navigation("User");
 0531                });
 532
 0533            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0534                {
 0535                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0536                        .WithMany("Claims")
 0537                        .HasForeignKey("RoleId")
 0538                        .OnDelete(DeleteBehavior.Cascade)
 0539                        .IsRequired();
 0540
 0541                    b.Navigation("Role");
 0542                });
 543
 0544            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0545                {
 0546                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0547                        .WithMany("Claims")
 0548                        .HasForeignKey("UserId")
 0549                        .OnDelete(DeleteBehavior.Cascade)
 0550                        .IsRequired();
 0551
 0552                    b.Navigation("User");
 0553                });
 554
 0555            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0556                {
 0557                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0558                        .WithMany("Logins")
 0559                        .HasForeignKey("UserId")
 0560                        .OnDelete(DeleteBehavior.Cascade)
 0561                        .IsRequired();
 0562
 0563                    b.Navigation("User");
 0564                });
 565
 0566            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0567                {
 0568                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0569                        .WithMany("Users")
 0570                        .HasForeignKey("RoleId")
 0571                        .OnDelete(DeleteBehavior.Cascade)
 0572                        .IsRequired();
 0573
 0574                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0575                        .WithMany("Roles")
 0576                        .HasForeignKey("UserId")
 0577                        .OnDelete(DeleteBehavior.Cascade)
 0578                        .IsRequired();
 0579
 0580                    b.Navigation("Role");
 0581
 0582                    b.Navigation("User");
 0583                });
 584
 0585            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0586                {
 0587                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0588                        .WithMany("UserTokens")
 0589                        .HasForeignKey("UserId")
 0590                        .OnDelete(DeleteBehavior.Cascade)
 0591                        .IsRequired();
 0592
 0593                    b.Navigation("User");
 0594                });
 595
 0596            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0597                {
 0598                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0599                        .WithMany()
 0600                        .HasForeignKey("CustomerId")
 0601                        .OnDelete(DeleteBehavior.Cascade)
 0602                        .IsRequired();
 0603
 0604                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0605                        .WithMany()
 0606                        .HasForeignKey("SubscriptionId")
 0607                        .OnDelete(DeleteBehavior.Cascade)
 0608                        .IsRequired();
 0609
 0610                    b.Navigation("Customer");
 0611
 0612                    b.Navigation("Subscription");
 0613                });
 614
 0615            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0616                {
 0617                    b.Navigation("Claims");
 0618
 0619                    b.Navigation("Users");
 0620                });
 621
 0622            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0623                {
 0624                    b.Navigation("Claims");
 0625
 0626                    b.Navigation("Logins");
 0627
 0628                    b.Navigation("Roles");
 0629
 0630                    b.Navigation("UserTokens");
 0631                });
 632#pragma warning restore 612, 618
 0633        }
 634    }
 635}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_3.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_3.html deleted file mode 100644 index 834db781..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_3.html +++ /dev/null @@ -1,847 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_3 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:603
Coverable lines:603
Total lines:668
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122071420_Migration_3.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_3 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AddColumn<string>(
 015                name: "OrderName",
 016                table: "Orders",
 017                type: "nvarchar(max)",
 018                nullable: false,
 019                defaultValue: "");
 020        }
 21
 22        protected override void Down(MigrationBuilder migrationBuilder)
 023        {
 024            migrationBuilder.DropColumn(
 025                name: "OrderName",
 026                table: "Orders");
 027        }
 28    }
 29}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122071420_Migration_3.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220122071420_Migration_3")]
 18    partial class Migration_3
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<int>("AmountSubTotal")
 0326                        .HasColumnType("int");
 0327
 0328                    b.Property<int>("AmountTotal")
 0329                        .HasColumnType("int");
 0330
 0331                    b.Property<string>("Name")
 0332                        .IsRequired()
 0333                        .HasMaxLength(200)
 0334                        .HasColumnType("nvarchar(200)");
 0335
 0336                    b.Property<int>("Quantity")
 0337                        .HasColumnType("int");
 0338
 0339                    b.Property<string>("UserEmail")
 0340                        .IsRequired()
 0341                        .HasMaxLength(100)
 0342                        .HasColumnType("nvarchar(100)");
 0343
 0344                    b.HasKey("Id");
 0345
 0346                    b.ToTable("Invoices", (string)null);
 0347                });
 348
 0349            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0350                {
 0351                    b.Property<int>("Id")
 0352                        .ValueGeneratedOnAdd()
 0353                        .HasColumnType("int");
 0354
 0355                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0356
 0357                    b.Property<string>("Author")
 0358                        .IsRequired()
 0359                        .HasMaxLength(200)
 0360                        .HasColumnType("nvarchar(200)");
 0361
 0362                    b.Property<DateTime>("DateRelease")
 0363                        .HasColumnType("datetime2");
 0364
 0365                    b.Property<string>("Description")
 0366                        .IsRequired()
 0367                        .HasMaxLength(1000)
 0368                        .HasColumnType("nvarchar(1000)");
 0369
 0370                    b.Property<string>("ImageName")
 0371                        .IsRequired()
 0372                        .HasMaxLength(200)
 0373                        .HasColumnType("nvarchar(200)");
 0374
 0375                    b.Property<string>("ImagePath")
 0376                        .IsRequired()
 0377                        .HasMaxLength(200)
 0378                        .HasColumnType("nvarchar(200)");
 0379
 0380                    b.Property<string>("Title")
 0381                        .IsRequired()
 0382                        .HasMaxLength(200)
 0383                        .HasColumnType("nvarchar(200)");
 0384
 0385                    b.HasKey("Id");
 0386
 0387                    b.ToTable("Musics", (string)null);
 0388                });
 389
 0390            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0391                {
 0392                    b.Property<int>("Id")
 0393                        .ValueGeneratedOnAdd()
 0394                        .HasColumnType("int");
 0395
 0396                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0397
 0398                    b.Property<int>("AmountTotal")
 0399                        .HasMaxLength(200)
 0400                        .HasColumnType("int");
 0401
 0402                    b.Property<string>("LineItems")
 0403                        .IsRequired()
 0404                        .HasMaxLength(10000)
 0405                        .HasColumnType("nvarchar(max)");
 0406
 0407                    b.Property<DateTime>("OrderDate")
 0408                        .HasColumnType("datetime2");
 0409
 0410                    b.Property<string>("OrderName")
 0411                        .IsRequired()
 0412                        .HasColumnType("nvarchar(max)");
 0413
 0414                    b.Property<string>("UserEmail")
 0415                        .IsRequired()
 0416                        .HasMaxLength(200)
 0417                        .HasColumnType("nvarchar(200)");
 0418
 0419                    b.HasKey("Id");
 0420
 0421                    b.ToTable("Orders", (string)null);
 0422                });
 423
 0424            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0425                {
 0426                    b.Property<int>("Id")
 0427                        .ValueGeneratedOnAdd()
 0428                        .HasColumnType("int");
 0429
 0430                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0431
 0432                    b.Property<DateTime>("ReceiptDate")
 0433                        .HasColumnType("datetime2");
 0434
 0435                    b.Property<string>("ReceiptName")
 0436                        .IsRequired()
 0437                        .HasMaxLength(200)
 0438                        .HasColumnType("nvarchar(200)");
 0439
 0440                    b.Property<string>("ReceiptUrl")
 0441                        .IsRequired()
 0442                        .HasMaxLength(500)
 0443                        .HasColumnType("nvarchar(500)");
 0444
 0445                    b.HasKey("Id");
 0446
 0447                    b.ToTable("Receipts", (string)null);
 0448                });
 449
 0450            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0451                {
 0452                    b.Property<int>("Id")
 0453                        .ValueGeneratedOnAdd()
 0454                        .HasColumnType("int");
 0455
 0456                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0457
 0458                    b.Property<DateTime>("CurrentPeriodEnd")
 0459                        .HasColumnType("datetime2");
 0460
 0461                    b.Property<int>("CustomerId")
 0462                        .HasColumnType("int");
 0463
 0464                    b.Property<DateTime>("DateStart")
 0465                        .HasColumnType("datetime2");
 0466
 0467                    b.Property<int>("Status")
 0468                        .HasMaxLength(200)
 0469                        .HasColumnType("int");
 0470
 0471                    b.Property<int>("SubscriptionId")
 0472                        .HasColumnType("int");
 0473
 0474                    b.HasKey("Id");
 0475
 0476                    b.HasIndex("CustomerId");
 0477
 0478                    b.HasIndex("SubscriptionId");
 0479
 0480                    b.ToTable("Subscribers", (string)null);
 0481                });
 482
 0483            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0484                {
 0485                    b.Property<int>("Id")
 0486                        .ValueGeneratedOnAdd()
 0487                        .HasColumnType("int");
 0488
 0489                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0490
 0491                    b.Property<string>("ChargeType")
 0492                        .IsRequired()
 0493                        .HasMaxLength(100)
 0494                        .HasColumnType("nvarchar(100)");
 0495
 0496                    b.Property<string>("Currency")
 0497                        .IsRequired()
 0498                        .HasColumnType("nvarchar(max)");
 0499
 0500                    b.Property<string>("CurrencySymbol")
 0501                        .IsRequired()
 0502                        .HasColumnType("nvarchar(max)");
 0503
 0504                    b.Property<string>("Name")
 0505                        .IsRequired()
 0506                        .HasMaxLength(200)
 0507                        .HasColumnType("nvarchar(200)");
 0508
 0509                    b.Property<string>("Options")
 0510                        .IsRequired()
 0511                        .HasMaxLength(500)
 0512                        .HasColumnType("nvarchar(500)");
 0513
 0514                    b.Property<decimal>("Price")
 0515                        .HasColumnType("decimal(18,2)");
 0516
 0517                    b.HasKey("Id");
 0518
 0519                    b.ToTable("Subscriptions", (string)null);
 0520                });
 521
 0522            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0523                {
 0524                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0525                        .WithMany()
 0526                        .HasForeignKey("ClotheId");
 0527
 0528                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0529                        .WithMany()
 0530                        .HasForeignKey("UserId");
 0531
 0532                    b.Navigation("Clothe");
 0533
 0534                    b.Navigation("User");
 0535                });
 536
 0537            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0538                {
 0539                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0540                        .WithMany("Claims")
 0541                        .HasForeignKey("RoleId")
 0542                        .OnDelete(DeleteBehavior.Cascade)
 0543                        .IsRequired();
 0544
 0545                    b.Navigation("Role");
 0546                });
 547
 0548            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0549                {
 0550                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0551                        .WithMany("Claims")
 0552                        .HasForeignKey("UserId")
 0553                        .OnDelete(DeleteBehavior.Cascade)
 0554                        .IsRequired();
 0555
 0556                    b.Navigation("User");
 0557                });
 558
 0559            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0560                {
 0561                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0562                        .WithMany("Logins")
 0563                        .HasForeignKey("UserId")
 0564                        .OnDelete(DeleteBehavior.Cascade)
 0565                        .IsRequired();
 0566
 0567                    b.Navigation("User");
 0568                });
 569
 0570            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0571                {
 0572                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0573                        .WithMany("Users")
 0574                        .HasForeignKey("RoleId")
 0575                        .OnDelete(DeleteBehavior.Cascade)
 0576                        .IsRequired();
 0577
 0578                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0579                        .WithMany("Roles")
 0580                        .HasForeignKey("UserId")
 0581                        .OnDelete(DeleteBehavior.Cascade)
 0582                        .IsRequired();
 0583
 0584                    b.Navigation("Role");
 0585
 0586                    b.Navigation("User");
 0587                });
 588
 0589            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0590                {
 0591                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0592                        .WithMany("UserTokens")
 0593                        .HasForeignKey("UserId")
 0594                        .OnDelete(DeleteBehavior.Cascade)
 0595                        .IsRequired();
 0596
 0597                    b.Navigation("User");
 0598                });
 599
 0600            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0601                {
 0602                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0603                        .WithMany()
 0604                        .HasForeignKey("CustomerId")
 0605                        .OnDelete(DeleteBehavior.Cascade)
 0606                        .IsRequired();
 0607
 0608                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0609                        .WithMany()
 0610                        .HasForeignKey("SubscriptionId")
 0611                        .OnDelete(DeleteBehavior.Cascade)
 0612                        .IsRequired();
 0613
 0614                    b.Navigation("Customer");
 0615
 0616                    b.Navigation("Subscription");
 0617                });
 618
 0619            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0620                {
 0621                    b.Navigation("Claims");
 0622
 0623                    b.Navigation("Users");
 0624                });
 625
 0626            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0627                {
 0628                    b.Navigation("Claims");
 0629
 0630                    b.Navigation("Logins");
 0631
 0632                    b.Navigation("Roles");
 0633
 0634                    b.Navigation("UserTokens");
 0635                });
 636#pragma warning restore 612, 618
 0637        }
 638    }
 639}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_4.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_4.html deleted file mode 100644 index ab86655e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_4.html +++ /dev/null @@ -1,853 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_4 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:609
Coverable lines:609
Total lines:674
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122075417_Migration_4.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_4 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AddColumn<string>(
 015                name: "UserEmail",
 016                table: "Receipts",
 017                type: "nvarchar(200)",
 018                maxLength: 200,
 019                nullable: false,
 020                defaultValue: "");
 021        }
 22
 23        protected override void Down(MigrationBuilder migrationBuilder)
 024        {
 025            migrationBuilder.DropColumn(
 026                name: "UserEmail",
 027                table: "Receipts");
 028        }
 29    }
 30}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122075417_Migration_4.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220122075417_Migration_4")]
 18    partial class Migration_4
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<int>("AmountSubTotal")
 0326                        .HasColumnType("int");
 0327
 0328                    b.Property<int>("AmountTotal")
 0329                        .HasColumnType("int");
 0330
 0331                    b.Property<string>("Name")
 0332                        .IsRequired()
 0333                        .HasMaxLength(200)
 0334                        .HasColumnType("nvarchar(200)");
 0335
 0336                    b.Property<int>("Quantity")
 0337                        .HasColumnType("int");
 0338
 0339                    b.Property<string>("UserEmail")
 0340                        .IsRequired()
 0341                        .HasMaxLength(100)
 0342                        .HasColumnType("nvarchar(100)");
 0343
 0344                    b.HasKey("Id");
 0345
 0346                    b.ToTable("Invoices", (string)null);
 0347                });
 348
 0349            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0350                {
 0351                    b.Property<int>("Id")
 0352                        .ValueGeneratedOnAdd()
 0353                        .HasColumnType("int");
 0354
 0355                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0356
 0357                    b.Property<string>("Author")
 0358                        .IsRequired()
 0359                        .HasMaxLength(200)
 0360                        .HasColumnType("nvarchar(200)");
 0361
 0362                    b.Property<DateTime>("DateRelease")
 0363                        .HasColumnType("datetime2");
 0364
 0365                    b.Property<string>("Description")
 0366                        .IsRequired()
 0367                        .HasMaxLength(1000)
 0368                        .HasColumnType("nvarchar(1000)");
 0369
 0370                    b.Property<string>("ImageName")
 0371                        .IsRequired()
 0372                        .HasMaxLength(200)
 0373                        .HasColumnType("nvarchar(200)");
 0374
 0375                    b.Property<string>("ImagePath")
 0376                        .IsRequired()
 0377                        .HasMaxLength(200)
 0378                        .HasColumnType("nvarchar(200)");
 0379
 0380                    b.Property<string>("Title")
 0381                        .IsRequired()
 0382                        .HasMaxLength(200)
 0383                        .HasColumnType("nvarchar(200)");
 0384
 0385                    b.HasKey("Id");
 0386
 0387                    b.ToTable("Musics", (string)null);
 0388                });
 389
 0390            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0391                {
 0392                    b.Property<int>("Id")
 0393                        .ValueGeneratedOnAdd()
 0394                        .HasColumnType("int");
 0395
 0396                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0397
 0398                    b.Property<int>("AmountTotal")
 0399                        .HasMaxLength(200)
 0400                        .HasColumnType("int");
 0401
 0402                    b.Property<string>("LineItems")
 0403                        .IsRequired()
 0404                        .HasMaxLength(10000)
 0405                        .HasColumnType("nvarchar(max)");
 0406
 0407                    b.Property<DateTime>("OrderDate")
 0408                        .HasColumnType("datetime2");
 0409
 0410                    b.Property<string>("OrderName")
 0411                        .IsRequired()
 0412                        .HasColumnType("nvarchar(max)");
 0413
 0414                    b.Property<string>("UserEmail")
 0415                        .IsRequired()
 0416                        .HasMaxLength(200)
 0417                        .HasColumnType("nvarchar(200)");
 0418
 0419                    b.HasKey("Id");
 0420
 0421                    b.ToTable("Orders", (string)null);
 0422                });
 423
 0424            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0425                {
 0426                    b.Property<int>("Id")
 0427                        .ValueGeneratedOnAdd()
 0428                        .HasColumnType("int");
 0429
 0430                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0431
 0432                    b.Property<DateTime>("ReceiptDate")
 0433                        .HasColumnType("datetime2");
 0434
 0435                    b.Property<string>("ReceiptName")
 0436                        .IsRequired()
 0437                        .HasMaxLength(200)
 0438                        .HasColumnType("nvarchar(200)");
 0439
 0440                    b.Property<string>("ReceiptUrl")
 0441                        .IsRequired()
 0442                        .HasMaxLength(500)
 0443                        .HasColumnType("nvarchar(500)");
 0444
 0445                    b.Property<string>("UserEmail")
 0446                        .IsRequired()
 0447                        .HasMaxLength(200)
 0448                        .HasColumnType("nvarchar(200)");
 0449
 0450                    b.HasKey("Id");
 0451
 0452                    b.ToTable("Receipts", (string)null);
 0453                });
 454
 0455            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0456                {
 0457                    b.Property<int>("Id")
 0458                        .ValueGeneratedOnAdd()
 0459                        .HasColumnType("int");
 0460
 0461                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0462
 0463                    b.Property<DateTime>("CurrentPeriodEnd")
 0464                        .HasColumnType("datetime2");
 0465
 0466                    b.Property<int>("CustomerId")
 0467                        .HasColumnType("int");
 0468
 0469                    b.Property<DateTime>("DateStart")
 0470                        .HasColumnType("datetime2");
 0471
 0472                    b.Property<int>("Status")
 0473                        .HasMaxLength(200)
 0474                        .HasColumnType("int");
 0475
 0476                    b.Property<int>("SubscriptionId")
 0477                        .HasColumnType("int");
 0478
 0479                    b.HasKey("Id");
 0480
 0481                    b.HasIndex("CustomerId");
 0482
 0483                    b.HasIndex("SubscriptionId");
 0484
 0485                    b.ToTable("Subscribers", (string)null);
 0486                });
 487
 0488            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0489                {
 0490                    b.Property<int>("Id")
 0491                        .ValueGeneratedOnAdd()
 0492                        .HasColumnType("int");
 0493
 0494                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0495
 0496                    b.Property<string>("ChargeType")
 0497                        .IsRequired()
 0498                        .HasMaxLength(100)
 0499                        .HasColumnType("nvarchar(100)");
 0500
 0501                    b.Property<string>("Currency")
 0502                        .IsRequired()
 0503                        .HasColumnType("nvarchar(max)");
 0504
 0505                    b.Property<string>("CurrencySymbol")
 0506                        .IsRequired()
 0507                        .HasColumnType("nvarchar(max)");
 0508
 0509                    b.Property<string>("Name")
 0510                        .IsRequired()
 0511                        .HasMaxLength(200)
 0512                        .HasColumnType("nvarchar(200)");
 0513
 0514                    b.Property<string>("Options")
 0515                        .IsRequired()
 0516                        .HasMaxLength(500)
 0517                        .HasColumnType("nvarchar(500)");
 0518
 0519                    b.Property<decimal>("Price")
 0520                        .HasColumnType("decimal(18,2)");
 0521
 0522                    b.HasKey("Id");
 0523
 0524                    b.ToTable("Subscriptions", (string)null);
 0525                });
 526
 0527            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0528                {
 0529                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0530                        .WithMany()
 0531                        .HasForeignKey("ClotheId");
 0532
 0533                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0534                        .WithMany()
 0535                        .HasForeignKey("UserId");
 0536
 0537                    b.Navigation("Clothe");
 0538
 0539                    b.Navigation("User");
 0540                });
 541
 0542            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0543                {
 0544                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0545                        .WithMany("Claims")
 0546                        .HasForeignKey("RoleId")
 0547                        .OnDelete(DeleteBehavior.Cascade)
 0548                        .IsRequired();
 0549
 0550                    b.Navigation("Role");
 0551                });
 552
 0553            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0554                {
 0555                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0556                        .WithMany("Claims")
 0557                        .HasForeignKey("UserId")
 0558                        .OnDelete(DeleteBehavior.Cascade)
 0559                        .IsRequired();
 0560
 0561                    b.Navigation("User");
 0562                });
 563
 0564            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0565                {
 0566                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0567                        .WithMany("Logins")
 0568                        .HasForeignKey("UserId")
 0569                        .OnDelete(DeleteBehavior.Cascade)
 0570                        .IsRequired();
 0571
 0572                    b.Navigation("User");
 0573                });
 574
 0575            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0576                {
 0577                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0578                        .WithMany("Users")
 0579                        .HasForeignKey("RoleId")
 0580                        .OnDelete(DeleteBehavior.Cascade)
 0581                        .IsRequired();
 0582
 0583                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0584                        .WithMany("Roles")
 0585                        .HasForeignKey("UserId")
 0586                        .OnDelete(DeleteBehavior.Cascade)
 0587                        .IsRequired();
 0588
 0589                    b.Navigation("Role");
 0590
 0591                    b.Navigation("User");
 0592                });
 593
 0594            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0595                {
 0596                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0597                        .WithMany("UserTokens")
 0598                        .HasForeignKey("UserId")
 0599                        .OnDelete(DeleteBehavior.Cascade)
 0600                        .IsRequired();
 0601
 0602                    b.Navigation("User");
 0603                });
 604
 0605            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0606                {
 0607                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0608                        .WithMany()
 0609                        .HasForeignKey("CustomerId")
 0610                        .OnDelete(DeleteBehavior.Cascade)
 0611                        .IsRequired();
 0612
 0613                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0614                        .WithMany()
 0615                        .HasForeignKey("SubscriptionId")
 0616                        .OnDelete(DeleteBehavior.Cascade)
 0617                        .IsRequired();
 0618
 0619                    b.Navigation("Customer");
 0620
 0621                    b.Navigation("Subscription");
 0622                });
 623
 0624            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0625                {
 0626                    b.Navigation("Claims");
 0627
 0628                    b.Navigation("Users");
 0629                });
 630
 0631            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0632                {
 0633                    b.Navigation("Claims");
 0634
 0635                    b.Navigation("Logins");
 0636
 0637                    b.Navigation("Roles");
 0638
 0639                    b.Navigation("UserTokens");
 0640                });
 641#pragma warning restore 612, 618
 0642        }
 643    }
 644}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_5.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_5.html deleted file mode 100644 index f8134952..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_5.html +++ /dev/null @@ -1,856 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_5 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:612
Coverable lines:612
Total lines:677
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122140537_Migration_5.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_5 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AddColumn<string>(
 015                name: "StripeSubscriptionId",
 016                table: "Subscriptions",
 017                type: "nvarchar(max)",
 018                nullable: false,
 019                defaultValue: "");
 020        }
 21
 22        protected override void Down(MigrationBuilder migrationBuilder)
 023        {
 024            migrationBuilder.DropColumn(
 025                name: "StripeSubscriptionId",
 026                table: "Subscriptions");
 027        }
 28    }
 29}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122140537_Migration_5.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220122140537_Migration_5")]
 18    partial class Migration_5
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<int>("AmountSubTotal")
 0326                        .HasColumnType("int");
 0327
 0328                    b.Property<int>("AmountTotal")
 0329                        .HasColumnType("int");
 0330
 0331                    b.Property<string>("Name")
 0332                        .IsRequired()
 0333                        .HasMaxLength(200)
 0334                        .HasColumnType("nvarchar(200)");
 0335
 0336                    b.Property<int>("Quantity")
 0337                        .HasColumnType("int");
 0338
 0339                    b.Property<string>("UserEmail")
 0340                        .IsRequired()
 0341                        .HasMaxLength(100)
 0342                        .HasColumnType("nvarchar(100)");
 0343
 0344                    b.HasKey("Id");
 0345
 0346                    b.ToTable("Invoices", (string)null);
 0347                });
 348
 0349            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0350                {
 0351                    b.Property<int>("Id")
 0352                        .ValueGeneratedOnAdd()
 0353                        .HasColumnType("int");
 0354
 0355                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0356
 0357                    b.Property<string>("Author")
 0358                        .IsRequired()
 0359                        .HasMaxLength(200)
 0360                        .HasColumnType("nvarchar(200)");
 0361
 0362                    b.Property<DateTime>("DateRelease")
 0363                        .HasColumnType("datetime2");
 0364
 0365                    b.Property<string>("Description")
 0366                        .IsRequired()
 0367                        .HasMaxLength(1000)
 0368                        .HasColumnType("nvarchar(1000)");
 0369
 0370                    b.Property<string>("ImageName")
 0371                        .IsRequired()
 0372                        .HasMaxLength(200)
 0373                        .HasColumnType("nvarchar(200)");
 0374
 0375                    b.Property<string>("ImagePath")
 0376                        .IsRequired()
 0377                        .HasMaxLength(200)
 0378                        .HasColumnType("nvarchar(200)");
 0379
 0380                    b.Property<string>("Title")
 0381                        .IsRequired()
 0382                        .HasMaxLength(200)
 0383                        .HasColumnType("nvarchar(200)");
 0384
 0385                    b.HasKey("Id");
 0386
 0387                    b.ToTable("Musics", (string)null);
 0388                });
 389
 0390            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0391                {
 0392                    b.Property<int>("Id")
 0393                        .ValueGeneratedOnAdd()
 0394                        .HasColumnType("int");
 0395
 0396                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0397
 0398                    b.Property<int>("AmountTotal")
 0399                        .HasMaxLength(200)
 0400                        .HasColumnType("int");
 0401
 0402                    b.Property<string>("LineItems")
 0403                        .IsRequired()
 0404                        .HasMaxLength(10000)
 0405                        .HasColumnType("nvarchar(max)");
 0406
 0407                    b.Property<DateTime>("OrderDate")
 0408                        .HasColumnType("datetime2");
 0409
 0410                    b.Property<string>("OrderName")
 0411                        .IsRequired()
 0412                        .HasColumnType("nvarchar(max)");
 0413
 0414                    b.Property<string>("UserEmail")
 0415                        .IsRequired()
 0416                        .HasMaxLength(200)
 0417                        .HasColumnType("nvarchar(200)");
 0418
 0419                    b.HasKey("Id");
 0420
 0421                    b.ToTable("Orders", (string)null);
 0422                });
 423
 0424            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0425                {
 0426                    b.Property<int>("Id")
 0427                        .ValueGeneratedOnAdd()
 0428                        .HasColumnType("int");
 0429
 0430                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0431
 0432                    b.Property<DateTime>("ReceiptDate")
 0433                        .HasColumnType("datetime2");
 0434
 0435                    b.Property<string>("ReceiptName")
 0436                        .IsRequired()
 0437                        .HasMaxLength(200)
 0438                        .HasColumnType("nvarchar(200)");
 0439
 0440                    b.Property<string>("ReceiptUrl")
 0441                        .IsRequired()
 0442                        .HasMaxLength(500)
 0443                        .HasColumnType("nvarchar(500)");
 0444
 0445                    b.Property<string>("UserEmail")
 0446                        .IsRequired()
 0447                        .HasMaxLength(200)
 0448                        .HasColumnType("nvarchar(200)");
 0449
 0450                    b.HasKey("Id");
 0451
 0452                    b.ToTable("Receipts", (string)null);
 0453                });
 454
 0455            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0456                {
 0457                    b.Property<int>("Id")
 0458                        .ValueGeneratedOnAdd()
 0459                        .HasColumnType("int");
 0460
 0461                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0462
 0463                    b.Property<DateTime>("CurrentPeriodEnd")
 0464                        .HasColumnType("datetime2");
 0465
 0466                    b.Property<int>("CustomerId")
 0467                        .HasColumnType("int");
 0468
 0469                    b.Property<DateTime>("DateStart")
 0470                        .HasColumnType("datetime2");
 0471
 0472                    b.Property<int>("Status")
 0473                        .HasMaxLength(200)
 0474                        .HasColumnType("int");
 0475
 0476                    b.Property<int>("SubscriptionId")
 0477                        .HasColumnType("int");
 0478
 0479                    b.HasKey("Id");
 0480
 0481                    b.HasIndex("CustomerId");
 0482
 0483                    b.HasIndex("SubscriptionId");
 0484
 0485                    b.ToTable("Subscribers", (string)null);
 0486                });
 487
 0488            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0489                {
 0490                    b.Property<int>("Id")
 0491                        .ValueGeneratedOnAdd()
 0492                        .HasColumnType("int");
 0493
 0494                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0495
 0496                    b.Property<string>("ChargeType")
 0497                        .IsRequired()
 0498                        .HasMaxLength(100)
 0499                        .HasColumnType("nvarchar(100)");
 0500
 0501                    b.Property<string>("Currency")
 0502                        .IsRequired()
 0503                        .HasColumnType("nvarchar(max)");
 0504
 0505                    b.Property<string>("CurrencySymbol")
 0506                        .IsRequired()
 0507                        .HasColumnType("nvarchar(max)");
 0508
 0509                    b.Property<string>("Name")
 0510                        .IsRequired()
 0511                        .HasMaxLength(200)
 0512                        .HasColumnType("nvarchar(200)");
 0513
 0514                    b.Property<string>("Options")
 0515                        .IsRequired()
 0516                        .HasMaxLength(500)
 0517                        .HasColumnType("nvarchar(500)");
 0518
 0519                    b.Property<decimal>("Price")
 0520                        .HasColumnType("decimal(18,2)");
 0521
 0522                    b.Property<string>("StripeSubscriptionId")
 0523                        .IsRequired()
 0524                        .HasColumnType("nvarchar(max)");
 0525
 0526                    b.HasKey("Id");
 0527
 0528                    b.ToTable("Subscriptions", (string)null);
 0529                });
 530
 0531            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0532                {
 0533                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0534                        .WithMany()
 0535                        .HasForeignKey("ClotheId");
 0536
 0537                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0538                        .WithMany()
 0539                        .HasForeignKey("UserId");
 0540
 0541                    b.Navigation("Clothe");
 0542
 0543                    b.Navigation("User");
 0544                });
 545
 0546            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0547                {
 0548                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0549                        .WithMany("Claims")
 0550                        .HasForeignKey("RoleId")
 0551                        .OnDelete(DeleteBehavior.Cascade)
 0552                        .IsRequired();
 0553
 0554                    b.Navigation("Role");
 0555                });
 556
 0557            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0558                {
 0559                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0560                        .WithMany("Claims")
 0561                        .HasForeignKey("UserId")
 0562                        .OnDelete(DeleteBehavior.Cascade)
 0563                        .IsRequired();
 0564
 0565                    b.Navigation("User");
 0566                });
 567
 0568            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0569                {
 0570                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0571                        .WithMany("Logins")
 0572                        .HasForeignKey("UserId")
 0573                        .OnDelete(DeleteBehavior.Cascade)
 0574                        .IsRequired();
 0575
 0576                    b.Navigation("User");
 0577                });
 578
 0579            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0580                {
 0581                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0582                        .WithMany("Users")
 0583                        .HasForeignKey("RoleId")
 0584                        .OnDelete(DeleteBehavior.Cascade)
 0585                        .IsRequired();
 0586
 0587                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0588                        .WithMany("Roles")
 0589                        .HasForeignKey("UserId")
 0590                        .OnDelete(DeleteBehavior.Cascade)
 0591                        .IsRequired();
 0592
 0593                    b.Navigation("Role");
 0594
 0595                    b.Navigation("User");
 0596                });
 597
 0598            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0599                {
 0600                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0601                        .WithMany("UserTokens")
 0602                        .HasForeignKey("UserId")
 0603                        .OnDelete(DeleteBehavior.Cascade)
 0604                        .IsRequired();
 0605
 0606                    b.Navigation("User");
 0607                });
 608
 0609            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0610                {
 0611                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0612                        .WithMany()
 0613                        .HasForeignKey("CustomerId")
 0614                        .OnDelete(DeleteBehavior.Cascade)
 0615                        .IsRequired();
 0616
 0617                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0618                        .WithMany()
 0619                        .HasForeignKey("SubscriptionId")
 0620                        .OnDelete(DeleteBehavior.Cascade)
 0621                        .IsRequired();
 0622
 0623                    b.Navigation("Customer");
 0624
 0625                    b.Navigation("Subscription");
 0626                });
 627
 0628            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0629                {
 0630                    b.Navigation("Claims");
 0631
 0632                    b.Navigation("Users");
 0633                });
 634
 0635            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0636                {
 0637                    b.Navigation("Claims");
 0638
 0639                    b.Navigation("Logins");
 0640
 0641                    b.Navigation("Roles");
 0642
 0643                    b.Navigation("UserTokens");
 0644                });
 645#pragma warning restore 612, 618
 0646        }
 647    }
 648}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_6.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_6.html deleted file mode 100644 index bd5ba1a4..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_6.html +++ /dev/null @@ -1,889 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_6 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:641
Coverable lines:641
Total lines:710
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122183058_Migration_6.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_6 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AddColumn<DateTime>(
 015                name: "CurrentPeriodStart",
 016                table: "Subscribers",
 017                type: "datetime2",
 018                nullable: false,
 019                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
 20
 021            migrationBuilder.AddColumn<string>(
 022                name: "HostedInvoiceUrl",
 023                table: "Subscribers",
 024                type: "nvarchar(max)",
 025                nullable: false,
 026                defaultValue: "");
 27
 028            migrationBuilder.AddColumn<string>(
 029                name: "StripeSubscriberSubscriptionId",
 030                table: "Subscribers",
 031                type: "nvarchar(max)",
 032                nullable: false,
 033                defaultValue: "");
 034        }
 35
 36        protected override void Down(MigrationBuilder migrationBuilder)
 037        {
 038            migrationBuilder.DropColumn(
 039                name: "CurrentPeriodStart",
 040                table: "Subscribers");
 41
 042            migrationBuilder.DropColumn(
 043                name: "HostedInvoiceUrl",
 044                table: "Subscribers");
 45
 046            migrationBuilder.DropColumn(
 047                name: "StripeSubscriberSubscriptionId",
 048                table: "Subscribers");
 049        }
 50    }
 51}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122183058_Migration_6.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220122183058_Migration_6")]
 18    partial class Migration_6
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<int>("AmountSubTotal")
 0326                        .HasColumnType("int");
 0327
 0328                    b.Property<int>("AmountTotal")
 0329                        .HasColumnType("int");
 0330
 0331                    b.Property<string>("Name")
 0332                        .IsRequired()
 0333                        .HasMaxLength(200)
 0334                        .HasColumnType("nvarchar(200)");
 0335
 0336                    b.Property<int>("Quantity")
 0337                        .HasColumnType("int");
 0338
 0339                    b.Property<string>("UserEmail")
 0340                        .IsRequired()
 0341                        .HasMaxLength(100)
 0342                        .HasColumnType("nvarchar(100)");
 0343
 0344                    b.HasKey("Id");
 0345
 0346                    b.ToTable("Invoices", (string)null);
 0347                });
 348
 0349            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0350                {
 0351                    b.Property<int>("Id")
 0352                        .ValueGeneratedOnAdd()
 0353                        .HasColumnType("int");
 0354
 0355                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0356
 0357                    b.Property<string>("Author")
 0358                        .IsRequired()
 0359                        .HasMaxLength(200)
 0360                        .HasColumnType("nvarchar(200)");
 0361
 0362                    b.Property<DateTime>("DateRelease")
 0363                        .HasColumnType("datetime2");
 0364
 0365                    b.Property<string>("Description")
 0366                        .IsRequired()
 0367                        .HasMaxLength(1000)
 0368                        .HasColumnType("nvarchar(1000)");
 0369
 0370                    b.Property<string>("ImageName")
 0371                        .IsRequired()
 0372                        .HasMaxLength(200)
 0373                        .HasColumnType("nvarchar(200)");
 0374
 0375                    b.Property<string>("ImagePath")
 0376                        .IsRequired()
 0377                        .HasMaxLength(200)
 0378                        .HasColumnType("nvarchar(200)");
 0379
 0380                    b.Property<string>("Title")
 0381                        .IsRequired()
 0382                        .HasMaxLength(200)
 0383                        .HasColumnType("nvarchar(200)");
 0384
 0385                    b.HasKey("Id");
 0386
 0387                    b.ToTable("Musics", (string)null);
 0388                });
 389
 0390            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0391                {
 0392                    b.Property<int>("Id")
 0393                        .ValueGeneratedOnAdd()
 0394                        .HasColumnType("int");
 0395
 0396                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0397
 0398                    b.Property<int>("AmountTotal")
 0399                        .HasMaxLength(200)
 0400                        .HasColumnType("int");
 0401
 0402                    b.Property<string>("LineItems")
 0403                        .IsRequired()
 0404                        .HasMaxLength(10000)
 0405                        .HasColumnType("nvarchar(max)");
 0406
 0407                    b.Property<DateTime>("OrderDate")
 0408                        .HasColumnType("datetime2");
 0409
 0410                    b.Property<string>("OrderName")
 0411                        .IsRequired()
 0412                        .HasColumnType("nvarchar(max)");
 0413
 0414                    b.Property<string>("UserEmail")
 0415                        .IsRequired()
 0416                        .HasMaxLength(200)
 0417                        .HasColumnType("nvarchar(200)");
 0418
 0419                    b.HasKey("Id");
 0420
 0421                    b.ToTable("Orders", (string)null);
 0422                });
 423
 0424            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0425                {
 0426                    b.Property<int>("Id")
 0427                        .ValueGeneratedOnAdd()
 0428                        .HasColumnType("int");
 0429
 0430                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0431
 0432                    b.Property<DateTime>("ReceiptDate")
 0433                        .HasColumnType("datetime2");
 0434
 0435                    b.Property<string>("ReceiptName")
 0436                        .IsRequired()
 0437                        .HasMaxLength(200)
 0438                        .HasColumnType("nvarchar(200)");
 0439
 0440                    b.Property<string>("ReceiptUrl")
 0441                        .IsRequired()
 0442                        .HasMaxLength(500)
 0443                        .HasColumnType("nvarchar(500)");
 0444
 0445                    b.Property<string>("UserEmail")
 0446                        .IsRequired()
 0447                        .HasMaxLength(200)
 0448                        .HasColumnType("nvarchar(200)");
 0449
 0450                    b.HasKey("Id");
 0451
 0452                    b.ToTable("Receipts", (string)null);
 0453                });
 454
 0455            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0456                {
 0457                    b.Property<int>("Id")
 0458                        .ValueGeneratedOnAdd()
 0459                        .HasColumnType("int");
 0460
 0461                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0462
 0463                    b.Property<DateTime>("CurrentPeriodEnd")
 0464                        .HasColumnType("datetime2");
 0465
 0466                    b.Property<DateTime>("CurrentPeriodStart")
 0467                        .HasColumnType("datetime2");
 0468
 0469                    b.Property<int>("CustomerId")
 0470                        .HasColumnType("int");
 0471
 0472                    b.Property<DateTime>("DateStart")
 0473                        .HasColumnType("datetime2");
 0474
 0475                    b.Property<string>("HostedInvoiceUrl")
 0476                        .IsRequired()
 0477                        .HasColumnType("nvarchar(max)");
 0478
 0479                    b.Property<int>("Status")
 0480                        .HasMaxLength(200)
 0481                        .HasColumnType("int");
 0482
 0483                    b.Property<string>("StripeSubscriberSubscriptionId")
 0484                        .IsRequired()
 0485                        .HasColumnType("nvarchar(max)");
 0486
 0487                    b.Property<int>("SubscriptionId")
 0488                        .HasColumnType("int");
 0489
 0490                    b.HasKey("Id");
 0491
 0492                    b.HasIndex("CustomerId");
 0493
 0494                    b.HasIndex("SubscriptionId");
 0495
 0496                    b.ToTable("Subscribers", (string)null);
 0497                });
 498
 0499            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0500                {
 0501                    b.Property<int>("Id")
 0502                        .ValueGeneratedOnAdd()
 0503                        .HasColumnType("int");
 0504
 0505                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0506
 0507                    b.Property<string>("ChargeType")
 0508                        .IsRequired()
 0509                        .HasMaxLength(100)
 0510                        .HasColumnType("nvarchar(100)");
 0511
 0512                    b.Property<string>("Currency")
 0513                        .IsRequired()
 0514                        .HasColumnType("nvarchar(max)");
 0515
 0516                    b.Property<string>("CurrencySymbol")
 0517                        .IsRequired()
 0518                        .HasColumnType("nvarchar(max)");
 0519
 0520                    b.Property<string>("Name")
 0521                        .IsRequired()
 0522                        .HasMaxLength(200)
 0523                        .HasColumnType("nvarchar(200)");
 0524
 0525                    b.Property<string>("Options")
 0526                        .IsRequired()
 0527                        .HasMaxLength(500)
 0528                        .HasColumnType("nvarchar(500)");
 0529
 0530                    b.Property<decimal>("Price")
 0531                        .HasColumnType("decimal(18,2)");
 0532
 0533                    b.Property<string>("StripeSubscriptionId")
 0534                        .IsRequired()
 0535                        .HasColumnType("nvarchar(max)");
 0536
 0537                    b.HasKey("Id");
 0538
 0539                    b.ToTable("Subscriptions", (string)null);
 0540                });
 541
 0542            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0543                {
 0544                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0545                        .WithMany()
 0546                        .HasForeignKey("ClotheId");
 0547
 0548                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0549                        .WithMany()
 0550                        .HasForeignKey("UserId");
 0551
 0552                    b.Navigation("Clothe");
 0553
 0554                    b.Navigation("User");
 0555                });
 556
 0557            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0558                {
 0559                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0560                        .WithMany("Claims")
 0561                        .HasForeignKey("RoleId")
 0562                        .OnDelete(DeleteBehavior.Cascade)
 0563                        .IsRequired();
 0564
 0565                    b.Navigation("Role");
 0566                });
 567
 0568            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0569                {
 0570                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0571                        .WithMany("Claims")
 0572                        .HasForeignKey("UserId")
 0573                        .OnDelete(DeleteBehavior.Cascade)
 0574                        .IsRequired();
 0575
 0576                    b.Navigation("User");
 0577                });
 578
 0579            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0580                {
 0581                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0582                        .WithMany("Logins")
 0583                        .HasForeignKey("UserId")
 0584                        .OnDelete(DeleteBehavior.Cascade)
 0585                        .IsRequired();
 0586
 0587                    b.Navigation("User");
 0588                });
 589
 0590            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0591                {
 0592                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0593                        .WithMany("Users")
 0594                        .HasForeignKey("RoleId")
 0595                        .OnDelete(DeleteBehavior.Cascade)
 0596                        .IsRequired();
 0597
 0598                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0599                        .WithMany("Roles")
 0600                        .HasForeignKey("UserId")
 0601                        .OnDelete(DeleteBehavior.Cascade)
 0602                        .IsRequired();
 0603
 0604                    b.Navigation("Role");
 0605
 0606                    b.Navigation("User");
 0607                });
 608
 0609            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0610                {
 0611                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0612                        .WithMany("UserTokens")
 0613                        .HasForeignKey("UserId")
 0614                        .OnDelete(DeleteBehavior.Cascade)
 0615                        .IsRequired();
 0616
 0617                    b.Navigation("User");
 0618                });
 619
 0620            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0621                {
 0622                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0623                        .WithMany()
 0624                        .HasForeignKey("CustomerId")
 0625                        .OnDelete(DeleteBehavior.Cascade)
 0626                        .IsRequired();
 0627
 0628                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0629                        .WithMany()
 0630                        .HasForeignKey("SubscriptionId")
 0631                        .OnDelete(DeleteBehavior.Cascade)
 0632                        .IsRequired();
 0633
 0634                    b.Navigation("Customer");
 0635
 0636                    b.Navigation("Subscription");
 0637                });
 638
 0639            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0640                {
 0641                    b.Navigation("Claims");
 0642
 0643                    b.Navigation("Users");
 0644                });
 645
 0646            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0647                {
 0648                    b.Navigation("Claims");
 0649
 0650                    b.Navigation("Logins");
 0651
 0652                    b.Navigation("Roles");
 0653
 0654                    b.Navigation("UserTokens");
 0655                });
 656#pragma warning restore 612, 618
 0657        }
 658    }
 659}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_7.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_7.html deleted file mode 100644 index 3eea4dff..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_7.html +++ /dev/null @@ -1,870 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_7 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:626
Coverable lines:626
Total lines:691
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122193511_Migration_7.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_7 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AddColumn<int>(
 015                name: "AccessLevel",
 016                table: "Musics",
 017                type: "int",
 018                nullable: false,
 019                defaultValue: 0);
 020        }
 21
 22        protected override void Down(MigrationBuilder migrationBuilder)
 023        {
 024            migrationBuilder.DropColumn(
 025                name: "AccessLevel",
 026                table: "Musics");
 027        }
 28    }
 29}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220122193511_Migration_7.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220122193511_Migration_7")]
 18    partial class Migration_7
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<int>("AmountSubTotal")
 0326                        .HasColumnType("int");
 0327
 0328                    b.Property<int>("AmountTotal")
 0329                        .HasColumnType("int");
 0330
 0331                    b.Property<string>("Name")
 0332                        .IsRequired()
 0333                        .HasMaxLength(200)
 0334                        .HasColumnType("nvarchar(200)");
 0335
 0336                    b.Property<int>("Quantity")
 0337                        .HasColumnType("int");
 0338
 0339                    b.Property<string>("UserEmail")
 0340                        .IsRequired()
 0341                        .HasMaxLength(100)
 0342                        .HasColumnType("nvarchar(100)");
 0343
 0344                    b.HasKey("Id");
 0345
 0346                    b.ToTable("Invoices", (string)null);
 0347                });
 348
 0349            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0350                {
 0351                    b.Property<int>("Id")
 0352                        .ValueGeneratedOnAdd()
 0353                        .HasColumnType("int");
 0354
 0355                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0356
 0357                    b.Property<int>("AccessLevel")
 0358                        .HasColumnType("int");
 0359
 0360                    b.Property<string>("Author")
 0361                        .IsRequired()
 0362                        .HasMaxLength(200)
 0363                        .HasColumnType("nvarchar(200)");
 0364
 0365                    b.Property<DateTime>("DateRelease")
 0366                        .HasColumnType("datetime2");
 0367
 0368                    b.Property<string>("Description")
 0369                        .IsRequired()
 0370                        .HasMaxLength(1000)
 0371                        .HasColumnType("nvarchar(1000)");
 0372
 0373                    b.Property<string>("ImageName")
 0374                        .IsRequired()
 0375                        .HasMaxLength(200)
 0376                        .HasColumnType("nvarchar(200)");
 0377
 0378                    b.Property<string>("ImagePath")
 0379                        .IsRequired()
 0380                        .HasMaxLength(200)
 0381                        .HasColumnType("nvarchar(200)");
 0382
 0383                    b.Property<string>("Title")
 0384                        .IsRequired()
 0385                        .HasMaxLength(200)
 0386                        .HasColumnType("nvarchar(200)");
 0387
 0388                    b.HasKey("Id");
 0389
 0390                    b.ToTable("Musics", (string)null);
 0391                });
 392
 0393            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0394                {
 0395                    b.Property<int>("Id")
 0396                        .ValueGeneratedOnAdd()
 0397                        .HasColumnType("int");
 0398
 0399                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0400
 0401                    b.Property<int>("AmountTotal")
 0402                        .HasMaxLength(200)
 0403                        .HasColumnType("int");
 0404
 0405                    b.Property<string>("LineItems")
 0406                        .IsRequired()
 0407                        .HasMaxLength(10000)
 0408                        .HasColumnType("nvarchar(max)");
 0409
 0410                    b.Property<DateTime>("OrderDate")
 0411                        .HasColumnType("datetime2");
 0412
 0413                    b.Property<string>("OrderName")
 0414                        .IsRequired()
 0415                        .HasColumnType("nvarchar(max)");
 0416
 0417                    b.Property<string>("UserEmail")
 0418                        .IsRequired()
 0419                        .HasMaxLength(200)
 0420                        .HasColumnType("nvarchar(200)");
 0421
 0422                    b.HasKey("Id");
 0423
 0424                    b.ToTable("Orders", (string)null);
 0425                });
 426
 0427            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0428                {
 0429                    b.Property<int>("Id")
 0430                        .ValueGeneratedOnAdd()
 0431                        .HasColumnType("int");
 0432
 0433                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0434
 0435                    b.Property<DateTime>("ReceiptDate")
 0436                        .HasColumnType("datetime2");
 0437
 0438                    b.Property<string>("ReceiptName")
 0439                        .IsRequired()
 0440                        .HasMaxLength(200)
 0441                        .HasColumnType("nvarchar(200)");
 0442
 0443                    b.Property<string>("ReceiptUrl")
 0444                        .IsRequired()
 0445                        .HasMaxLength(500)
 0446                        .HasColumnType("nvarchar(500)");
 0447
 0448                    b.Property<string>("UserEmail")
 0449                        .IsRequired()
 0450                        .HasMaxLength(200)
 0451                        .HasColumnType("nvarchar(200)");
 0452
 0453                    b.HasKey("Id");
 0454
 0455                    b.ToTable("Receipts", (string)null);
 0456                });
 457
 0458            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0459                {
 0460                    b.Property<int>("Id")
 0461                        .ValueGeneratedOnAdd()
 0462                        .HasColumnType("int");
 0463
 0464                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0465
 0466                    b.Property<DateTime>("CurrentPeriodEnd")
 0467                        .HasColumnType("datetime2");
 0468
 0469                    b.Property<DateTime>("CurrentPeriodStart")
 0470                        .HasColumnType("datetime2");
 0471
 0472                    b.Property<int>("CustomerId")
 0473                        .HasColumnType("int");
 0474
 0475                    b.Property<DateTime>("DateStart")
 0476                        .HasColumnType("datetime2");
 0477
 0478                    b.Property<string>("HostedInvoiceUrl")
 0479                        .IsRequired()
 0480                        .HasColumnType("nvarchar(max)");
 0481
 0482                    b.Property<int>("Status")
 0483                        .HasMaxLength(200)
 0484                        .HasColumnType("int");
 0485
 0486                    b.Property<string>("StripeSubscriberSubscriptionId")
 0487                        .IsRequired()
 0488                        .HasColumnType("nvarchar(max)");
 0489
 0490                    b.Property<int>("SubscriptionId")
 0491                        .HasColumnType("int");
 0492
 0493                    b.HasKey("Id");
 0494
 0495                    b.HasIndex("CustomerId");
 0496
 0497                    b.HasIndex("SubscriptionId");
 0498
 0499                    b.ToTable("Subscribers", (string)null);
 0500                });
 501
 0502            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0503                {
 0504                    b.Property<int>("Id")
 0505                        .ValueGeneratedOnAdd()
 0506                        .HasColumnType("int");
 0507
 0508                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0509
 0510                    b.Property<string>("ChargeType")
 0511                        .IsRequired()
 0512                        .HasMaxLength(100)
 0513                        .HasColumnType("nvarchar(100)");
 0514
 0515                    b.Property<string>("Currency")
 0516                        .IsRequired()
 0517                        .HasColumnType("nvarchar(max)");
 0518
 0519                    b.Property<string>("CurrencySymbol")
 0520                        .IsRequired()
 0521                        .HasColumnType("nvarchar(max)");
 0522
 0523                    b.Property<string>("Name")
 0524                        .IsRequired()
 0525                        .HasMaxLength(200)
 0526                        .HasColumnType("nvarchar(200)");
 0527
 0528                    b.Property<string>("Options")
 0529                        .IsRequired()
 0530                        .HasMaxLength(500)
 0531                        .HasColumnType("nvarchar(500)");
 0532
 0533                    b.Property<decimal>("Price")
 0534                        .HasColumnType("decimal(18,2)");
 0535
 0536                    b.Property<string>("StripeSubscriptionId")
 0537                        .IsRequired()
 0538                        .HasColumnType("nvarchar(max)");
 0539
 0540                    b.HasKey("Id");
 0541
 0542                    b.ToTable("Subscriptions", (string)null);
 0543                });
 544
 0545            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0546                {
 0547                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0548                        .WithMany()
 0549                        .HasForeignKey("ClotheId");
 0550
 0551                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0552                        .WithMany()
 0553                        .HasForeignKey("UserId");
 0554
 0555                    b.Navigation("Clothe");
 0556
 0557                    b.Navigation("User");
 0558                });
 559
 0560            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0561                {
 0562                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0563                        .WithMany("Claims")
 0564                        .HasForeignKey("RoleId")
 0565                        .OnDelete(DeleteBehavior.Cascade)
 0566                        .IsRequired();
 0567
 0568                    b.Navigation("Role");
 0569                });
 570
 0571            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0572                {
 0573                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0574                        .WithMany("Claims")
 0575                        .HasForeignKey("UserId")
 0576                        .OnDelete(DeleteBehavior.Cascade)
 0577                        .IsRequired();
 0578
 0579                    b.Navigation("User");
 0580                });
 581
 0582            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0583                {
 0584                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0585                        .WithMany("Logins")
 0586                        .HasForeignKey("UserId")
 0587                        .OnDelete(DeleteBehavior.Cascade)
 0588                        .IsRequired();
 0589
 0590                    b.Navigation("User");
 0591                });
 592
 0593            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0594                {
 0595                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0596                        .WithMany("Users")
 0597                        .HasForeignKey("RoleId")
 0598                        .OnDelete(DeleteBehavior.Cascade)
 0599                        .IsRequired();
 0600
 0601                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0602                        .WithMany("Roles")
 0603                        .HasForeignKey("UserId")
 0604                        .OnDelete(DeleteBehavior.Cascade)
 0605                        .IsRequired();
 0606
 0607                    b.Navigation("Role");
 0608
 0609                    b.Navigation("User");
 0610                });
 611
 0612            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0613                {
 0614                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0615                        .WithMany("UserTokens")
 0616                        .HasForeignKey("UserId")
 0617                        .OnDelete(DeleteBehavior.Cascade)
 0618                        .IsRequired();
 0619
 0620                    b.Navigation("User");
 0621                });
 622
 0623            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0624                {
 0625                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0626                        .WithMany()
 0627                        .HasForeignKey("CustomerId")
 0628                        .OnDelete(DeleteBehavior.Cascade)
 0629                        .IsRequired();
 0630
 0631                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0632                        .WithMany()
 0633                        .HasForeignKey("SubscriptionId")
 0634                        .OnDelete(DeleteBehavior.Cascade)
 0635                        .IsRequired();
 0636
 0637                    b.Navigation("Customer");
 0638
 0639                    b.Navigation("Subscription");
 0640                });
 641
 0642            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0643                {
 0644                    b.Navigation("Claims");
 0645
 0646                    b.Navigation("Users");
 0647                });
 648
 0649            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0650                {
 0651                    b.Navigation("Claims");
 0652
 0653                    b.Navigation("Logins");
 0654
 0655                    b.Navigation("Roles");
 0656
 0657                    b.Navigation("UserTokens");
 0658                });
 659#pragma warning restore 612, 618
 0660        }
 661    }
 662}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_8.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_8.html deleted file mode 100644 index d5afc441..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_8.html +++ /dev/null @@ -1,889 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_8 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:643
Coverable lines:643
Total lines:710
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220123101055_Migration_8.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_8 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AddColumn<string>(
 015                name: "ImageName",
 016                table: "Subscriptions",
 017                type: "nvarchar(max)",
 018                nullable: false,
 019                defaultValue: "");
 20
 021            migrationBuilder.AddColumn<string>(
 022                name: "ImagePath",
 023                table: "Subscriptions",
 024                type: "nvarchar(max)",
 025                nullable: false,
 026                defaultValue: "");
 027        }
 28
 29        protected override void Down(MigrationBuilder migrationBuilder)
 030        {
 031            migrationBuilder.DropColumn(
 032                name: "ImageName",
 033                table: "Subscriptions");
 34
 035            migrationBuilder.DropColumn(
 036                name: "ImagePath",
 037                table: "Subscriptions");
 038        }
 39    }
 40}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220123101055_Migration_8.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220123101055_Migration_8")]
 18    partial class Migration_8
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<int>("AmountSubTotal")
 0326                        .HasColumnType("int");
 0327
 0328                    b.Property<int>("AmountTotal")
 0329                        .HasColumnType("int");
 0330
 0331                    b.Property<string>("Name")
 0332                        .IsRequired()
 0333                        .HasMaxLength(200)
 0334                        .HasColumnType("nvarchar(200)");
 0335
 0336                    b.Property<int>("Quantity")
 0337                        .HasColumnType("int");
 0338
 0339                    b.Property<string>("UserEmail")
 0340                        .IsRequired()
 0341                        .HasMaxLength(100)
 0342                        .HasColumnType("nvarchar(100)");
 0343
 0344                    b.HasKey("Id");
 0345
 0346                    b.ToTable("Invoices", (string)null);
 0347                });
 348
 0349            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0350                {
 0351                    b.Property<int>("Id")
 0352                        .ValueGeneratedOnAdd()
 0353                        .HasColumnType("int");
 0354
 0355                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0356
 0357                    b.Property<int>("AccessLevel")
 0358                        .HasColumnType("int");
 0359
 0360                    b.Property<string>("Author")
 0361                        .IsRequired()
 0362                        .HasMaxLength(200)
 0363                        .HasColumnType("nvarchar(200)");
 0364
 0365                    b.Property<DateTime>("DateRelease")
 0366                        .HasColumnType("datetime2");
 0367
 0368                    b.Property<string>("Description")
 0369                        .IsRequired()
 0370                        .HasMaxLength(1000)
 0371                        .HasColumnType("nvarchar(1000)");
 0372
 0373                    b.Property<string>("ImageName")
 0374                        .IsRequired()
 0375                        .HasMaxLength(200)
 0376                        .HasColumnType("nvarchar(200)");
 0377
 0378                    b.Property<string>("ImagePath")
 0379                        .IsRequired()
 0380                        .HasMaxLength(200)
 0381                        .HasColumnType("nvarchar(200)");
 0382
 0383                    b.Property<string>("Title")
 0384                        .IsRequired()
 0385                        .HasMaxLength(200)
 0386                        .HasColumnType("nvarchar(200)");
 0387
 0388                    b.HasKey("Id");
 0389
 0390                    b.ToTable("Musics", (string)null);
 0391                });
 392
 0393            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0394                {
 0395                    b.Property<int>("Id")
 0396                        .ValueGeneratedOnAdd()
 0397                        .HasColumnType("int");
 0398
 0399                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0400
 0401                    b.Property<int>("AmountTotal")
 0402                        .HasMaxLength(200)
 0403                        .HasColumnType("int");
 0404
 0405                    b.Property<string>("LineItems")
 0406                        .IsRequired()
 0407                        .HasMaxLength(10000)
 0408                        .HasColumnType("nvarchar(max)");
 0409
 0410                    b.Property<DateTime>("OrderDate")
 0411                        .HasColumnType("datetime2");
 0412
 0413                    b.Property<string>("OrderName")
 0414                        .IsRequired()
 0415                        .HasColumnType("nvarchar(max)");
 0416
 0417                    b.Property<string>("UserEmail")
 0418                        .IsRequired()
 0419                        .HasMaxLength(200)
 0420                        .HasColumnType("nvarchar(200)");
 0421
 0422                    b.HasKey("Id");
 0423
 0424                    b.ToTable("Orders", (string)null);
 0425                });
 426
 0427            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0428                {
 0429                    b.Property<int>("Id")
 0430                        .ValueGeneratedOnAdd()
 0431                        .HasColumnType("int");
 0432
 0433                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0434
 0435                    b.Property<DateTime>("ReceiptDate")
 0436                        .HasColumnType("datetime2");
 0437
 0438                    b.Property<string>("ReceiptName")
 0439                        .IsRequired()
 0440                        .HasMaxLength(200)
 0441                        .HasColumnType("nvarchar(200)");
 0442
 0443                    b.Property<string>("ReceiptUrl")
 0444                        .IsRequired()
 0445                        .HasMaxLength(500)
 0446                        .HasColumnType("nvarchar(500)");
 0447
 0448                    b.Property<string>("UserEmail")
 0449                        .IsRequired()
 0450                        .HasMaxLength(200)
 0451                        .HasColumnType("nvarchar(200)");
 0452
 0453                    b.HasKey("Id");
 0454
 0455                    b.ToTable("Receipts", (string)null);
 0456                });
 457
 0458            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0459                {
 0460                    b.Property<int>("Id")
 0461                        .ValueGeneratedOnAdd()
 0462                        .HasColumnType("int");
 0463
 0464                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0465
 0466                    b.Property<DateTime>("CurrentPeriodEnd")
 0467                        .HasColumnType("datetime2");
 0468
 0469                    b.Property<DateTime>("CurrentPeriodStart")
 0470                        .HasColumnType("datetime2");
 0471
 0472                    b.Property<int>("CustomerId")
 0473                        .HasColumnType("int");
 0474
 0475                    b.Property<DateTime>("DateStart")
 0476                        .HasColumnType("datetime2");
 0477
 0478                    b.Property<string>("HostedInvoiceUrl")
 0479                        .IsRequired()
 0480                        .HasColumnType("nvarchar(max)");
 0481
 0482                    b.Property<int>("Status")
 0483                        .HasMaxLength(200)
 0484                        .HasColumnType("int");
 0485
 0486                    b.Property<string>("StripeSubscriberSubscriptionId")
 0487                        .IsRequired()
 0488                        .HasColumnType("nvarchar(max)");
 0489
 0490                    b.Property<int>("SubscriptionId")
 0491                        .HasColumnType("int");
 0492
 0493                    b.HasKey("Id");
 0494
 0495                    b.HasIndex("CustomerId");
 0496
 0497                    b.HasIndex("SubscriptionId");
 0498
 0499                    b.ToTable("Subscribers", (string)null);
 0500                });
 501
 0502            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0503                {
 0504                    b.Property<int>("Id")
 0505                        .ValueGeneratedOnAdd()
 0506                        .HasColumnType("int");
 0507
 0508                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0509
 0510                    b.Property<string>("ChargeType")
 0511                        .IsRequired()
 0512                        .HasMaxLength(100)
 0513                        .HasColumnType("nvarchar(100)");
 0514
 0515                    b.Property<string>("Currency")
 0516                        .IsRequired()
 0517                        .HasColumnType("nvarchar(max)");
 0518
 0519                    b.Property<string>("CurrencySymbol")
 0520                        .IsRequired()
 0521                        .HasColumnType("nvarchar(max)");
 0522
 0523                    b.Property<string>("ImageName")
 0524                        .IsRequired()
 0525                        .HasColumnType("nvarchar(max)");
 0526
 0527                    b.Property<string>("ImagePath")
 0528                        .IsRequired()
 0529                        .HasColumnType("nvarchar(max)");
 0530
 0531                    b.Property<string>("Name")
 0532                        .IsRequired()
 0533                        .HasMaxLength(200)
 0534                        .HasColumnType("nvarchar(200)");
 0535
 0536                    b.Property<string>("Options")
 0537                        .IsRequired()
 0538                        .HasMaxLength(500)
 0539                        .HasColumnType("nvarchar(500)");
 0540
 0541                    b.Property<decimal>("Price")
 0542                        .HasColumnType("decimal(18,2)");
 0543
 0544                    b.Property<string>("StripeSubscriptionId")
 0545                        .IsRequired()
 0546                        .HasColumnType("nvarchar(max)");
 0547
 0548                    b.HasKey("Id");
 0549
 0550                    b.ToTable("Subscriptions", (string)null);
 0551                });
 552
 0553            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0554                {
 0555                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0556                        .WithMany()
 0557                        .HasForeignKey("ClotheId");
 0558
 0559                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0560                        .WithMany()
 0561                        .HasForeignKey("UserId");
 0562
 0563                    b.Navigation("Clothe");
 0564
 0565                    b.Navigation("User");
 0566                });
 567
 0568            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0569                {
 0570                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0571                        .WithMany("Claims")
 0572                        .HasForeignKey("RoleId")
 0573                        .OnDelete(DeleteBehavior.Cascade)
 0574                        .IsRequired();
 0575
 0576                    b.Navigation("Role");
 0577                });
 578
 0579            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0580                {
 0581                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0582                        .WithMany("Claims")
 0583                        .HasForeignKey("UserId")
 0584                        .OnDelete(DeleteBehavior.Cascade)
 0585                        .IsRequired();
 0586
 0587                    b.Navigation("User");
 0588                });
 589
 0590            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0591                {
 0592                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0593                        .WithMany("Logins")
 0594                        .HasForeignKey("UserId")
 0595                        .OnDelete(DeleteBehavior.Cascade)
 0596                        .IsRequired();
 0597
 0598                    b.Navigation("User");
 0599                });
 600
 0601            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0602                {
 0603                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0604                        .WithMany("Users")
 0605                        .HasForeignKey("RoleId")
 0606                        .OnDelete(DeleteBehavior.Cascade)
 0607                        .IsRequired();
 0608
 0609                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0610                        .WithMany("Roles")
 0611                        .HasForeignKey("UserId")
 0612                        .OnDelete(DeleteBehavior.Cascade)
 0613                        .IsRequired();
 0614
 0615                    b.Navigation("Role");
 0616
 0617                    b.Navigation("User");
 0618                });
 619
 0620            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0621                {
 0622                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0623                        .WithMany("UserTokens")
 0624                        .HasForeignKey("UserId")
 0625                        .OnDelete(DeleteBehavior.Cascade)
 0626                        .IsRequired();
 0627
 0628                    b.Navigation("User");
 0629                });
 630
 0631            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0632                {
 0633                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0634                        .WithMany()
 0635                        .HasForeignKey("CustomerId")
 0636                        .OnDelete(DeleteBehavior.Cascade)
 0637                        .IsRequired();
 0638
 0639                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0640                        .WithMany()
 0641                        .HasForeignKey("SubscriptionId")
 0642                        .OnDelete(DeleteBehavior.Cascade)
 0643                        .IsRequired();
 0644
 0645                    b.Navigation("Customer");
 0646
 0647                    b.Navigation("Subscription");
 0648                });
 649
 0650            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0651                {
 0652                    b.Navigation("Claims");
 0653
 0654                    b.Navigation("Users");
 0655                });
 656
 0657            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0658                {
 0659                    b.Navigation("Claims");
 0660
 0661                    b.Navigation("Logins");
 0662
 0663                    b.Navigation("Roles");
 0664
 0665                    b.Navigation("UserTokens");
 0666                });
 667#pragma warning restore 612, 618
 0668        }
 669    }
 670}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_9.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_9.html deleted file mode 100644 index 27ee6351..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_Migration_9.html +++ /dev/null @@ -1,924 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Migrations.Migration_9 - Coverage Report - -
-

< Summary

- -
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:676
Coverable lines:676
Total lines:745
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: Up(...)100%10%
File 1: Down(...)100%10%
File 2: BuildTargetModel(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220124072521_Migration_9.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated/>
 2#pragma warning disable CS1591
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6#nullable disable
 7
 8namespace BlazorShop.Infrastructure.Migrations
 9{
 10    public partial class Migration_9 : Migration
 11    {
 12        protected override void Up(MigrationBuilder migrationBuilder)
 013        {
 014            migrationBuilder.AlterColumn<string>(
 015                name: "ImagePath",
 016                table: "Subscriptions",
 017                type: "nvarchar(500)",
 018                maxLength: 500,
 019                nullable: false,
 020                oldClrType: typeof(string),
 021                oldType: "nvarchar(max)");
 22
 023            migrationBuilder.AlterColumn<string>(
 024                name: "ImageName",
 025                table: "Subscriptions",
 026                type: "nvarchar(500)",
 027                maxLength: 500,
 028                nullable: false,
 029                oldClrType: typeof(string),
 030                oldType: "nvarchar(max)");
 31
 032            migrationBuilder.AlterColumn<string>(
 033                name: "OrderName",
 034                table: "Orders",
 035                type: "nvarchar(200)",
 036                maxLength: 200,
 037                nullable: false,
 038                oldClrType: typeof(string),
 039                oldType: "nvarchar(max)");
 040        }
 41
 42        protected override void Down(MigrationBuilder migrationBuilder)
 043        {
 044            migrationBuilder.AlterColumn<string>(
 045                name: "ImagePath",
 046                table: "Subscriptions",
 047                type: "nvarchar(max)",
 048                nullable: false,
 049                oldClrType: typeof(string),
 050                oldType: "nvarchar(500)",
 051                oldMaxLength: 500);
 52
 053            migrationBuilder.AlterColumn<string>(
 054                name: "ImageName",
 055                table: "Subscriptions",
 056                type: "nvarchar(max)",
 057                nullable: false,
 058                oldClrType: typeof(string),
 059                oldType: "nvarchar(500)",
 060                oldMaxLength: 500);
 61
 062            migrationBuilder.AlterColumn<string>(
 063                name: "OrderName",
 064                table: "Orders",
 065                type: "nvarchar(max)",
 066                nullable: false,
 067                oldClrType: typeof(string),
 068                oldType: "nvarchar(200)",
 069                oldMaxLength: 200);
 070        }
 71    }
 72}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Migrations\20220124072521_Migration_9.Designer.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <auto-generated />
 2#pragma warning disable 1591
 3
 4using System;
 5using BlazorShop.Infrastructure.Persistence;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Metadata;
 9using Microsoft.EntityFrameworkCore.Migrations;
 10using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 11
 12#nullable disable
 13
 14namespace BlazorShop.Infrastructure.Migrations
 15{
 16    [DbContext(typeof(ApplicationDbContext))]
 17    [Migration("20220124072521_Migration_9")]
 18    partial class Migration_9
 19    {
 20        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 021        {
 22#pragma warning disable 612, 618
 023            modelBuilder
 024                .HasAnnotation("ProductVersion", "6.0.1")
 025                .HasAnnotation("Relational:MaxIdentifierLength", 128);
 26
 027            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
 28
 029            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 030                {
 031                    b.Property<int>("Id")
 032                        .ValueGeneratedOnAdd()
 033                        .HasColumnType("int");
 034
 035                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 036
 037                    b.Property<int>("Amount")
 038                        .HasColumnType("int");
 039
 040                    b.Property<int?>("ClotheId")
 041                        .HasColumnType("int");
 042
 043                    b.Property<string>("Name")
 044                        .IsRequired()
 045                        .HasMaxLength(200)
 046                        .HasColumnType("nvarchar(200)");
 047
 048                    b.Property<decimal>("Price")
 049                        .HasColumnType("decimal(18,2)");
 050
 051                    b.Property<int?>("UserId")
 052                        .HasColumnType("int");
 053
 054                    b.HasKey("Id");
 055
 056                    b.HasIndex("ClotheId");
 057
 058                    b.HasIndex("UserId");
 059
 060                    b.ToTable("Carts", (string)null);
 061                });
 62
 063            modelBuilder.Entity("BlazorShop.Domain.Entities.Clothe", b =>
 064                {
 065                    b.Property<int>("Id")
 066                        .ValueGeneratedOnAdd()
 067                        .HasColumnType("int");
 068
 069                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 070
 071                    b.Property<int>("Amount")
 072                        .HasColumnType("int");
 073
 074                    b.Property<string>("Description")
 075                        .IsRequired()
 076                        .HasMaxLength(1000)
 077                        .HasColumnType("nvarchar(1000)");
 078
 079                    b.Property<string>("ImageName")
 080                        .IsRequired()
 081                        .HasMaxLength(200)
 082                        .HasColumnType("nvarchar(200)");
 083
 084                    b.Property<string>("ImagePath")
 085                        .IsRequired()
 086                        .HasMaxLength(200)
 087                        .HasColumnType("nvarchar(200)");
 088
 089                    b.Property<bool?>("IsActive")
 090                        .IsRequired()
 091                        .HasColumnType("bit");
 092
 093                    b.Property<string>("Name")
 094                        .IsRequired()
 095                        .HasMaxLength(200)
 096                        .HasColumnType("nvarchar(200)");
 097
 098                    b.Property<decimal?>("Price")
 099                        .IsRequired()
 0100                        .HasColumnType("decimal(18,2)");
 0101
 0102                    b.HasKey("Id");
 0103
 0104                    b.ToTable("Clothes", (string)null);
 0105                });
 106
 0107            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0108                {
 0109                    b.Property<int>("Id")
 0110                        .ValueGeneratedOnAdd()
 0111                        .HasColumnType("int");
 0112
 0113                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0114
 0115                    b.Property<string>("ConcurrencyStamp")
 0116                        .IsConcurrencyToken()
 0117                        .HasColumnType("nvarchar(max)");
 0118
 0119                    b.Property<string>("Name")
 0120                        .HasMaxLength(256)
 0121                        .HasColumnType("nvarchar(256)");
 0122
 0123                    b.Property<string>("NormalizedName")
 0124                        .HasMaxLength(256)
 0125                        .HasColumnType("nvarchar(256)");
 0126
 0127                    b.HasKey("Id");
 0128
 0129                    b.HasIndex("NormalizedName")
 0130                        .IsUnique()
 0131                        .HasDatabaseName("RoleNameIndex")
 0132                        .HasFilter("[NormalizedName] IS NOT NULL");
 0133
 0134                    b.ToTable("AppRoles", (string)null);
 0135                });
 136
 0137            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0138                {
 0139                    b.Property<int>("Id")
 0140                        .ValueGeneratedOnAdd()
 0141                        .HasColumnType("int");
 0142
 0143                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0144
 0145                    b.Property<string>("ClaimType")
 0146                        .HasColumnType("nvarchar(max)");
 0147
 0148                    b.Property<string>("ClaimValue")
 0149                        .HasColumnType("nvarchar(max)");
 0150
 0151                    b.Property<int>("RoleId")
 0152                        .HasColumnType("int");
 0153
 0154                    b.HasKey("Id");
 0155
 0156                    b.HasIndex("RoleId");
 0157
 0158                    b.ToTable("AppRoleClaims", (string)null);
 0159                });
 160
 0161            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0162                {
 0163                    b.Property<int>("Id")
 0164                        .ValueGeneratedOnAdd()
 0165                        .HasColumnType("int");
 0166
 0167                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0168
 0169                    b.Property<int>("AccessFailedCount")
 0170                        .HasColumnType("int");
 0171
 0172                    b.Property<string>("ConcurrencyStamp")
 0173                        .IsConcurrencyToken()
 0174                        .HasColumnType("nvarchar(max)");
 0175
 0176                    b.Property<string>("Email")
 0177                        .HasMaxLength(256)
 0178                        .HasColumnType("nvarchar(256)");
 0179
 0180                    b.Property<bool>("EmailConfirmed")
 0181                        .HasColumnType("bit");
 0182
 0183                    b.Property<string>("FirstName")
 0184                        .HasColumnType("nvarchar(max)");
 0185
 0186                    b.Property<bool>("IsActive")
 0187                        .HasColumnType("bit");
 0188
 0189                    b.Property<string>("LastName")
 0190                        .HasColumnType("nvarchar(max)");
 0191
 0192                    b.Property<bool>("LockoutEnabled")
 0193                        .HasColumnType("bit");
 0194
 0195                    b.Property<DateTimeOffset?>("LockoutEnd")
 0196                        .HasColumnType("datetimeoffset");
 0197
 0198                    b.Property<string>("NormalizedEmail")
 0199                        .HasMaxLength(256)
 0200                        .HasColumnType("nvarchar(256)");
 0201
 0202                    b.Property<string>("NormalizedUserName")
 0203                        .HasMaxLength(256)
 0204                        .HasColumnType("nvarchar(256)");
 0205
 0206                    b.Property<string>("PasswordHash")
 0207                        .HasColumnType("nvarchar(max)");
 0208
 0209                    b.Property<string>("PhoneNumber")
 0210                        .HasColumnType("nvarchar(max)");
 0211
 0212                    b.Property<bool>("PhoneNumberConfirmed")
 0213                        .HasColumnType("bit");
 0214
 0215                    b.Property<string>("SecurityStamp")
 0216                        .HasColumnType("nvarchar(max)");
 0217
 0218                    b.Property<bool>("TwoFactorEnabled")
 0219                        .HasColumnType("bit");
 0220
 0221                    b.Property<string>("UserName")
 0222                        .HasMaxLength(256)
 0223                        .HasColumnType("nvarchar(256)");
 0224
 0225                    b.HasKey("Id");
 0226
 0227                    b.HasIndex("NormalizedEmail")
 0228                        .HasDatabaseName("EmailIndex");
 0229
 0230                    b.HasIndex("NormalizedUserName")
 0231                        .IsUnique()
 0232                        .HasDatabaseName("UserNameIndex")
 0233                        .HasFilter("[NormalizedUserName] IS NOT NULL");
 0234
 0235                    b.ToTable("AppUsers", (string)null);
 0236                });
 237
 0238            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0239                {
 0240                    b.Property<int>("Id")
 0241                        .ValueGeneratedOnAdd()
 0242                        .HasColumnType("int");
 0243
 0244                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0245
 0246                    b.Property<string>("ClaimType")
 0247                        .HasColumnType("nvarchar(max)");
 0248
 0249                    b.Property<string>("ClaimValue")
 0250                        .HasColumnType("nvarchar(max)");
 0251
 0252                    b.Property<int>("UserId")
 0253                        .HasColumnType("int");
 0254
 0255                    b.HasKey("Id");
 0256
 0257                    b.HasIndex("UserId");
 0258
 0259                    b.ToTable("AppUserClaims", (string)null);
 0260                });
 261
 0262            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0263                {
 0264                    b.Property<string>("LoginProvider")
 0265                        .HasColumnType("nvarchar(450)");
 0266
 0267                    b.Property<string>("ProviderKey")
 0268                        .HasColumnType("nvarchar(450)");
 0269
 0270                    b.Property<string>("ProviderDisplayName")
 0271                        .HasColumnType("nvarchar(max)");
 0272
 0273                    b.Property<int>("UserId")
 0274                        .HasColumnType("int");
 0275
 0276                    b.HasKey("LoginProvider", "ProviderKey");
 0277
 0278                    b.HasIndex("UserId");
 0279
 0280                    b.ToTable("AppUserLogins", (string)null);
 0281                });
 282
 0283            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0284                {
 0285                    b.Property<int>("UserId")
 0286                        .HasColumnType("int");
 0287
 0288                    b.Property<int>("RoleId")
 0289                        .HasColumnType("int");
 0290
 0291                    b.HasKey("UserId", "RoleId");
 0292
 0293                    b.HasIndex("RoleId");
 0294
 0295                    b.ToTable("AppUserRoles", (string)null);
 0296                });
 297
 0298            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0299                {
 0300                    b.Property<int>("UserId")
 0301                        .HasColumnType("int");
 0302
 0303                    b.Property<string>("LoginProvider")
 0304                        .HasColumnType("nvarchar(450)");
 0305
 0306                    b.Property<string>("Name")
 0307                        .HasColumnType("nvarchar(450)");
 0308
 0309                    b.Property<string>("Value")
 0310                        .HasColumnType("nvarchar(max)");
 0311
 0312                    b.HasKey("UserId", "LoginProvider", "Name");
 0313
 0314                    b.ToTable("AppUserTokens", (string)null);
 0315                });
 316
 0317            modelBuilder.Entity("BlazorShop.Domain.Entities.Invoice", b =>
 0318                {
 0319                    b.Property<int>("Id")
 0320                        .ValueGeneratedOnAdd()
 0321                        .HasColumnType("int");
 0322
 0323                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0324
 0325                    b.Property<int>("AmountSubTotal")
 0326                        .HasColumnType("int");
 0327
 0328                    b.Property<int>("AmountTotal")
 0329                        .HasColumnType("int");
 0330
 0331                    b.Property<string>("Name")
 0332                        .IsRequired()
 0333                        .HasMaxLength(200)
 0334                        .HasColumnType("nvarchar(200)");
 0335
 0336                    b.Property<int>("Quantity")
 0337                        .HasColumnType("int");
 0338
 0339                    b.Property<string>("UserEmail")
 0340                        .IsRequired()
 0341                        .HasMaxLength(100)
 0342                        .HasColumnType("nvarchar(100)");
 0343
 0344                    b.HasKey("Id");
 0345
 0346                    b.ToTable("Invoices", (string)null);
 0347                });
 348
 0349            modelBuilder.Entity("BlazorShop.Domain.Entities.Music", b =>
 0350                {
 0351                    b.Property<int>("Id")
 0352                        .ValueGeneratedOnAdd()
 0353                        .HasColumnType("int");
 0354
 0355                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0356
 0357                    b.Property<int>("AccessLevel")
 0358                        .HasColumnType("int");
 0359
 0360                    b.Property<string>("Author")
 0361                        .IsRequired()
 0362                        .HasMaxLength(200)
 0363                        .HasColumnType("nvarchar(200)");
 0364
 0365                    b.Property<DateTime>("DateRelease")
 0366                        .HasColumnType("datetime2");
 0367
 0368                    b.Property<string>("Description")
 0369                        .IsRequired()
 0370                        .HasMaxLength(1000)
 0371                        .HasColumnType("nvarchar(1000)");
 0372
 0373                    b.Property<string>("ImageName")
 0374                        .IsRequired()
 0375                        .HasMaxLength(200)
 0376                        .HasColumnType("nvarchar(200)");
 0377
 0378                    b.Property<string>("ImagePath")
 0379                        .IsRequired()
 0380                        .HasMaxLength(200)
 0381                        .HasColumnType("nvarchar(200)");
 0382
 0383                    b.Property<string>("Title")
 0384                        .IsRequired()
 0385                        .HasMaxLength(200)
 0386                        .HasColumnType("nvarchar(200)");
 0387
 0388                    b.HasKey("Id");
 0389
 0390                    b.ToTable("Musics", (string)null);
 0391                });
 392
 0393            modelBuilder.Entity("BlazorShop.Domain.Entities.Order", b =>
 0394                {
 0395                    b.Property<int>("Id")
 0396                        .ValueGeneratedOnAdd()
 0397                        .HasColumnType("int");
 0398
 0399                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0400
 0401                    b.Property<int>("AmountTotal")
 0402                        .HasMaxLength(200)
 0403                        .HasColumnType("int");
 0404
 0405                    b.Property<string>("LineItems")
 0406                        .IsRequired()
 0407                        .HasMaxLength(10000)
 0408                        .HasColumnType("nvarchar(max)");
 0409
 0410                    b.Property<DateTime>("OrderDate")
 0411                        .HasColumnType("datetime2");
 0412
 0413                    b.Property<string>("OrderName")
 0414                        .IsRequired()
 0415                        .HasMaxLength(200)
 0416                        .HasColumnType("nvarchar(200)");
 0417
 0418                    b.Property<string>("UserEmail")
 0419                        .IsRequired()
 0420                        .HasMaxLength(200)
 0421                        .HasColumnType("nvarchar(200)");
 0422
 0423                    b.HasKey("Id");
 0424
 0425                    b.ToTable("Orders", (string)null);
 0426                });
 427
 0428            modelBuilder.Entity("BlazorShop.Domain.Entities.Receipt", b =>
 0429                {
 0430                    b.Property<int>("Id")
 0431                        .ValueGeneratedOnAdd()
 0432                        .HasColumnType("int");
 0433
 0434                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0435
 0436                    b.Property<DateTime>("ReceiptDate")
 0437                        .HasColumnType("datetime2");
 0438
 0439                    b.Property<string>("ReceiptName")
 0440                        .IsRequired()
 0441                        .HasMaxLength(200)
 0442                        .HasColumnType("nvarchar(200)");
 0443
 0444                    b.Property<string>("ReceiptUrl")
 0445                        .IsRequired()
 0446                        .HasMaxLength(500)
 0447                        .HasColumnType("nvarchar(500)");
 0448
 0449                    b.Property<string>("UserEmail")
 0450                        .IsRequired()
 0451                        .HasMaxLength(200)
 0452                        .HasColumnType("nvarchar(200)");
 0453
 0454                    b.HasKey("Id");
 0455
 0456                    b.ToTable("Receipts", (string)null);
 0457                });
 458
 0459            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0460                {
 0461                    b.Property<int>("Id")
 0462                        .ValueGeneratedOnAdd()
 0463                        .HasColumnType("int");
 0464
 0465                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0466
 0467                    b.Property<DateTime>("CurrentPeriodEnd")
 0468                        .HasColumnType("datetime2");
 0469
 0470                    b.Property<DateTime>("CurrentPeriodStart")
 0471                        .HasColumnType("datetime2");
 0472
 0473                    b.Property<int>("CustomerId")
 0474                        .HasColumnType("int");
 0475
 0476                    b.Property<DateTime>("DateStart")
 0477                        .HasColumnType("datetime2");
 0478
 0479                    b.Property<string>("HostedInvoiceUrl")
 0480                        .IsRequired()
 0481                        .HasColumnType("nvarchar(max)");
 0482
 0483                    b.Property<int>("Status")
 0484                        .HasMaxLength(200)
 0485                        .HasColumnType("int");
 0486
 0487                    b.Property<string>("StripeSubscriberSubscriptionId")
 0488                        .IsRequired()
 0489                        .HasColumnType("nvarchar(max)");
 0490
 0491                    b.Property<int>("SubscriptionId")
 0492                        .HasColumnType("int");
 0493
 0494                    b.HasKey("Id");
 0495
 0496                    b.HasIndex("CustomerId");
 0497
 0498                    b.HasIndex("SubscriptionId");
 0499
 0500                    b.ToTable("Subscribers", (string)null);
 0501                });
 502
 0503            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscription", b =>
 0504                {
 0505                    b.Property<int>("Id")
 0506                        .ValueGeneratedOnAdd()
 0507                        .HasColumnType("int");
 0508
 0509                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
 0510
 0511                    b.Property<string>("ChargeType")
 0512                        .IsRequired()
 0513                        .HasMaxLength(100)
 0514                        .HasColumnType("nvarchar(100)");
 0515
 0516                    b.Property<string>("Currency")
 0517                        .IsRequired()
 0518                        .HasColumnType("nvarchar(max)");
 0519
 0520                    b.Property<string>("CurrencySymbol")
 0521                        .IsRequired()
 0522                        .HasColumnType("nvarchar(max)");
 0523
 0524                    b.Property<string>("ImageName")
 0525                        .IsRequired()
 0526                        .HasMaxLength(500)
 0527                        .HasColumnType("nvarchar(500)");
 0528
 0529                    b.Property<string>("ImagePath")
 0530                        .IsRequired()
 0531                        .HasMaxLength(500)
 0532                        .HasColumnType("nvarchar(500)");
 0533
 0534                    b.Property<string>("Name")
 0535                        .IsRequired()
 0536                        .HasMaxLength(200)
 0537                        .HasColumnType("nvarchar(200)");
 0538
 0539                    b.Property<string>("Options")
 0540                        .IsRequired()
 0541                        .HasMaxLength(500)
 0542                        .HasColumnType("nvarchar(500)");
 0543
 0544                    b.Property<decimal>("Price")
 0545                        .HasColumnType("decimal(18,2)");
 0546
 0547                    b.Property<string>("StripeSubscriptionId")
 0548                        .IsRequired()
 0549                        .HasColumnType("nvarchar(max)");
 0550
 0551                    b.HasKey("Id");
 0552
 0553                    b.ToTable("Subscriptions", (string)null);
 0554                });
 555
 0556            modelBuilder.Entity("BlazorShop.Domain.Entities.Cart", b =>
 0557                {
 0558                    b.HasOne("BlazorShop.Domain.Entities.Clothe", "Clothe")
 0559                        .WithMany()
 0560                        .HasForeignKey("ClotheId");
 0561
 0562                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0563                        .WithMany()
 0564                        .HasForeignKey("UserId");
 0565
 0566                    b.Navigation("Clothe");
 0567
 0568                    b.Navigation("User");
 0569                });
 570
 0571            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.RoleClaim", b =>
 0572                {
 0573                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0574                        .WithMany("Claims")
 0575                        .HasForeignKey("RoleId")
 0576                        .OnDelete(DeleteBehavior.Cascade)
 0577                        .IsRequired();
 0578
 0579                    b.Navigation("Role");
 0580                });
 581
 0582            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserClaim", b =>
 0583                {
 0584                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0585                        .WithMany("Claims")
 0586                        .HasForeignKey("UserId")
 0587                        .OnDelete(DeleteBehavior.Cascade)
 0588                        .IsRequired();
 0589
 0590                    b.Navigation("User");
 0591                });
 592
 0593            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserLogin", b =>
 0594                {
 0595                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0596                        .WithMany("Logins")
 0597                        .HasForeignKey("UserId")
 0598                        .OnDelete(DeleteBehavior.Cascade)
 0599                        .IsRequired();
 0600
 0601                    b.Navigation("User");
 0602                });
 603
 0604            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserRole", b =>
 0605                {
 0606                    b.HasOne("BlazorShop.Domain.Entities.Identity.Role", "Role")
 0607                        .WithMany("Users")
 0608                        .HasForeignKey("RoleId")
 0609                        .OnDelete(DeleteBehavior.Cascade)
 0610                        .IsRequired();
 0611
 0612                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0613                        .WithMany("Roles")
 0614                        .HasForeignKey("UserId")
 0615                        .OnDelete(DeleteBehavior.Cascade)
 0616                        .IsRequired();
 0617
 0618                    b.Navigation("Role");
 0619
 0620                    b.Navigation("User");
 0621                });
 622
 0623            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.UserToken", b =>
 0624                {
 0625                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "User")
 0626                        .WithMany("UserTokens")
 0627                        .HasForeignKey("UserId")
 0628                        .OnDelete(DeleteBehavior.Cascade)
 0629                        .IsRequired();
 0630
 0631                    b.Navigation("User");
 0632                });
 633
 0634            modelBuilder.Entity("BlazorShop.Domain.Entities.Subscriber", b =>
 0635                {
 0636                    b.HasOne("BlazorShop.Domain.Entities.Identity.User", "Customer")
 0637                        .WithMany()
 0638                        .HasForeignKey("CustomerId")
 0639                        .OnDelete(DeleteBehavior.Cascade)
 0640                        .IsRequired();
 0641
 0642                    b.HasOne("BlazorShop.Domain.Entities.Subscription", "Subscription")
 0643                        .WithMany()
 0644                        .HasForeignKey("SubscriptionId")
 0645                        .OnDelete(DeleteBehavior.Cascade)
 0646                        .IsRequired();
 0647
 0648                    b.Navigation("Customer");
 0649
 0650                    b.Navigation("Subscription");
 0651                });
 652
 0653            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.Role", b =>
 0654                {
 0655                    b.Navigation("Claims");
 0656
 0657                    b.Navigation("Users");
 0658                });
 659
 0660            modelBuilder.Entity("BlazorShop.Domain.Entities.Identity.User", b =>
 0661                {
 0662                    b.Navigation("Claims");
 0663
 0664                    b.Navigation("Logins");
 0665
 0666                    b.Navigation("Roles");
 0667
 0668                    b.Navigation("UserTokens");
 0669                });
 670#pragma warning restore 612, 618
 0671        }
 672    }
 673}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_MusicConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_MusicConfiguration.html deleted file mode 100644 index 44e2235b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_MusicConfiguration.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.MusicConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.MusicConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\MusicConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:23
Uncovered lines:0
Coverable lines:23
Total lines:42
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\MusicConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="MusicConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Music"/>.
 9    /// </summary>
 10    public class MusicConfiguration : IEntityTypeConfiguration<Music>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Music> builder)
 217        {
 218            builder.ToTable("Musics");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.Title)
 222                .HasMaxLength(200)
 223                .IsRequired();
 224            builder.Property(t => t.Description)
 225                .HasMaxLength(1000)
 226                .IsRequired();
 227            builder.Property(t => t.Author)
 228                .HasMaxLength(200)
 229                .IsRequired();
 230            builder.Property(t => t.DateRelease)
 231                .IsRequired();
 232            builder.Property(t => t.ImageName)
 233                .HasMaxLength(200)
 234                .IsRequired();
 235            builder.Property(t => t.ImagePath)
 236                .HasMaxLength(200)
 237                .IsRequired();
 238            builder.Property(t => t.AccessLevel)
 239                .IsRequired();
 240        }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_OrderConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_OrderConfiguration.html deleted file mode 100644 index 3b226ecc..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_OrderConfiguration.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.OrderConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.OrderConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\OrderConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:18
Uncovered lines:0
Coverable lines:18
Total lines:37
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\OrderConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="OrderConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Order"/>.
 9    /// </summary>
 10    public class OrderConfiguration : IEntityTypeConfiguration<Order>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Order> builder)
 217        {
 218            builder.ToTable("Orders");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.UserEmail)
 222                .HasMaxLength(100)
 223                .IsRequired();
 224            builder.Property(t => t.OrderName)
 225                .HasMaxLength(200)
 226                .IsRequired();
 227            builder.Property(t => t.OrderDate)
 228                .IsRequired();
 229            builder.Property(t => t.LineItems)
 230                .HasMaxLength(10000)
 231                .IsRequired();
 232            builder.Property(t => t.AmountTotal)
 233                .HasMaxLength(50)
 234                .IsRequired();
 235        }
 36    }
 37}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ReceiptConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ReceiptConfiguration.html deleted file mode 100644 index 6e337919..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_ReceiptConfiguration.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.ReceiptConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.ReceiptConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\ReceiptConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:15
Uncovered lines:0
Coverable lines:15
Total lines:34
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\ReceiptConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ReceiptConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Receipt"/>.
 9    /// </summary>
 10    public class ReceiptConfiguration : IEntityTypeConfiguration<Receipt>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Receipt> builder)
 217        {
 218            builder.ToTable("Receipts");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.UserEmail)
 222                .HasMaxLength(100)
 223                .IsRequired();
 224            builder.Property(t => t.ReceiptDate)
 225                .IsRequired();
 226            builder.Property(t => t.ReceiptName)
 227                .HasMaxLength(200)
 228                .IsRequired();
 229            builder.Property(t => t.ReceiptUrl)
 230                .HasMaxLength(500)
 231                .IsRequired();
 232        }
 33    }
 34}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleClaimConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleClaimConfiguration.html deleted file mode 100644 index 95f6b036..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleClaimConfiguration.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleClaimConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleClaimConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\RoleClaimConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:12
Uncovered lines:0
Coverable lines:12
Total lines:32
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\RoleClaimConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RoleClaimConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations.Identity
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="RoleClaim"/>.
 9    /// </summary>
 10    public class RoleClaimConfiguration : IEntityTypeConfiguration<RoleClaim>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<RoleClaim> builder)
 217        {
 218            builder.ToTable("AppRoleClaims");
 19
 220            builder.HasOne(roleClaim => roleClaim.Role)
 221                .WithMany(role => role.Claims)
 222                .HasForeignKey(roleClaim => roleClaim.RoleId);
 23
 224            builder.Property(x => x.ClaimType)
 225                .HasMaxLength(200)
 226                .IsRequired();
 227            builder.Property(x => x.ClaimValue)
 228                .HasMaxLength(200)
 229                .IsRequired();
 230        }
 31    }
 32}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleConfiguration.html deleted file mode 100644 index 9743e6e4..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleConfiguration.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\RoleConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:28
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\RoleConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RoleConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations.Identity
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Role"/>.
 9    /// </summary>
 10    public class RoleConfiguration : IEntityTypeConfiguration<Role>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Role> builder)
 217        {
 218            builder.ToTable("AppRoles");
 19
 220            builder.Property(x => x.Name)
 221                .HasMaxLength(100)
 222                .IsRequired();
 223            builder.Property(x => x.NormalizedName)
 224                .HasMaxLength(100)
 225                .IsRequired();
 226        }
 27    }
 28}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleService.html deleted file mode 100644 index c9f1011c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RoleService.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Services.RoleService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Services.RoleService
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\RoleService.cs
-
-
-
-
-
-
-
Line coverage
-
-
6%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:9
Uncovered lines:124
Coverable lines:133
Total lines:219
Line coverage:6.7%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:12
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_UserManager()100%10%
get_RoleManager()100%10%
get_Mapper()100%10%
CheckUserRolesAsync()100%10%
GetDefaultRole()100%10%
GetUserRole()100%10%
GetAdminRole()100%10%
SetUserRoleAsync()0%40%
GetRoles()100%10%
GetRolesForAdmin()100%10%
GetRoleById(...)100%10%
GetRoleByNormalizedName(...)100%10%
CreateRoleAsync()0%20%
UpdateRoleAsync()0%40%
DeleteRoleAsync()0%20%
FindRoleByIdAsync()100%10%
FindRoleByNameAsync()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\RoleService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RoleService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IRoleService"/>.
 9    /// </summary>
 10    public class RoleService : IRoleService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="RoleService"/> class.
 14        /// </summary>
 15        /// <param name="userManager">The instance of <see cref="UserManager{User}"/> to use.</param>
 16        /// <param name="roleManager">The instance of <see cref="RoleManager{Role}"/> to use.</param>
 17        /// <param name="mapper">The instance of <see cref="IMapper"/> to use.</param>
 1418        public RoleService(
 1419            UserManager<User> userManager,
 1420            RoleManager<Role> roleManager,
 1421            IMapper mapper)
 1422        {
 1423            this.UserManager = userManager;
 1424            this.RoleManager = roleManager;
 1425            this.Mapper = mapper;
 1426        }
 27
 28        /// <summary>
 29        /// Gets the instance of <see cref="UserManager{User}"/> to use.
 30        /// </summary>
 031        private UserManager<User> UserManager { get; }
 32
 33        /// <summary>
 34        /// Gets the instance of <see cref="RoleManager{Role}"/> to use.
 35        /// </summary>
 036        private RoleManager<Role> RoleManager { get; }
 37
 38        /// <summary>
 39        /// Gets the instance of <see cref="IMapper"/> to use.
 40        /// </summary>
 041        private IMapper Mapper { get; }
 42
 43        /// <inheritdoc/>
 44        public async Task<List<string>> CheckUserRolesAsync(User user)
 045        {
 046            var roles = await this.UserManager.GetRolesAsync(user);
 047            return roles.ToList();
 048        }
 49
 50        /// <inheritdoc/>
 51        public RoleResponse GetDefaultRole()
 052        {
 053            var role = this.RoleManager.Roles
 054                .TagWith(nameof(this.GetDefaultRole))
 055                .Where(x => x.Name == StringRoleResources.Default &&
 056                    x.NormalizedName == StringRoleResources.DefaultNormalized)
 057                .ProjectTo<RoleResponse>(this.Mapper.ConfigurationProvider)
 058                .FirstOrDefault();
 059            return role;
 060        }
 61
 62        /// <inheritdoc/>
 63        public RoleResponse GetUserRole()
 064        {
 065            var role = this.RoleManager.Roles
 066                .TagWith(nameof(this.GetUserRole))
 067                .Where(x => x.Name == StringRoleResources.User &&
 068                    x.NormalizedName == StringRoleResources.UserNormalized)
 069                .ProjectTo<RoleResponse>(this.Mapper.ConfigurationProvider)
 070                .FirstOrDefault();
 071            return role;
 072        }
 73
 74        /// <inheritdoc/>
 75        public RoleResponse GetAdminRole()
 076        {
 077            var role = this.RoleManager.Roles
 078                .TagWith(nameof(this.GetAdminRole))
 079                .Where(x => x.Name == StringRoleResources.Admin &&
 080                    x.NormalizedName == StringRoleResources.AdminNormalized)
 081                .ProjectTo<RoleResponse>(this.Mapper.ConfigurationProvider)
 082                .FirstOrDefault();
 083            return role;
 084        }
 85
 86        /// <inheritdoc/>
 87        public async Task<RequestResponse> SetUserRoleAsync(User user, string role)
 088        {
 089            var roles = await this.CheckUserRolesAsync(user);
 090            if (roles.Count == 0)
 091            {
 092                await this.UserManager.AddToRoleAsync(user, role);
 093                var roleData = await this.RoleManager.FindByNameAsync(role);
 094                return RequestResponse.Success(roleData.Id);
 95            }
 096            else if (roles.Count > 0)
 097            {
 098                await this.UserManager.RemoveFromRoleAsync(user, roles[0]);
 099                await this.UserManager.AddToRoleAsync(user, role);
 0100                var roleData = await this.RoleManager.FindByNameAsync(role);
 0101                return RequestResponse.Success(roleData.Id);
 102            }
 103
 0104            throw new Exception("The user has already a role");
 0105        }
 106
 107        /// <inheritdoc/>
 108        public List<RoleResponse> GetRoles()
 0109        {
 0110            var result = this.RoleManager.Roles
 0111                .TagWith(nameof(this.GetRoles))
 0112                .Where(x => x.Name != StringRoleResources.Admin &&
 0113                    x.NormalizedName != StringRoleResources.AdminNormalized)
 0114                .ProjectTo<RoleResponse>(this.Mapper.ConfigurationProvider)
 0115                .ToList();
 0116            return result;
 0117        }
 118
 119        /// <inheritdoc/>
 120        public List<RoleResponse> GetRolesForAdmin()
 0121        {
 0122            var result = this.RoleManager.Roles
 0123                .TagWith(nameof(this.GetRolesForAdmin))
 0124                .ProjectTo<RoleResponse>(this.Mapper.ConfigurationProvider)
 0125                .ToList();
 0126            return result;
 0127        }
 128
 129        /// <inheritdoc/>
 130        public RoleResponse GetRoleById(int id)
 0131        {
 0132            var result = this.RoleManager.Roles
 0133                .TagWith(nameof(this.GetRoleById))
 0134                .Where(x => x.Id == id)
 0135                .ProjectTo<RoleResponse>(this.Mapper.ConfigurationProvider)
 0136                .FirstOrDefault();
 0137            return result;
 0138        }
 139
 140        /// <inheritdoc/>
 141        public RoleResponse GetRoleByNormalizedName(string normalizedName)
 0142        {
 0143            var result = this.RoleManager.Roles
 0144                .TagWith(nameof(this.GetRoleByNormalizedName))
 0145                .Where(x => x.NormalizedName == normalizedName)
 0146                .ProjectTo<RoleResponse>(this.Mapper.ConfigurationProvider)
 0147                .FirstOrDefault();
 0148            return result;
 0149        }
 150
 151        /// <inheritdoc/>
 152        public async Task<RequestResponse> CreateRoleAsync(CreateRoleCommand command)
 0153        {
 0154            var role = await this.RoleManager.FindByNameAsync(command.Name);
 0155            if (role != null)
 0156            {
 0157                throw new Exception("The role was already created");
 158            }
 159
 0160            await this.RoleManager.CreateAsync(new Role
 0161            {
 0162                Name = command.Name,
 0163                NormalizedName = command.Name.ToUpper(),
 0164            });
 165
 0166            var roleData = await this.RoleManager.FindByNameAsync(command.Name);
 0167            return RequestResponse.Success(roleData.Id);
 0168        }
 169
 170        /// <inheritdoc/>
 171        public async Task<RequestResponse> UpdateRoleAsync(UpdateRoleCommand command)
 0172        {
 0173            var existsRole = await this.RoleManager.FindByNameAsync(command.Name);
 0174            if (existsRole != null)
 0175            {
 0176                throw new Exception("The new role already exists");
 177            }
 178
 0179            var role = await this.RoleManager.FindByIdAsync(command.Id.ToString());
 0180            if (role == null)
 0181            {
 0182                throw new Exception("The role was not created");
 183            }
 184
 0185            role.Name = command.Name;
 0186            role.NormalizedName = command.Name.ToUpper();
 187
 0188            await this.RoleManager.UpdateAsync(role);
 0189            return RequestResponse.Success(role.Id);
 0190        }
 191
 192        /// <inheritdoc/>
 193        public async Task<RequestResponse> DeleteRoleAsync(int roleId)
 0194        {
 0195            var role = await this.RoleManager.FindByIdAsync(roleId.ToString());
 0196            if (role == null)
 0197            {
 0198                throw new Exception("The role was not found");
 199            }
 200
 0201            await this.RoleManager.DeleteAsync(role);
 0202            return RequestResponse.Success(role.Id);
 0203        }
 204
 205        /// <inheritdoc/>
 206        public async Task<Role> FindRoleByIdAsync(int roleId)
 0207        {
 0208            var result = await this.RoleManager.FindByIdAsync(roleId.ToString());
 0209            return result;
 0210        }
 211
 212        /// <inheritdoc/>
 213        public async Task<Role> FindRoleByNameAsync(string name)
 0214        {
 0215            var result = await this.RoleManager.FindByNameAsync(name);
 0216            return result;
 0217        }
 218    }
 219}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RolesSeedModel.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RolesSeedModel.html deleted file mode 100644 index 5d5ff92d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_RolesSeedModel.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Utils.RolesSeedModel - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Utils.RolesSeedModel
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Utils\RolesSeedModel.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:42
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_AdminRoleName()100%10%
get_AdminRoleNormalizedName()100%10%
get_DefaultRoleName()100%10%
get_DefaultRoleNormalizedName()100%10%
get_UserRoleName()100%10%
get_UserRoleNormalizedName()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Utils\RolesSeedModel.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RolesSeedModel.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Utils
 6{
 7    /// <summary>
 8    /// A model of Roles seed.
 9    /// </summary>
 10    public class RolesSeedModel
 11    {
 12        /// <summary>
 13        /// Gets or Sets the admin role name.
 14        /// </summary>
 015        public string? AdminRoleName { get; set; }
 16
 17        /// <summary>
 18        /// Gets or Sets the admin normalized role name.
 19        /// </summary>
 020        public string? AdminRoleNormalizedName { get; set; }
 21
 22        /// <summary>
 23        /// Gets or Sets the default role name.
 24        /// </summary>
 025        public string? DefaultRoleName { get; set; }
 26
 27        /// <summary>
 28        /// Gets or Sets the default normalized role name.
 29        /// </summary>
 030        public string? DefaultRoleNormalizedName { get; set; }
 31
 32        /// <summary>
 33        /// Gets or Sets the user role name.
 34        /// </summary>
 035        public string? UserRoleName { get; set; }
 36
 37        /// <summary>
 38        /// Gets or Sets the user normalized role name.
 39        /// </summary>
 040        public string? UserRoleNormalizedName { get; set; }
 41    }
 42}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_SubscriberConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_SubscriberConfiguration.html deleted file mode 100644 index 624ec6da..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_SubscriberConfiguration.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.SubscriberConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.SubscriberConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\SubscriberConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:19
Uncovered lines:0
Coverable lines:19
Total lines:38
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\SubscriberConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SubscriberConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Subscriber"/>.
 9    /// </summary>
 10    public class SubscriberConfiguration : IEntityTypeConfiguration<Subscriber>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Subscriber> builder)
 217        {
 218            builder.ToTable("Subscribers");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.Status)
 222                .HasMaxLength(50)
 223                .IsRequired();
 224            builder.Property(t => t.DateStart)
 225                .IsRequired();
 226            builder.Property(t => t.CurrentPeriodEnd)
 227                .IsRequired();
 228            builder.Property(t => t.CurrentPeriodStart)
 229                .IsRequired();
 230            builder.Property(t => t.StripeSubscriberSubscriptionId)
 231                .HasMaxLength(500)
 232                .IsRequired();
 233            builder.Property(t => t.HostedInvoiceUrl)
 234                .HasMaxLength(700)
 235                .IsRequired();
 236        }
 37    }
 38}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_SubscriptionConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_SubscriptionConfiguration.html deleted file mode 100644 index 8d18c0c7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_SubscriptionConfiguration.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.SubscriptionConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.SubscriptionConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\SubscriptionConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:29
Uncovered lines:0
Coverable lines:29
Total lines:48
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\SubscriptionConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SubscriptionConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="Subscription"/>.
 9    /// </summary>
 10    public class SubscriptionConfiguration : IEntityTypeConfiguration<Subscription>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<Subscription> builder)
 217        {
 218            builder.ToTable("Subscriptions");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.StripeSubscriptionId)
 222                .IsRequired();
 223            builder.Property(t => t.Name)
 224                .HasMaxLength(200)
 225                .IsRequired();
 226            builder.Property(t => t.Price)
 227                .IsRequired();
 228            builder.Property(t => t.Currency)
 229                .HasMaxLength(25)
 230                .IsRequired();
 231            builder.Property(t => t.CurrencySymbol)
 232                .HasMaxLength(5)
 233                .IsRequired();
 234            builder.Property(t => t.ChargeType)
 235                .HasMaxLength(25)
 236                .IsRequired();
 237            builder.Property(t => t.Options)
 238                .HasMaxLength(1000)
 239                .IsRequired();
 240            builder.Property(t => t.ImageName)
 241                .HasMaxLength(200)
 242                .IsRequired();
 243            builder.Property(t => t.ImagePath)
 244                .HasMaxLength(200)
 245                .IsRequired();
 246        }
 47    }
 48}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_TodoItemConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_TodoItemConfiguration.html deleted file mode 100644 index ac38fa94..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_TodoItemConfiguration.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.TodoItemConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.TodoItemConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\TodoItemConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:28
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\TodoItemConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoItemConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="TodoItem"/>.
 9    /// </summary>
 10    public class TodoItemConfiguration : IEntityTypeConfiguration<TodoItem>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<TodoItem> builder)
 217        {
 218            builder.ToTable("TodoItems");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.Title)
 222                .HasMaxLength(200)
 223                .IsRequired();
 224            builder.Property(t => t.Note)
 225                .HasMaxLength(1000);
 226        }
 27    }
 28}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_TodoListConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_TodoListConfiguration.html deleted file mode 100644 index 8af77b7e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_TodoListConfiguration.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.TodoListConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.TodoListConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\TodoListConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:26
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\TodoListConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoListConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="TodoList"/>.
 9    /// </summary>
 10    public class TodoListConfiguration : IEntityTypeConfiguration<TodoList>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<TodoList> builder)
 217        {
 218            builder.ToTable("TodoLists");
 219            builder.HasKey(x => x.Id);
 20
 221            builder.Property(t => t.Title)
 222                .HasMaxLength(200)
 223                .IsRequired();
 224        }
 25    }
 26}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserClaimConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserClaimConfiguration.html deleted file mode 100644 index 4522df8e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserClaimConfiguration.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserClaimConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserClaimConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserClaimConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:12
Uncovered lines:0
Coverable lines:12
Total lines:32
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserClaimConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserClaimConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations.Identity
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="UserClaim"/>.
 9    /// </summary>
 10    public class UserClaimConfiguration : IEntityTypeConfiguration<UserClaim>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<UserClaim> builder)
 217        {
 218            builder.ToTable("AppUserClaims");
 19
 220            builder.HasOne(userClaim => userClaim.User)
 221                .WithMany(user => user.Claims)
 222                .HasForeignKey(userClaim => userClaim.UserId);
 23
 224            builder.Property(x => x.ClaimType)
 225                .HasMaxLength(200)
 226                .IsRequired();
 227            builder.Property(x => x.ClaimValue)
 228                .HasMaxLength(200)
 229                .IsRequired();
 230        }
 31    }
 32}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserConfiguration.html deleted file mode 100644 index e33ccadd..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserConfiguration.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:23
Uncovered lines:0
Coverable lines:23
Total lines:43
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations.Identity
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="User"/>.
 9    /// </summary>
 10    public class UserConfiguration : IEntityTypeConfiguration<User>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<User> builder)
 217        {
 218            builder.ToTable("AppUsers");
 19
 220            builder.Property(x => x.FirstName)
 221                .HasMaxLength(100)
 222                .IsRequired();
 223            builder.Property(x => x.LastName)
 224                .HasMaxLength(100)
 225                .IsRequired();
 226            builder.Property(x => x.IsActive)
 227                .IsRequired();
 28
 229            builder.Property(x => x.UserName)
 230                .HasMaxLength(250)
 231                .IsRequired();
 232            builder.Property(x => x.NormalizedUserName)
 233                .HasMaxLength(250)
 234                .IsRequired();
 235            builder.Property(x => x.Email)
 236                .HasMaxLength(150)
 237                .IsRequired();
 238            builder.Property(x => x.NormalizedEmail)
 239                .HasMaxLength(150)
 240                .IsRequired();
 241        }
 42    }
 43}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserLoginConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserLoginConfiguration.html deleted file mode 100644 index 1a46bdb1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserLoginConfiguration.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserLoginConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserLoginConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserLoginConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:0
Coverable lines:6
Total lines:25
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserLoginConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserLoginConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations.Identity
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="UserLogin"/>.
 9    /// </summary>
 10    public class UserLoginConfiguration : IEntityTypeConfiguration<UserLogin>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<UserLogin> builder)
 217        {
 218            builder.ToTable("AppUserLogins");
 19
 220            builder.HasOne(userLogin => userLogin.User)
 221                .WithMany(user => user.Logins)
 222                .HasForeignKey(userLogin => userLogin.UserId);
 223        }
 24    }
 25}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserRoleConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserRoleConfiguration.html deleted file mode 100644 index b564b6e1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserRoleConfiguration.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserRoleConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserRoleConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserRoleConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:28
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserRoleConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserRoleConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations.Identity
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="UserRole"/>.
 9    /// </summary>
 10    public class UserRoleConfiguration : IEntityTypeConfiguration<UserRole>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<UserRole> builder)
 217        {
 218            builder.ToTable("AppUserRoles");
 19
 220            builder.HasOne(userRole => userRole.Role)
 221                .WithMany(role => role.Users)
 222                .HasForeignKey(userRole => userRole.RoleId);
 223            builder.HasOne(userRole => userRole.User)
 224                .WithMany(user => user.Roles)
 225                .HasForeignKey(userRole => userRole.UserId);
 226        }
 27    }
 28}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserService.html deleted file mode 100644 index 551c270d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserService.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Services.UserService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Services.UserService
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\UserService.cs
-
-
-
-
-
-
-
Line coverage
-
-
6%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:9
Uncovered lines:124
Coverable lines:133
Total lines:225
Line coverage:6.7%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:16
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_UserManager()100%10%
get_RoleService()100%10%
get_Mapper()100%10%
CreateUserAsync()0%40%
DeleteUserAsync()0%20%
FindUserByEmailAsync()100%10%
FindUserByIdAsync()100%10%
GetUserById(...)100%10%
GetUserByEmail(...)100%10%
GetUserRoleAsync()100%10%
UpdateUserAsync()0%40%
ActivateUserAsync()0%20%
UpdateUserEmailAsync()0%40%
GetUsers(...)100%10%
GetUsersInactive(...)100%10%
AssignUserToRoleAsync()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Services\UserService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IUserService"/>.
 9    /// </summary>
 10    public class UserService : IUserService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UserService"/> class.
 14        /// </summary>
 15        /// <param name="userManager">The instance of <see cref="UserManager{User}"/> to use.</param>
 16        /// <param name="roleService">The instance of <see cref="IRoleService"/> to use.</param>
 17        /// <param name="mapper">The instance of <see cref="IMapper"/> to use.</param>
 1318        public UserService(
 1319            UserManager<User> userManager,
 1320            IRoleService roleService,
 1321            IMapper mapper)
 1322        {
 1323            this.UserManager = userManager;
 1324            this.RoleService = roleService;
 1325            this.Mapper = mapper;
 1326        }
 27
 28        /// <summary>
 29        /// Gets the instance of <see cref="UserManager{User}"/> to use.
 30        /// </summary>
 031        private UserManager<User> UserManager { get; }
 32
 33        /// <summary>
 34        /// Gets the instance of <see cref="IRoleService"/> to use.
 35        /// </summary>
 036        private IRoleService RoleService { get; }
 37
 38        /// <summary>
 39        /// Gets the instance of <see cref="IMapper"/> to use.
 40        /// </summary>
 041        private IMapper Mapper { get; }
 42
 43        /// <inheritdoc/>
 44        public async Task<RequestResponse> CreateUserAsync(CreateUserCommand command)
 045        {
 046            var existUser = this.UserManager.Users.SingleOrDefault(u => u.UserName == command.Email && u.IsActive == tru
 047            if (existUser != null)
 048            {
 049                throw new Exception("The user with the unique identifier already exists");
 50            }
 51
 052            var newUser = new User
 053            {
 054                UserName = command.FirstName + "@" + command.LastName,
 055                Email = command.Email,
 056                FirstName = command.FirstName,
 057                LastName = command.LastName,
 058                IsActive = true,
 059            };
 60
 061            var result = await this.UserManager.CreateAsync(newUser);
 062            if (command.Role.Length > 0)
 063            {
 064                await this.UserManager.AddToRoleAsync(newUser, command.Role);
 065            }
 66
 067            var user = await this.UserManager.FindByEmailAsync(command.Email);
 068            return RequestResponse.Success(user.Id);
 069        }
 70
 71        /// <inheritdoc/>
 72        public async Task<RequestResponse> DeleteUserAsync(int userId)
 073        {
 074            var user = this.UserManager.Users.SingleOrDefault(u => u.Id == userId && u.IsActive == true);
 075            if (user == null)
 076            {
 077                throw new Exception("The user doesn't exist");
 78            }
 79
 080            user.IsActive = false;
 81
 082            var result = await this.UserManager.UpdateAsync(user);
 083            return RequestResponse.Success(user.Id);
 084        }
 85
 86        /// <inheritdoc/>
 87        public async Task<User> FindUserByEmailAsync(string email)
 088        {
 089            var result = await this.UserManager.FindByEmailAsync(email);
 090            return result;
 091        }
 92
 93        /// <inheritdoc/>
 94        public async Task<User> FindUserByIdAsync(int userId)
 095        {
 096            var result = await this.UserManager.FindByIdAsync(userId.ToString());
 097            return result;
 098        }
 99
 100        /// <inheritdoc/>
 101        public UserResponse GetUserById(GetUserByIdQuery query)
 0102        {
 0103            var user = this.UserManager.Users
 0104                .TagWith(nameof(this.GetUserById))
 0105                .Where(x => x.Id == query.Id && x.IsActive == true)
 0106                .ProjectTo<UserResponse>(this.Mapper.ConfigurationProvider)
 0107                .FirstOrDefault();
 0108            return user;
 0109        }
 110
 111        /// <inheritdoc/>
 112        public UserResponse GetUserByEmail(GetUserByEmailQuery query)
 0113        {
 0114            var user = this.UserManager.Users
 0115                .TagWith(nameof(this.GetUserByEmail))
 0116                .Where(x => x.Email == query.Email && x.IsActive == true)
 0117                .ProjectTo<UserResponse>(this.Mapper.ConfigurationProvider)
 0118                .FirstOrDefault();
 0119            return user;
 0120        }
 121
 122        /// <inheritdoc/>
 123        public async Task<List<string>> GetUserRoleAsync(User user)
 0124        {
 0125            var userRoles = await this.UserManager.GetRolesAsync(user);
 0126            return userRoles.ToList();
 0127        }
 128
 129        /// <inheritdoc/>
 130        public async Task<RequestResponse> UpdateUserAsync(UpdateUserCommand command)
 0131        {
 0132            var existUser = this.UserManager.Users.SingleOrDefault(u => u.Id == command.Id && u.IsActive == true);
 0133            if (existUser == null)
 0134            {
 0135                throw new Exception("The user does not exists");
 136            }
 137
 0138            existUser.UserName = command.FirstName + "@" + command.LastName;
 0139            existUser.FirstName = command.FirstName;
 0140            existUser.LastName = command.LastName;
 141
 0142            var result = await this.UserManager.UpdateAsync(existUser);
 143
 0144            if (command.Role != null)
 0145            {
 0146                var role = await this.RoleService.FindRoleByNameAsync(command.Role);
 0147                await this.AssignUserToRoleAsync(new AssignUserToRoleCommand { UserId = existUser.Id, RoleId = role.Id }
 0148            }
 149
 0150            return RequestResponse.Success(existUser.Id);
 0151        }
 152
 153        /// <inheritdoc/>
 154        public async Task<RequestResponse> ActivateUserAsync(ActivateUserCommand command)
 0155        {
 0156            var existUser = this.UserManager.Users.SingleOrDefault(u => u.Id == command.Id);
 0157            if (existUser == null)
 0158            {
 0159                throw new Exception("The user does not exists");
 160            }
 161
 0162            existUser.IsActive = true;
 163
 0164            var result = await this.UserManager.UpdateAsync(existUser);
 0165            return RequestResponse.Success(existUser.Id);
 0166        }
 167
 168        /// <inheritdoc/>
 169        public async Task<RequestResponse> UpdateUserEmailAsync(UpdateUserEmailCommand command)
 0170        {
 0171            var existUser = this.UserManager.Users.SingleOrDefault(u => u.Id == command.UserId &&
 0172                u.Email == command.Email && u.IsActive == true);
 0173            if (existUser == null)
 0174            {
 0175                throw new Exception("The user does not exists");
 176            }
 177
 0178            var userWithNewEmail = await this.UserManager.FindByEmailAsync(command.NewEmail);
 0179            if (userWithNewEmail != null)
 0180            {
 0181                throw new Exception("The user with the new email value has found in the database");
 182            }
 183
 0184            existUser.Email = command.NewEmail;
 185
 0186            var result = await this.UserManager.UpdateAsync(existUser);
 0187            return RequestResponse.Success(existUser.Id);
 0188        }
 189
 190        /// <inheritdoc/>
 191        public List<UserResponse> GetUsers(GetUsersQuery query)
 0192        {
 0193            var result = this.UserManager.Users
 0194                .TagWith(nameof(this.GetUsers))
 0195                .Where(u => u.IsActive == true)
 0196                .ProjectTo<UserResponse>(this.Mapper.ConfigurationProvider)
 0197                .ToList();
 0198            return result;
 0199        }
 200
 201        /// <inheritdoc/>
 202        public List<UserResponse> GetUsersInactive(GetUsersInactiveQuery query)
 0203        {
 0204            var result = this.UserManager.Users
 0205                .TagWith(nameof(this.GetUsersInactive))
 0206                .Where(u => u.IsActive == false)
 0207                .ProjectTo<UserResponse>(this.Mapper.ConfigurationProvider)
 0208                .ToList();
 0209            return result;
 0210        }
 211
 212        /// <inheritdoc/>
 213        public async Task<RequestResponse> AssignUserToRoleAsync(AssignUserToRoleCommand command)
 0214        {
 0215            var user = await this.UserManager.FindByIdAsync(command.UserId.ToString());
 0216            var userRole = await this.UserManager.GetRolesAsync(user);
 0217            await this.UserManager.RemoveFromRoleAsync(user, userRole[0]);
 218
 0219            var role = await this.RoleService.FindRoleByIdAsync(command.RoleId);
 0220            await this.UserManager.AddToRoleAsync(user, role.Name);
 221
 0222            return RequestResponse.Success(user.Id);
 0223        }
 224    }
 225}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserTokenConfiguration.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserTokenConfiguration.html deleted file mode 100644 index 2292ad4f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.Infrastructure_UserTokenConfiguration.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - -BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserTokenConfiguration - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserTokenConfiguration
Assembly:BlazorShop.Infrastructure
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserTokenConfiguration.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:0
Coverable lines:6
Total lines:25
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
Configure(...)100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.Infrastructure\Persistence\Configurations\Identity\UserTokenConfiguration.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserTokenConfiguration.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.Infrastructure.Persistence.Configurations.Identity
 6{
 7    /// <summary>
 8    /// The configuration for the entity <see cref="UserToken"/>.
 9    /// </summary>
 10    public class UserTokenConfiguration : IEntityTypeConfiguration<UserToken>
 11    {
 12        /// <summary>
 13        /// A method to configure an entity.
 14        /// </summary>
 15        /// <param name="builder">The builder for configuring the entity metadata.</param>
 16        public void Configure(EntityTypeBuilder<UserToken> builder)
 217        {
 218            builder.ToTable("AppUserTokens");
 19
 220            builder.HasOne(userToken => userToken.User)
 221                .WithMany(user => user.UserTokens)
 222                .HasForeignKey(userToken => userToken.UserId);
 223        }
 24    }
 25}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_AccountsController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_AccountsController.html deleted file mode 100644 index cfa2de53..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_AccountsController.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.AccountsController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.AccountsController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\AccountsController.cs
-
-
-
-
-
-
-
Line coverage
-
-
12%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:35
Coverable lines:40
Total lines:109
Line coverage:12.5%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_Configuration()100%10%
get_EmailService()100%10%
LoginUser()0%20%
RegisterUser()0%20%
ChangePasswordUser()0%20%
ResetPasswordUser()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\AccountsController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AccountsController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Accounts.
 9    /// </summary>
 10    public class AccountsController : ApiBaseController
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="AccountsController"/> class.
 14        /// </summary>
 15        /// <param name="configuration">The instance of the <see cref="IConfiguration"/> to use.</param>
 16        /// <param name="emailService">The instance of the <see cref="IEmailService"/> to use.</param>
 17        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 18        public AccountsController(
 19            IConfiguration configuration,
 20            IEmailService emailService,
 21            IMediator mediator)
 422            : base(mediator)
 423        {
 424            this.Configuration = configuration;
 425            this.EmailService = emailService;
 426        }
 27
 28        /// <summary>
 29        /// Gets the instance of the <see cref="IConfiguration"/> to use.
 30        /// </summary>
 031        private IConfiguration Configuration { get; }
 32
 33        /// <summary>
 34        /// Gets the instance of the <see cref="IEmailService"/> to use.
 35        /// </summary>
 036        private IEmailService EmailService { get; }
 37
 38        /// <summary>
 39        /// Log in the user.
 40        /// </summary>
 41        /// <param name="login">The login command.</param>
 42        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 43        [AllowAnonymous]
 44        [HttpPost("login")]
 45        public async Task<IActionResult> LoginUser([FromForm] LoginCommand login)
 046        {
 047            var result = await this.Mediator.Send(login);
 48
 049            return result.Successful == true
 050                ? this.Ok(result)
 051                : this.BadRequest(result);
 052        }
 53
 54        /// <summary>
 55        /// Register the user.
 56        /// </summary>
 57        /// <param name="register">The register command.</param>
 58        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 59        [AllowAnonymous]
 60        [HttpPost("register")]
 61        public async Task<IActionResult> RegisterUser([FromForm] RegisterCommand register)
 062        {
 063            var result = await this.Mediator.Send(register);
 064            return result.Successful == true
 065                ? this.Ok(result)
 066                : this.BadRequest(result);
 067        }
 68
 69        /// <summary>
 70        /// Changing the password.
 71        /// </summary>
 72        /// <param name="changePassword">The change password command.</param>
 73        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 74        [HttpPut("change-password")]
 75        public async Task<IActionResult> ChangePasswordUser([FromBody] ChangePasswordCommand changePassword)
 076        {
 077            var result = await this.Mediator.Send(changePassword);
 078            return result.Successful == true
 079                ? this.Ok(result)
 080                : this.BadRequest(result);
 081        }
 82
 83        /// <summary>
 84        /// Resetting the user password.
 85        /// </summary>
 86        /// <param name="resetPassword">The reset password command.</param>
 87        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 88        [AllowAnonymous]
 89        [HttpPost("reset-password")]
 90        public async Task<IActionResult> ResetPasswordUser([FromForm] ResetPasswordCommand resetPassword)
 091        {
 092            var emailSettings = new EmailSettings
 093            {
 094                Host = this.Configuration["BusinessEmail:Host"],
 095                Port = int.Parse(this.Configuration["BusinessEmail:Port"]),
 096                Subject = this.Configuration["BusinessEmail:Subject"],
 097                Message = this.Configuration["BusinessEmail:Message"],
 098                Username = this.Configuration["BusinessEmail:Username"],
 099                Password = this.Configuration["BusinessEmail:Password"],
 0100            };
 101
 102            // await _emailService.SendEmail(resetPassword.Email, emailSettings);
 0103            var result = await this.Mediator.Send(resetPassword);
 0104            return result.Successful == true
 0105                ? this.Ok(result)
 0106                : this.BadRequest(result);
 0107        }
 108    }
 109}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ApiBaseController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ApiBaseController.html deleted file mode 100644 index 358fbe06..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ApiBaseController.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.ApiBaseController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.ApiBaseController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\ApiBaseController.cs
-
-
-
-
-
-
-
Line coverage
-
-
100%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:0
Coverable lines:5
Total lines:29
Line coverage:100%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_Mediator()100%1100%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\ApiBaseController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ApiBaseController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for setting the Mediator.
 9    /// </summary>
 10    [ApiController]
 11    [Route("api/[controller]")]
 12    [Authorize]
 13    public abstract class ApiBaseController : ControllerBase
 14    {
 15        /// <summary>
 16        /// Initializes a new instance of the <see cref="ApiBaseController"/> class.
 17        /// </summary>
 18        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 7819        public ApiBaseController(IMediator mediator)
 7820        {
 7821            this.Mediator = mediator;
 7822        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="IMediator"/> to use.
 26        /// </summary>
 127        protected IMediator Mediator { get; }
 28    }
 29}
-
-
-
-
-

Methods/Properties

-.ctor(MediatR.IMediator)
-get_Mediator()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ApiExceptionFilterAttribute.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ApiExceptionFilterAttribute.html deleted file mode 100644 index 7f129ace..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ApiExceptionFilterAttribute.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Filters.ApiExceptionFilterAttribute - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Filters.ApiExceptionFilterAttribute
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Filters\ApiExceptionFilterAttribute.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:59
Coverable lines:59
Total lines:116
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:18
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
get_ExceptionHandlers()100%10%
OnException(...)100%10%
HandleException(...)0%40%
HandleValidationException(...)0%60%
HandleInvalidModelStateException(...)0%40%
HandleUnknownException(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Filters\ApiExceptionFilterAttribute.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ApiExceptionFilterAttribute.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Filters
 6{
 7    /// <summary>
 8    /// An exception model to filter the exception's application.
 9    /// </summary>
 10    public class ApiExceptionFilterAttribute : ExceptionFilterAttribute
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ApiExceptionFilterAttribute"/> class.
 14        /// </summary>
 015        public ApiExceptionFilterAttribute()
 016        {
 017            this.ExceptionHandlers = new Dictionary<Type, Action<ExceptionContext>>
 018            {
 019                { typeof(ValidationException), this.HandleValidationException },
 020            };
 021        }
 22
 23        /// <summary>
 24        /// Gets the instance of the <see cref="IDictionary{Type, ExceptionContext}"/> to use.
 25        /// </summary>
 026        private IDictionary<Type, Action<ExceptionContext>> ExceptionHandlers { get; }
 27
 28        /// <summary>
 29        /// The base method to handle the exception.
 30        /// </summary>
 31        /// <param name="context">The instance of the <see cref="ExceptionContext"/> to use.</param>
 32        public override void OnException(ExceptionContext context)
 033        {
 034            base.OnException(context);
 035            this.HandleException(context);
 036        }
 37
 38        /// <summary>
 39        /// Handling the type of the exception.
 40        /// </summary>
 41        /// <param name="context">The instance of the <see cref="ExceptionContext"/> to use.</param>
 42        private void HandleException(ExceptionContext context)
 043        {
 044            Type type = context.Exception.GetType();
 045            if (this.ExceptionHandlers.ContainsKey(type))
 046            {
 047                this.ExceptionHandlers[type].Invoke(context);
 048                return;
 49            }
 50
 051            if (!context.ModelState.IsValid)
 052            {
 053                this.HandleInvalidModelStateException(context);
 054                return;
 55            }
 56
 057            this.HandleUnknownException(context);
 058        }
 59
 60        /// <summary>
 61        /// Handle the validation exception.
 62        /// </summary>
 63        /// <param name="context">The instance of the <see cref="ExceptionContext"/> to use.</param>
 64        private void HandleValidationException(ExceptionContext context)
 065        {
 066            var exception = (ValidationException)context.Exception;
 067            var response = new RequestResponse
 068            {
 069                Successful = false,
 070                Error = $"Fluent Handlers Validations. {exception.Message}. {exception.InnerException?.Message}",
 071            };
 072            foreach (var item in exception.Errors)
 073            {
 074                foreach (var value in item.Value)
 075                {
 076                    response.Error += $"{value}. ";
 077                }
 078            }
 79
 080            context.Result = new BadRequestObjectResult(response);
 081            context.ExceptionHandled = true;
 082        }
 83
 84        /// <summary>
 85        /// Handle the invalid model state exception.
 86        /// </summary>
 87        /// <param name="context">The instance of the <see cref="ExceptionContext"/> to use.</param>
 88        private void HandleInvalidModelStateException(ExceptionContext context)
 089        {
 090            var response = new RequestResponse
 091            {
 092                Successful = false,
 093                Error = $"Invalid Model State. {context.Exception.Message}. {context.Exception?.InnerException?.Message}
 094            };
 95
 096            context.Result = new BadRequestObjectResult(response);
 097            context.ExceptionHandled = true;
 098        }
 99
 100        /// <summary>
 101        /// Handle the unknown type of exception.
 102        /// </summary>
 103        /// <param name="context">The instance of the <see cref="ExceptionContext"/> to use.</param>
 104        private void HandleUnknownException(ExceptionContext context)
 0105        {
 0106            var response = new RequestResponse
 0107            {
 0108                Successful = false,
 0109                Error = $"An error occurred while processing your request. {context.Exception.Message}. {context.Excepti
 0110            };
 111
 0112            context.Result = new BadRequestObjectResult(response);
 0113            context.ExceptionHandled = true;
 0114        }
 115    }
 116}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_CartsController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_CartsController.html deleted file mode 100644 index b7840dc5..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_CartsController.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.CartsController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.CartsController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\CartsController.cs
-
-
-
-
-
-
-
Line coverage
-
-
20%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:9
Uncovered lines:34
Coverable lines:43
Total lines:120
Line coverage:20.9%
-
-
-
-
-
Branch coverage
-
-
8%
-
- - - - - - - - - - - - - -
Covered branches:1
Total branches:12
Branch coverage:8.3%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateCart()50%2100%
UpdateCart()0%20%
DeleteCart()0%20%
DeleteAllCarts()0%20%
GetCart()0%20%
GetCarts()0%20%
GetCartsCount()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\CartsController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CartsController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Carts.
 9    /// </summary>
 10    [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 11    public class CartsController : ApiBaseController
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="CartsController"/> class.
 15        /// </summary>
 16        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 17        public CartsController(IMediator mediator)
 718            : base(mediator)
 719        {
 720        }
 21
 22        /// <summary>
 23        /// Creating the cart.
 24        /// </summary>
 25        /// <param name="command">The command.</param>
 26        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 27        [HttpPost("cart")]
 28        public async Task<IActionResult> CreateCart([FromBody] CreateCartCommand command)
 129        {
 130            var result = await this.Mediator.Send(command);
 131            return result.Successful == true
 132                ? this.Ok(result)
 133                : this.BadRequest(result);
 134        }
 35
 36        /// <summary>
 37        /// Updating the cart.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [HttpPut("cart")]
 42        public async Task<IActionResult> UpdateCart([FromBody] UpdateCartCommand command)
 043        {
 044            var result = await this.Mediator.Send(command);
 045            return result.Successful == true
 046                ? this.Ok(result)
 047                : this.BadRequest(result);
 048        }
 49
 50        /// <summary>
 51        /// Deleting the cart.
 52        /// </summary>
 53        /// <param name="id">The id of the cart.</param>
 54        /// <param name="userId">The id of the user.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        [HttpDelete("cart/{id}/{userId}")]
 57        public async Task<IActionResult> DeleteCart(int id, int userId)
 058        {
 059            var result = await this.Mediator.Send(new DeleteCartCommand { Id = id, UserId = userId });
 060            return result.Successful == true
 061                ? this.Ok(result)
 062                : this.BadRequest(result);
 063        }
 64
 65        /// <summary>
 66        /// Deleting all the user carts.
 67        /// </summary>
 68        /// <param name="userId">The id of the user.</param>
 69        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 70        [HttpDelete("carts/{userId}")]
 71        public async Task<IActionResult> DeleteAllCarts(int userId)
 072        {
 073            var result = await this.Mediator.Send(new DeleteAllCartsCommand { UserId = userId });
 074            return result.Successful == true
 075                ? this.Ok(result)
 076                : this.BadRequest(result);
 077        }
 78
 79        /// <summary>
 80        /// Get a cart.
 81        /// </summary>
 82        /// <param name="id">The id of the cart.</param>
 83        /// <param name="userId">The id of the user.</param>
 84        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 85        [HttpGet("cart/{id}/{userId}")]
 86        public async Task<IActionResult> GetCart(int id, int userId)
 087        {
 088            var result = await this.Mediator.Send(new GetCartByIdQuery { Id = id, UserId = userId });
 089            return result.Successful == true
 090                ? this.Ok(result)
 091                : this.BadRequest(result);
 092        }
 93
 94        /// <summary>
 95        /// Get the user carts.
 96        /// </summary>
 97        /// <param name="userId">The id of the user.</param>
 98        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 99        [HttpGet("carts/{userId}")]
 100        public async Task<IActionResult> GetCarts(int userId)
 0101        {
 0102            var result = await this.Mediator.Send(new GetCartsQuery { UserId = userId });
 0103            return result.Successful == true
 0104                ? this.Ok(result)
 0105                : this.BadRequest(result);
 0106        }
 107
 108        /// <summary>
 109        /// Get the carts number.
 110        /// </summary>
 111        /// <param name="userId">The id of the user.</param>
 112        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 113        [HttpGet("count/{userId}")]
 114        public async Task<IActionResult> GetCartsCount(int userId)
 0115        {
 0116            var result = await this.Mediator.Send(new GetCartsCountQuery { UserId = userId });
 0117            return this.Ok(result);
 0118        }
 119    }
 120}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ClothesController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ClothesController.html deleted file mode 100644 index ef9fbc0b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ClothesController.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.ClothesController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.ClothesController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\ClothesController.cs
-
-
-
-
-
-
-
Line coverage
-
-
9%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:30
Coverable lines:33
Total lines:96
Line coverage:9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateClothe()0%20%
UpdateClothe()0%20%
DeleteClothe()0%20%
GetClothe()0%20%
GetClothes()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\ClothesController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ClothesController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Clothes.
 9    /// </summary>
 10    public class ClothesController : ApiBaseController
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ClothesController"/> class.
 14        /// </summary>
 15        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 16        public ClothesController(IMediator mediator)
 517            : base(mediator)
 518        {
 519        }
 20
 21        /// <summary>
 22        /// Create the clothe.
 23        /// </summary>
 24        /// <param name="command">The command.</param>
 25        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 26        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 27        [HttpPost("clothe")]
 28        public async Task<IActionResult> CreateClothe([FromBody] CreateClotheCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update the clothe.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 42        [HttpPut("clothe")]
 43        public async Task<IActionResult> UpdateClothe([FromBody] UpdateClotheCommand command)
 044        {
 045            var result = await this.Mediator.Send(command);
 046            return result.Successful == true
 047                ? this.Ok(result)
 048                : this.BadRequest(result);
 049        }
 50
 51        /// <summary>
 52        /// Delete the clothe.
 53        /// </summary>
 54        /// <param name="id">The id of the clothe.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 57        [HttpDelete("clothe/{id}")]
 58        public async Task<IActionResult> DeleteClothe(int id)
 059        {
 060            var result = await this.Mediator.Send(new DeleteClotheCommand { Id = id });
 061            return result.Successful == true
 062                ? this.Ok(result)
 063                : this.BadRequest(result);
 064        }
 65
 66        /// <summary>
 67        /// Get the clothe.
 68        /// </summary>
 69        /// <param name="id">The id of the clothe.</param>
 70        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 71        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 72        [HttpGet("clothe/{id}")]
 73        public async Task<IActionResult> GetClothe(int id)
 074        {
 075            var result = await this.Mediator.Send(new GetClotheByIdQuery { Id = id });
 076            return result.Successful == true
 077                ? this.Ok(result)
 078                : this.BadRequest(result);
 079        }
 80
 81        /// <summary>
 82        /// Get the clothes.
 83        /// </summary>
 84        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 85        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 86        [HttpGet("clothes")]
 87        [AllowAnonymous]
 88        public async Task<IActionResult> GetClothes()
 089        {
 090            var result = await this.Mediator.Send(new GetClothesQuery { });
 091            return result.Successful == true
 092                ? this.Ok(result)
 093                : this.BadRequest(result);
 094        }
 95    }
 96}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_HomeController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_HomeController.html deleted file mode 100644 index 08481ee6..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_HomeController.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.HomeController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.HomeController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\HomeController.cs
-
-
-
-
-
-
-
Line coverage
-
-
22%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:4
Uncovered lines:14
Coverable lines:18
Total lines:63
Line coverage:22.2%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_WebHostEnvironment()100%10%
Index()100%10%
Home()100%10%
Error()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\HomeController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="HomeController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Home.
 9    /// </summary>
 10    [AllowAnonymous]
 11    public class HomeController : ApiBaseController
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="HomeController"/> class.
 15        /// </summary>
 16        /// <param name="webHostEnvironment">The instance of the <see cref="IWebHostEnvironment"/> to use.</param>
 17        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 18        public HomeController(IWebHostEnvironment webHostEnvironment, IMediator mediator)
 319            : base(mediator)
 320        {
 321            this.WebHostEnvironment = webHostEnvironment;
 322        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="IWebHostEnvironment"/> to use.
 26        /// </summary>
 027        private IWebHostEnvironment WebHostEnvironment { get; }
 28
 29        /// <summary>
 30        /// A test request.
 31        /// </summary>
 32        /// <returns>An empty result.</returns>
 33        [HttpGet("test")]
 34        public IActionResult Index()
 035        {
 036            return this.Ok();
 037        }
 38
 39        /// <summary>
 40        /// Get the home page from server.
 41        /// </summary>
 42        /// <returns>A default html page.</returns>
 43        [HttpGet("home")]
 44        public IActionResult Home()
 045        {
 046            return new PhysicalFileResult(
 047                Path.Combine(this.WebHostEnvironment.ContentRootPath, "Views/Home.html"),
 048                new MediaTypeHeaderValue("text/html").ToString());
 049        }
 50
 51        /// <summary>
 52        /// Get the error page from server.
 53        /// </summary>
 54        /// <returns>A default error page.</returns>
 55        [HttpGet("error")]
 56        public IActionResult Error()
 057        {
 058            return new PhysicalFileResult(
 059                Path.Combine(this.WebHostEnvironment.ContentRootPath, "Views/Error.html"),
 060                new MediaTypeHeaderValue("text/html").ToString());
 061        }
 62    }
 63}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_InvoicesController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_InvoicesController.html deleted file mode 100644 index f827a8c0..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_InvoicesController.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.InvoicesController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.InvoicesController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\InvoicesController.cs
-
-
-
-
-
-
-
Line coverage
-
-
9%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:30
Coverable lines:33
Total lines:91
Line coverage:9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateInvoice()0%20%
UpdateInvoice()0%20%
DeleteInvoice()0%20%
GetInvoice()0%20%
GetInvoices()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\InvoicesController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="InvoicesController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Invoices.
 9    /// </summary>
 10    [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 11    public class InvoicesController : ApiBaseController
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="InvoicesController"/> class.
 15        /// </summary>
 16        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 17        public InvoicesController(IMediator mediator)
 518            : base(mediator)
 519        {
 520        }
 21
 22        /// <summary>
 23        /// Create the invoice.
 24        /// </summary>
 25        /// <param name="command">The command.</param>
 26        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 27        [HttpPost("invoice")]
 28        public async Task<IActionResult> CreateInvoice([FromBody] CreateInvoiceCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update the invoice.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [HttpPut("invoice")]
 42        public async Task<IActionResult> UpdateInvoice([FromBody] UpdateInvoiceCommand command)
 043        {
 044            var result = await this.Mediator.Send(command);
 045            return result.Successful == true
 046                ? this.Ok(result)
 047                : this.BadRequest(result);
 048        }
 49
 50        /// <summary>
 51        /// Delete the invoice.
 52        /// </summary>
 53        /// <param name="id">The id of the invoice.</param>
 54        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 55        [HttpDelete("invoice/{id}")]
 56        public async Task<IActionResult> DeleteInvoice(int id)
 057        {
 058            var result = await this.Mediator.Send(new DeleteInvoiceCommand { Id = id });
 059            return result.Successful == true
 060                ? this.Ok(result)
 061                : this.BadRequest(result);
 062        }
 63
 64        /// <summary>
 65        /// Get the invoice.
 66        /// </summary>
 67        /// <param name="id">The id of the invoice.</param>
 68        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 69        [HttpGet("invoice/{id}")]
 70        public async Task<IActionResult> GetInvoice(int id)
 071        {
 072            var result = await this.Mediator.Send(new GetInvoiceByIdQuery { Id = id });
 073            return result.Successful == true
 074                ? this.Ok(result)
 075                : this.BadRequest(result);
 076        }
 77
 78        /// <summary>
 79        /// Get the invoices.
 80        /// </summary>
 81        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 82        [HttpGet("invoices")]
 83        public async Task<IActionResult> GetInvoices()
 084        {
 085            var result = await this.Mediator.Send(new GetInvoicesQuery { });
 086            return result.Successful == true
 087                ? this.Ok(result)
 088                : this.BadRequest(result);
 089        }
 90    }
 91}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_JwtTokenMiddleware.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_JwtTokenMiddleware.html deleted file mode 100644 index 14f6dbe8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_JwtTokenMiddleware.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Filters.JwtTokenMiddleware - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Filters.JwtTokenMiddleware
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Filters\JwtTokenMiddleware.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:38
Coverable lines:38
Total lines:85
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Next()100%10%
get_Configuration()100%10%
Invoke()0%60%
IsCurrentTokenValid(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Filters\JwtTokenMiddleware.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="JwtTokenMiddleware.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Filters
 6{
 7    /// <summary>
 8    /// A middleware to intercept the JWT token.
 9    /// </summary>
 10    public class JwtTokenMiddleware
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="JwtTokenMiddleware"/> class.
 14        /// </summary>
 15        /// <param name="next">The instance of the <see cref="RequestDelegate"/> to use.</param>
 16        /// <param name="configuration">The instance of the <see cref="IConfiguration"/> to use.</param>
 017        public JwtTokenMiddleware(RequestDelegate next, IConfiguration configuration)
 018        {
 019            this.Next = next;
 020            this.Configuration = configuration;
 021        }
 22
 23        /// <summary>
 24        /// Gets the instance of the <see cref="RequestDelegate"/> to use.
 25        /// </summary>
 026        private RequestDelegate Next { get; }
 27
 28        /// <summary>
 29        /// Gets the instance of the <see cref="IConfiguration"/> to use.
 30        /// </summary>
 031        private IConfiguration Configuration { get; }
 32
 33        /// <summary>
 34        /// The method running every time a request its being made to the server.
 35        /// </summary>
 36        /// <param name="httpContext">The http context.</param>
 37        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 38        public async Task Invoke(HttpContext httpContext)
 039        {
 040            var token = httpContext.Request.Headers["Authorization"].FirstOrDefault()?.Split(" ").Last();
 41
 042            if (token != null && !this.IsCurrentTokenValid(token))
 043            {
 044                httpContext.Request.Headers["Authorization"] = string.Empty;
 045            }
 46
 047            await this.Next(httpContext);
 048        }
 49
 50        /// <summary>
 51        /// Validating the bearer token validity.
 52        /// </summary>
 53        /// <param name="token">The bearer token data.</param>
 54        /// <returns>A boolean value.</returns>
 55        private bool IsCurrentTokenValid(string token)
 056        {
 057            var tokenHandler = new JwtSecurityTokenHandler();
 058            var isTokenValid = true;
 59
 60            try
 061            {
 62                #pragma warning disable SA1117 // Parameters should be on same line or separate lines
 063                tokenHandler.ValidateToken(token, new TokenValidationParameters
 064                {
 065                    ClockSkew = TimeSpan.FromSeconds(1),
 066                    IssuerSigningKey = new SymmetricSecurityKey(Encoding.Unicode.GetBytes(this.Configuration["JwtToken:S
 067                    RequireSignedTokens = true,
 068                    RequireExpirationTime = true,
 069                    ValidateLifetime = true,
 070                    ValidateAudience = true,
 071                    ValidateIssuer = true,
 072                    ValidAudience = this.Configuration["JwtToken:Audience"],
 073                    ValidIssuer = this.Configuration["JwtToken:Issuer"],
 074                }, validatedToken: out SecurityToken validatedToken);
 75                #pragma warning restore SA1117 // Parameters should be on same line or separate lines
 076            }
 077            catch (Exception)
 078            {
 079                isTokenValid = false;
 080            }
 81
 082            return isTokenValid;
 083        }
 84    }
 85}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_MusicsController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_MusicsController.html deleted file mode 100644 index 735f5d01..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_MusicsController.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.MusicsController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.MusicsController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\MusicsController.cs
-
-
-
-
-
-
-
Line coverage
-
-
9%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:30
Coverable lines:33
Total lines:95
Line coverage:9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateMusic()0%20%
UpdateMusic()0%20%
DeleteMusic()0%20%
GetMusic()0%20%
GetMusics()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\MusicsController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="MusicsController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Musics.
 9    /// </summary>
 10    public class MusicsController : ApiBaseController
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="MusicsController"/> class.
 14        /// </summary>
 15        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 16        public MusicsController(IMediator mediator)
 517            : base(mediator)
 518        {
 519        }
 20
 21        /// <summary>
 22        /// Create the music.
 23        /// </summary>
 24        /// <param name="command">The command.</param>
 25        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 26        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 27        [HttpPost("music")]
 28        public async Task<IActionResult> CreateMusic([FromBody] CreateMusicCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update the music.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 42        [HttpPut("music")]
 43        public async Task<IActionResult> UpdateMusic([FromBody] UpdateMusicCommand command)
 044        {
 045            var result = await this.Mediator.Send(command);
 046            return result.Successful == true
 047                ? this.Ok(result)
 048                : this.BadRequest(result);
 049        }
 50
 51        /// <summary>
 52        /// Delete the music.
 53        /// </summary>
 54        /// <param name="id">The id of the music.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 57        [HttpDelete("music/{id}")]
 58        public async Task<IActionResult> DeleteMusic(int id)
 059        {
 060            var result = await this.Mediator.Send(new DeleteMusicCommand { Id = id });
 061            return result.Successful == true
 062                ? this.Ok(result)
 063                : this.BadRequest(result);
 064        }
 65
 66        /// <summary>
 67        /// Get the music.
 68        /// </summary>
 69        /// <param name="id">The id of the music.</param>
 70        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 71        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 72        [HttpGet("music/{id}")]
 73        public async Task<IActionResult> GetMusic(int id)
 074        {
 075            var result = await this.Mediator.Send(new GetMusicByIdQuery { Id = id });
 076            return result.Successful == true
 077                ? this.Ok(result)
 078                : this.BadRequest(result);
 079        }
 80
 81        /// <summary>
 82        /// Get the musics.
 83        /// </summary>
 84        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 85        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 86        [HttpGet("musics")]
 87        public async Task<IActionResult> GetMusics()
 088        {
 089            var result = await this.Mediator.Send(new GetMusicsQuery { });
 090            return result.Successful == true
 091                ? this.Ok(result)
 092                : this.BadRequest(result);
 093        }
 94    }
 95}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_OrdersController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_OrdersController.html deleted file mode 100644 index 5be9f0c2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_OrdersController.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.OrdersController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.OrdersController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\OrdersController.cs
-
-
-
-
-
-
-
Line coverage
-
-
9%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:30
Coverable lines:33
Total lines:97
Line coverage:9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateOrder()0%20%
UpdateOrder()0%20%
DeleteOrder()0%20%
GetOrder()0%20%
GetOrders()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\OrdersController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="OrdersController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Orders.
 9    /// </summary>
 10    public class OrdersController : ApiBaseController
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="OrdersController"/> class.
 14        /// </summary>
 15        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 16        public OrdersController(IMediator mediator)
 517            : base(mediator)
 518        {
 519        }
 20
 21        /// <summary>
 22        /// Create the order.
 23        /// </summary>
 24        /// <param name="command">The command.</param>
 25        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 26        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 27        [HttpPost("order")]
 28        public async Task<IActionResult> CreateOrder([FromBody] CreateOrderCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update the order.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 42        [HttpPut("order")]
 43        public async Task<IActionResult> UpdateOrder([FromBody] UpdateOrderCommand command)
 044        {
 045            var result = await this.Mediator.Send(command);
 046            return result.Successful == true
 047                ? this.Ok(result)
 048                : this.BadRequest(result);
 049        }
 50
 51        /// <summary>
 52        /// Delete the order.
 53        /// </summary>
 54        /// <param name="command">The command.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 57        [HttpDelete("order")]
 58        public async Task<IActionResult> DeleteOrder(DeleteOrderCommand command)
 059        {
 060            var result = await this.Mediator.Send(command);
 061            return result.Successful == true
 062                ? this.Ok(result)
 063                : this.BadRequest(result);
 064        }
 65
 66        /// <summary>
 67        /// Get the order.
 68        /// </summary>
 69        /// <param name="id">The id of the order.</param>
 70        /// <param name="userEmail">The email of the customer.</param>
 71        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 72        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 73        [HttpGet("order/{id}/{userEmail}")]
 74        public async Task<IActionResult> GetOrder(int id, string userEmail)
 075        {
 076            var result = await this.Mediator.Send(new GetOrderByIdQuery { Id = id, UserEmail = userEmail });
 077            return result.Successful == true
 078                ? this.Ok(result)
 079                : this.BadRequest(result);
 080        }
 81
 82        /// <summary>
 83        /// Get the orders.
 84        /// </summary>
 85        /// <param name="userEmail">The email of the customer.</param>
 86        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 87        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 88        [HttpGet("orders/{userEmail}")]
 89        public async Task<IActionResult> GetOrders(string userEmail)
 090        {
 091            var result = await this.Mediator.Send(new GetOrdersQuery { UserEmail = userEmail });
 092            return result.Successful == true
 093                ? this.Ok(result)
 094                : this.BadRequest(result);
 095        }
 96    }
 97}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_PaymentsController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_PaymentsController.html deleted file mode 100644 index e10845f1..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_PaymentsController.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.PaymentsController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.PaymentsController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\PaymentsController.cs
-
-
-
-
-
-
-
Line coverage
-
-
2%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:4
Uncovered lines:173
Coverable lines:177
Total lines:308
Line coverage:2.2%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_Configuration()100%10%
CreateSubscriptionSession()100%10%
CancelSubscriptionSession()100%10%
UpdateSubscriptionSession()100%10%
CreateCheckout(...)100%10%
WebHook()0%60%
CompleteAcceptCheckout()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\PaymentsController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="PaymentsController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Payments.
 9    /// </summary>
 10    [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 11    public class PaymentsController : ApiBaseController
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="PaymentsController"/> class.
 15        /// </summary>
 16        /// <param name="configuration">The instance of the <see cref="IConfiguration"/> to use.</param>
 17        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 18        public PaymentsController(IConfiguration configuration, IMediator mediator)
 519            : base(mediator)
 520        {
 521            this.Configuration = configuration;
 522        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="IConfiguration"/> to use.
 26        /// </summary>
 027        private IConfiguration Configuration { get; }
 28
 29        /// <summary>
 30        /// Create the subscription session.
 31        /// </summary>
 32        /// <param name="req">The req data.</param>
 33        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 34        [HttpPost("create-subscription")]
 35        public async Task<IActionResult> CreateSubscriptionSession([FromBody] CreateSubscriberCommand req)
 036        {
 037            var options = new SessionCreateOptions
 038            {
 039                SuccessUrl = "https://localhost:7066/subscription-success/subscription-made",
 040                CancelUrl = "https://localhost:7066/musics",
 041                PaymentMethodTypes = new List<string>
 042                {
 043                    "card",
 044                },
 045                Mode = "subscription",
 046                LineItems = new List<SessionLineItemOptions>
 047                {
 048                    new SessionLineItemOptions
 049                    {
 050                        Price = req.StripeSubscriptionId,
 051                        Quantity = 1,
 052                    },
 053                },
 054            };
 55
 56            try
 057            {
 058                var service = new SessionService();
 059                var session = await service.CreateAsync(options);
 60
 061                return this.Ok(session.Url);
 62            }
 063            catch (StripeException e)
 064            {
 065                Console.WriteLine(e.StripeError.Message);
 066                return this.BadRequest();
 67            }
 068        }
 69
 70        /// <summary>
 71        /// Cancel the stripe subscription.
 72        /// </summary>
 73        /// <param name="stripeSubscriptionCreationId">The id of the stripe created subscription.</param>
 74        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 75        [HttpDelete("cancel-subscription/{stripeSubscriptionCreationId}")]
 76        public async Task<IActionResult> CancelSubscriptionSession(string stripeSubscriptionCreationId)
 077        {
 78            try
 079            {
 080                var subscriptionService = new SubscriptionService();
 081                subscriptionService.Cancel(stripeSubscriptionCreationId);
 82
 083                await this.Mediator.Send(new UpdateSubscriberStatusCommand
 084                {
 085                    StripeSubscriberSubscriptionId = stripeSubscriptionCreationId,
 086                });
 87
 088                return this.Ok();
 89            }
 090            catch (StripeException e)
 091            {
 092                Console.WriteLine(e.StripeError.Message);
 093                return this.BadRequest();
 94            }
 095        }
 96
 97        /// <summary>
 98        /// Updating the stripe subscription.
 99        /// </summary>
 100        /// <param name="req">The req data.</param>
 101        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 102        [HttpPost("update-subscription")]
 103        public async Task<IActionResult> UpdateSubscriptionSession([FromBody] UpdateSubscriberCommand req)
 0104        {
 0105            var subscriptionService = new SubscriptionService();
 0106            subscriptionService.Cancel(req.StripeSubscriberSubscriptionId);
 107
 0108            await this.Mediator.Send(new UpdateSubscriberStatusCommand
 0109            {
 0110                StripeSubscriberSubscriptionId = req.StripeSubscriberSubscriptionId,
 0111            });
 112
 0113            var options = new SessionCreateOptions
 0114            {
 0115                SuccessUrl = "https://localhost:7066/update-subscription-success/subscription-made",
 0116                CancelUrl = "https://localhost:7066/musics",
 0117                PaymentMethodTypes = new List<string>
 0118                {
 0119                    "card",
 0120                },
 0121                Mode = "subscription",
 0122                LineItems = new List<SessionLineItemOptions>
 0123                {
 0124                    new SessionLineItemOptions
 0125                    {
 0126                        Price = req.StripeSubscriptionId,
 0127                        Quantity = 1,
 0128                    },
 0129                },
 0130            };
 131
 132            try
 0133            {
 0134                var service = new SessionService();
 0135                var session = await service.CreateAsync(options);
 136
 0137                return this.Ok(session.Url);
 138            }
 0139            catch (StripeException e)
 0140            {
 0141                Console.WriteLine(e.StripeError.Message);
 0142                return this.BadRequest();
 143            }
 0144        }
 145
 146        /// <summary>
 147        /// Create the checkout operation.
 148        /// </summary>
 149        /// <param name="cartItems">The cart items.</param>
 150        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 151        [HttpPost("checkout")]
 152        public IActionResult CreateCheckout([FromBody] List<CartResponse> cartItems)
 0153        {
 0154            var lineItems = new List<SessionLineItemOptions>();
 0155            cartItems.ForEach(x => lineItems.Add(
 0156                new SessionLineItemOptions
 0157                {
 0158                    PriceData = new SessionLineItemPriceDataOptions
 0159                    {
 0160                        UnitAmountDecimal = x.Price * 100,
 0161                        Currency = "usd",
 0162                        ProductData = new SessionLineItemPriceDataProductDataOptions
 0163                        {
 0164                            Name = x.Name,
 0165
 0166                            // Images = new List<string> { x.Image }
 0167                        },
 0168                    },
 0169                    Quantity = x.Amount,
 0170                }));
 171
 0172            var options = new SessionCreateOptions
 0173            {
 0174                PaymentMethodTypes = new List<string>
 0175                {
 0176                    "card",
 0177                },
 0178                LineItems = lineItems,
 0179                Mode = "payment",
 0180                SuccessUrl = "https://localhost:7066/order-success/success-made",
 0181                CancelUrl = "https://localhost:7066/carts",
 0182            };
 183
 184            #pragma warning disable CS1587 // XML comment is not placed on a valid language element
 185            /**
 186            * https://localhost:7066/order-success
 187            * SuccessUrl = https://localhost:44351/api/Payments/checkout-response?session_id={CHECKOUT_SESSION_ID}
 188            */
 0189            var service = new SessionService();
 190            #pragma warning restore CS1587 // XML comment is not placed on a valid language element
 191
 0192            Session session = service.Create(options);
 0193            return this.Ok(session.Url);
 0194        }
 195
 196        /// <summary>
 197        /// Activate the background webhook.
 198        /// </summary>
 199        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 200        [AllowAnonymous]
 201        [HttpPost("webhook")]
 202        public async Task<IActionResult> WebHook()
 0203        {
 0204            var json = await new StreamReader(this.HttpContext.Request.Body).ReadToEndAsync();
 205
 206            try
 0207            {
 0208                var stripeEvent = EventUtility.ConstructEvent(
 0209                    json,
 0210                    this.Request.Headers["Stripe-Signature"],
 0211                    this.Configuration["StripeSettings:WebHookKey"]);
 212
 213                // Handle the event
 0214                switch (stripeEvent.Type)
 215                {
 216                    case Events.CheckoutSessionCompleted:
 0217                        await this.CompleteAcceptCheckout(stripeEvent);
 0218                        break;
 219                    case Events.CustomerSubscriptionCreated:
 0220                        var subscription = stripeEvent.Data.Object as Subscription;
 0221                        var service = new InvoiceService();
 0222                        var invoiceData = service.Get(subscription.LatestInvoiceId);
 223
 0224                        await this.Mediator.Send(new UpdateCreatedSubscriberCommand
 0225                        {
 0226                            CurrentPeriodEnd = subscription.CurrentPeriodEnd,
 0227                            CurrentPeriodStart = subscription.CurrentPeriodStart,
 0228                            CustomerEmail = invoiceData.CustomerEmail,
 0229                            StripeSubscriberSubscriptionId = subscription.Id,
 0230                            HostedInvoiceUrl = invoiceData.HostedInvoiceUrl,
 0231                        });
 0232                        break;
 233
 234                    /*
 235                    case Events.CustomerSubscriptionUpdated:
 236                        var subscriptionUpdate = stripeEvent.Data.Object as Subscription;
 237                        var serviceUpdate = new InvoiceService();
 238                        var invoiceDataUpdate = serviceUpdate.Get(subscriptionUpdate.LatestInvoiceId);
 239
 240                        await this.Mediator.Send(new UpdateCreatedSubscriberCommand
 241                        {
 242                            CurrentPeriodEnd = subscriptionUpdate.CurrentPeriodEnd,
 243                            CurrentPeriodStart = subscriptionUpdate.CurrentPeriodStart,
 244                            CustomerEmail = invoiceDataUpdate.CustomerEmail,
 245                            StripeSubscriberSubscriptionId = subscriptionUpdate.Id,
 246                            HostedInvoiceUrl = invoiceDataUpdate.HostedInvoiceUrl,
 247                        });
 248                        break;
 249                    */
 250                    default:
 0251                        break;
 252                }
 253
 0254                return this.Ok();
 255            }
 0256            catch (StripeException e)
 0257            {
 0258                Console.WriteLine(e.StripeError.Message);
 0259                return this.BadRequest();
 260            }
 0261        }
 262
 263        /// <summary>
 264        /// Complet the checkout.
 265        /// </summary>
 266        /// <param name="stripeEvent">The stripe event.</param>
 267        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 268        private async Task CompleteAcceptCheckout(Event stripeEvent)
 0269        {
 0270            var sessionData = stripeEvent.Data.Object as Session;
 0271            var service = new PaymentIntentService();
 0272            var result = service.Get(sessionData.PaymentIntentId);
 273
 0274            var sessionService = new SessionService();
 0275            StripeList<LineItem> lineItems = sessionService.ListLineItems(sessionData.Id);
 276
 0277            List<InvoiceResponse> items = new ();
 0278            foreach (var item in lineItems.Data)
 0279            {
 0280                var invoice = new InvoiceResponse
 0281                {
 0282                    Name = item.Description,
 0283                    AmountSubTotal = Convert.ToInt32(item.AmountSubtotal) / 100,
 0284                    AmountTotal = Convert.ToInt32(item.AmountTotal) / 100,
 0285                    Quantity = Convert.ToInt32(item.Quantity),
 0286                };
 0287                items.Add(invoice);
 0288            }
 289
 0290            var orderCommand = new CreateOrderCommand
 0291            {
 0292                UserEmail = sessionData.CustomerDetails.Email,
 0293                OrderDate = DateTime.Now,
 0294                LineItems = JsonSerializer.Serialize(items),
 0295                AmountTotal = Convert.ToInt32(sessionData.AmountTotal) / 100,
 0296            };
 297
 0298            await this.Mediator.Send(orderCommand);
 0299            await this.Mediator.Send(new CreateReceiptCommand
 0300            {
 0301                UserEmail = sessionData.CustomerDetails.Email,
 0302                ReceiptDate = DateTime.Now,
 0303                ReceiptName = "Receipt Nr. " + Guid.NewGuid(),
 0304                ReceiptUrl = result.Charges.Data.FirstOrDefault().ReceiptUrl,
 0305            });
 0306        }
 307    }
 308}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_Program.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_Program.html deleted file mode 100644 index f13dc095..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_Program.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - -Program - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:Program
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Program.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:138
Coverable lines:138
Total lines:172
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
<Main>$()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Program.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Program.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5// The configurations for the Core Web API.
 6try
 07{
 08    var builder = WebApplication.CreateBuilder(args);
 9
 010    builder.Host.UseSerilog((ctx, lc) => lc
 011        .WriteTo.File(builder.Configuration["Serilog:Json:Path"], LogEventLevel.Warning));
 12
 013    builder.Services.AddCors(options =>
 014    {
 015        options.AddPolicy("EnableCORS", builder =>
 016        {
 017            builder.AllowAnyOrigin()
 018                .AllowAnyHeader()
 019                .AllowAnyMethod();
 020        });
 021    });
 22
 23    // Inject Architecture Layers
 024    builder.Services.AddApplicationLayer();
 025    builder.Services.AddInfrastructureLayer(builder.Configuration);
 26
 027    builder.Services.AddHttpContextAccessor();
 28
 029    builder.Services.AddControllers(options =>
 030        options.Filters.Add<ApiExceptionFilterAttribute>())
 031            .AddFluentValidation(x => x.AutomaticValidationEnabled = false);
 32
 33    // Add JWT TOKEN Settings
 034    builder.Services.AddAuthentication(opt =>
 035        {
 036            opt.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
 037            opt.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
 038        })
 039        .AddJwtBearer(options =>
 040        {
 041            options.Audience = builder.Configuration["JwtToken:Audience"];
 042            options.RequireHttpsMetadata = true;
 043            options.SaveToken = true;
 044
 045            options.TokenValidationParameters = new TokenValidationParameters
 046            {
 047                ClockSkew = TimeSpan.FromSeconds(1),
 048                IssuerSigningKey = new SymmetricSecurityKey(Encoding.Unicode.GetBytes(builder.Configuration["JwtToken:Se
 049                RequireSignedTokens = true,
 050                RequireExpirationTime = true,
 051                ValidateLifetime = true,
 052                ValidateAudience = true,
 053                ValidateIssuer = true,
 054                ValidAudience = builder.Configuration["JwtToken:Audience"],
 055                ValidIssuer = builder.Configuration["JwtToken:Issuer"],
 056            };
 057        });
 58
 59    // Stripe Configuration - Secret Key
 060    StripeConfiguration.ApiKey = builder.Configuration["StripeSettings:SecretKey"];
 61
 062    var app = builder.Build();
 63
 064    using (var scope = app.Services.CreateScope())
 065    {
 66        try
 067        {
 068            var services = scope.ServiceProvider;
 069            var context = services.GetRequiredService<ApplicationDbContext>();
 070            if (context.Database.IsSqlServer())
 071            {
 072                context.Database.Migrate();
 073            }
 74
 075            var userManager = services.GetRequiredService<UserManager<User>>();
 076            var roleManager = services.GetRequiredService<RoleManager<Role>>();
 77
 078            var rolesSeed = new RolesSeedModel
 079            {
 080                AdminRoleName = builder.Configuration["RolesSeedModel:AdminRoleName"],
 081                AdminRoleNormalizedName = builder.Configuration["RolesSeedModel:AdminRoleNormalizedName"],
 082                UserRoleName = builder.Configuration["RolesSeedModel:UserRoleName"],
 083                UserRoleNormalizedName = builder.Configuration["RolesSeedModel:UserRoleNormalizedName"],
 084                DefaultRoleName = builder.Configuration["RolesSeedModel:DefaultRoleName"],
 085                DefaultRoleNormalizedName = builder.Configuration["RolesSeedModel:DefaultRoleNormalizedName"],
 086            };
 087            var adminSeed = new AdminSeedModel
 088            {
 089                FirstName = builder.Configuration["AdminSeedModel:FirstName"],
 090                LastName = builder.Configuration["AdminSeedModel:LastName"],
 091                Email = builder.Configuration["AdminSeedModel:Email"],
 092                Password = builder.Configuration["AdminSeedModel:Password"],
 093                RoleName = builder.Configuration["AdminSeedModel:RoleName"],
 094            };
 95
 096            await ApplicationDbContextSeed.SeedRolesAsync(roleManager, rolesSeed);
 097            await ApplicationDbContextSeed.SeedAdminUserAsync(userManager, roleManager, adminSeed);
 098            await ApplicationDbContextSeed.SeedClothesDataAsync(context);
 099            await ApplicationDbContextSeed.SeedMusicsDataAsync(context);
 0100            await ApplicationDbContextSeed.SeedSubscriptionsDataAsync(context);
 0101            await ApplicationDbContextSeed.SeedTodosDataAsync(context);
 0102        }
 0103        catch (Exception ex)
 0104        {
 0105            Log.Logger.Error(ex, "An error occurred while migrating or seeding the database.");
 0106            throw;
 107        }
 0108    }
 109
 0110    if (app.Environment.IsDevelopment())
 0111    {
 0112        app.UseDeveloperExceptionPage();
 0113        app.UseMigrationsEndPoint();
 0114    }
 115    else
 0116    {
 0117        app.UseExceptionHandler("/Error");
 0118        app.UseHsts();
 0119    }
 120
 0121    app.UseCors("EnableCORS");
 0122    app.UseHttpsRedirection();
 0123    app.UseStaticFiles();
 0124    app.UseRouting();
 125
 0126    app.UseMiddleware<JwtTokenMiddleware>();
 127
 0128    app.UseSerilogRequestLogging();
 129
 0130    app.UseAuthentication();
 0131    app.UseAuthorization();
 132
 133    // Security Headers for Website
 0134    app.Use(async (context, next) =>
 0135    {
 0136        context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN");
 0137        context.Response.Headers.Add("X-Content-Type-Options", "nosniff");
 0138        context.Response.Headers.Add("Referrer-Policy", "same-origin");
 0139        context.Response.Headers.Add("Permissions-Policy", "geolocation=(), camera=()");
 0140        #pragma warning disable SA1118 // Parameter should not span multiple lines
 0141        context.Response.Headers.Add(builder.Configuration["ContentPolicy"], "default-src "
 0142            + "self  "
 0143            + "https://maxcdn.bootstrapcdn.com  "
 0144            + "https://login.microsoftonline.com "
 0145            + "https://sshmantest.azurewebsites.net "
 0146            + "https://code.jquery.com https://dc.services.visualstudio.com "
 0147            + " 'unsafe-inline' 'unsafe-eval'");
 0148        #pragma warning restore SA1118 // Parameter should not span multiple lines
 0149        context.Response.Headers.Add("SameSite", "Strict");
 0150        context.Response.Headers.Add("X-XSS-Protection", "1; mode=block");
 0151        await next();
 0152    });
 153
 0154    app.UseEndpoints(endpoints =>
 0155    {
 0156        endpoints.MapControllerRoute(
 0157            name: "default",
 0158            pattern: "{controller}/{action=Index}/{id?}");
 0159        endpoints.MapControllers();
 0160    });
 161
 0162    await app.RunAsync();
 0163}
 0164catch (Exception ex)
 0165{
 0166    Log.Fatal(ex, "Unhandled exception");
 0167}
 168finally
 0169{
 0170    Log.Information("Shut down complete");
 0171    Log.CloseAndFlush();
 0172}
-
-
-
-
-

Methods/Properties

-<Main>$()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ReceiptsController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ReceiptsController.html deleted file mode 100644 index 3811fa91..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_ReceiptsController.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.ReceiptsController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.ReceiptsController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\ReceiptsController.cs
-
-
-
-
-
-
-
Line coverage
-
-
9%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:30
Coverable lines:33
Total lines:97
Line coverage:9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateReceipt()0%20%
UpdateReceipt()0%20%
DeleteReceipt()0%20%
GetReceipt()0%20%
GetReceipts()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\ReceiptsController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ReceiptsController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Receipts.
 9    /// </summary>
 10    public class ReceiptsController : ApiBaseController
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ReceiptsController"/> class.
 14        /// </summary>
 15        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 16        public ReceiptsController(IMediator mediator)
 517            : base(mediator)
 518        {
 519        }
 20
 21        /// <summary>
 22        /// Create a receipt.
 23        /// </summary>
 24        /// <param name="command">The command.</param>
 25        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 26        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 27        [HttpPost("receipt")]
 28        public async Task<IActionResult> CreateReceipt([FromBody] CreateReceiptCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update a receipt.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 42        [HttpPut("receipt")]
 43        public async Task<IActionResult> UpdateReceipt([FromBody] UpdateReceiptCommand command)
 044        {
 045            var result = await this.Mediator.Send(command);
 046            return result.Successful == true
 047                ? this.Ok(result)
 048                : this.BadRequest(result);
 049        }
 50
 51        /// <summary>
 52        /// Delete a receipt.
 53        /// </summary>
 54        /// <param name="id">The id of the receipt.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 57        [HttpDelete("receipt/{id}")]
 58        public async Task<IActionResult> DeleteReceipt(int id)
 059        {
 060            var result = await this.Mediator.Send(new DeleteReceiptCommand { Id = id });
 061            return result.Successful == true
 062                ? this.Ok(result)
 063                : this.BadRequest(result);
 064        }
 65
 66        /// <summary>
 67        /// Get a receipt.
 68        /// </summary>
 69        /// <param name="id">The id of the receipt.</param>
 70        /// <param name="userEmail">The email of the user.</param>
 71        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 72        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 73        [HttpGet("receipt/{id}/{userEmail}")]
 74        public async Task<IActionResult> GetReceipt(int id, string userEmail)
 075        {
 076            var result = await this.Mediator.Send(new GetReceiptByIdQuery { Id = id, UserEmail = userEmail });
 077            return result.Successful == true
 078                ? this.Ok(result)
 079                : this.BadRequest(result);
 080        }
 81
 82        /// <summary>
 83        /// Get the receipts.
 84        /// </summary>
 85        /// <param name="userEmail">The email of the user.</param>
 86        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 87        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 88        [HttpGet("receipts/{userEmail}")]
 89        public async Task<IActionResult> GetReceipts(string userEmail)
 090        {
 091            var result = await this.Mediator.Send(new GetReceiptsQuery { UserEmail = userEmail });
 092            return result.Successful == true
 093                ? this.Ok(result)
 094                : this.BadRequest(result);
 095        }
 96    }
 97}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_RolesController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_RolesController.html deleted file mode 100644 index 628fdd24..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_RolesController.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.RolesController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.RolesController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\RolesController.cs
-
-
-
-
-
-
-
Line coverage
-
-
7%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:36
Coverable lines:39
Total lines:104
Line coverage:7.6%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:12
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateRole()0%20%
UpdateRole()0%20%
DeleteRole()0%20%
GetRoleById()0%20%
GetRoles()0%20%
GetRolesForAdmin()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\RolesController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RolesController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Roles.
 9    /// </summary>
 10    [Authorize(Roles = $"{StringRoleResources.Admin}")]
 11    public class RolesController : ApiBaseController
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="RolesController"/> class.
 15        /// </summary>
 16        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 17        public RolesController(IMediator mediator)
 618            : base(mediator)
 619        {
 620        }
 21
 22        /// <summary>
 23        /// Create a role.
 24        /// </summary>
 25        /// <param name="command">The command.</param>
 26        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 27        [HttpPost("role")]
 28        public async Task<IActionResult> CreateRole([FromBody] CreateRoleCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update a role.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [HttpPut("role")]
 42        public async Task<IActionResult> UpdateRole([FromBody] UpdateRoleCommand command)
 043        {
 044            var result = await this.Mediator.Send(command);
 045            return result.Successful == true
 046                ? this.Ok(result)
 047                : this.BadRequest(result);
 048        }
 49
 50        /// <summary>
 51        /// Delete a role.
 52        /// </summary>
 53        /// <param name="id">The id of the role.</param>
 54        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 55        [HttpDelete("role/{id}")]
 56        public async Task<IActionResult> DeleteRole(int id)
 057        {
 058            var result = await this.Mediator.Send(new DeleteRoleCommand { Id = id });
 059            return result.Successful == true
 060                ? this.Ok(result)
 061                : this.BadRequest(result);
 062        }
 63
 64        /// <summary>
 65        /// Get the role.
 66        /// </summary>
 67        /// <param name="id">The id of the role.</param>
 68        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 69        [HttpGet("role/{id}")]
 70        public async Task<IActionResult> GetRoleById(int id)
 071        {
 072            var result = await this.Mediator.Send(new GetRoleByIdQuery { Id = id });
 073            return result.Successful == true
 074                ? this.Ok(result)
 075                : this.BadRequest(result);
 076        }
 77
 78        /// <summary>
 79        /// Get the user roles for a non admin role.
 80        /// </summary>
 81        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 82        [HttpGet("roles")]
 83        public async Task<IActionResult> GetRoles()
 084        {
 085            var result = await this.Mediator.Send(new GetRolesQuery { });
 086            return result.Successful == true
 087                ? this.Ok(result)
 088                : this.BadRequest(result);
 089        }
 90
 91        /// <summary>
 92        /// Get the roles for an admin user.
 93        /// </summary>
 94        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 95        [HttpGet("rolesAdmin")]
 96        public async Task<IActionResult> GetRolesForAdmin()
 097        {
 098            var result = await this.Mediator.Send(new GetRolesForAdminQuery { });
 099            return result.Successful == true
 0100                ? this.Ok(result)
 0101                : this.BadRequest(result);
 0102        }
 103    }
 104}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_SubscribersController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_SubscribersController.html deleted file mode 100644 index 98c16096..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_SubscribersController.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.SubscribersController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.SubscribersController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\SubscribersController.cs
-
-
-
-
-
-
-
Line coverage
-
-
7%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:36
Coverable lines:39
Total lines:110
Line coverage:7.6%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:12
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateSubscriber()0%20%
UpdateSubscriber()0%20%
DeleteSubscriber()0%20%
GetSubscriber()0%20%
GetUserSubscribers()0%20%
GetSubscribers()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\SubscribersController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SubscribersController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Subscribers.
 9    /// </summary>
 10    public class SubscribersController : ApiBaseController
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="SubscribersController"/> class.
 14        /// </summary>
 15        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 16        public SubscribersController(IMediator mediator)
 617            : base(mediator)
 618        {
 619        }
 20
 21        /// <summary>
 22        /// Create a subscriber.
 23        /// </summary>
 24        /// <param name="command">The command.</param>
 25        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 26        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 27        [HttpPost("subscriber")]
 28        public async Task<IActionResult> CreateSubscriber([FromBody] CreateSubscriberCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update a subscriber.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 42        [HttpPut("subscriber")]
 43        public async Task<IActionResult> UpdateSubscriber([FromBody] UpdateSubscriberCommand command)
 044        {
 045            var result = await this.Mediator.Send(command);
 046            return result.Successful == true
 047                ? this.Ok(result)
 048                : this.BadRequest(result);
 049        }
 50
 51        /// <summary>
 52        /// Delete a subscriber.
 53        /// </summary>
 54        /// <param name="id">The id of the subscriber.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 57        [HttpDelete("subscriber/{id}")]
 58        public async Task<IActionResult> DeleteSubscriber(int id)
 059        {
 060            var result = await this.Mediator.Send(new DeleteSubscriberCommand { Id = id });
 061            return result.Successful == true
 062                ? this.Ok(result)
 063                : this.BadRequest(result);
 064        }
 65
 66        /// <summary>
 67        /// Get a subscriber.
 68        /// </summary>
 69        /// <param name="userId">The id of the user.</param>
 70        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 71        [Authorize(Roles = $"{StringRoleResources.User}, {StringRoleResources.Default}")]
 72        [HttpGet("subscriber/{userId}")]
 73        public async Task<IActionResult> GetSubscriber(int userId)
 074        {
 075            var result = await this.Mediator.Send(new GetSubscriberByIdQuery { UserId = userId });
 076            return result.Successful == true
 077                ? this.Ok(result)
 078                : this.BadRequest(result);
 079        }
 80
 81        /// <summary>
 82        /// Get user subscribers.
 83        /// </summary>
 84        /// <param name="userId">The id of the user.</param>
 85        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 86        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 87        [HttpGet("subscribers/{userId}")]
 88        public async Task<IActionResult> GetUserSubscribers(int userId)
 089        {
 090            var result = await this.Mediator.Send(new GetUserSubscribersQuery { UserId = userId });
 091            return result.Successful == true
 092                ? this.Ok(result)
 093                : this.BadRequest(result);
 094        }
 95
 96        /// <summary>
 97        /// Get the subscribers.
 98        /// </summary>
 99        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 100        [Authorize(Roles = "Admin, User, Default")]
 101        [HttpGet("subscribers")]
 102        public async Task<IActionResult> GetSubscribers()
 0103        {
 0104            var result = await this.Mediator.Send(new GetSubscribersQuery { });
 0105            return result.Successful == true
 0106                ? this.Ok(result)
 0107                : this.BadRequest(result);
 0108        }
 109    }
 110}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_SubscriptionsController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_SubscriptionsController.html deleted file mode 100644 index 5aaffb57..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_SubscriptionsController.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.SubscriptionsController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.SubscriptionsController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\SubscriptionsController.cs
-
-
-
-
-
-
-
Line coverage
-
-
9%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:30
Coverable lines:33
Total lines:95
Line coverage:9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateSubscription()0%20%
UpdateSubscription()0%20%
DeleteSubscription()0%20%
GetSubscription()0%20%
GetSubscriptions()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\SubscriptionsController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SubscriptionsController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Subscriptions.
 9    /// </summary>
 10    public class SubscriptionsController : ApiBaseController
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="SubscriptionsController"/> class.
 14        /// </summary>
 15        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 16        public SubscriptionsController(IMediator mediator)
 517            : base(mediator)
 518        {
 519        }
 20
 21        /// <summary>
 22        /// Create a subscription.
 23        /// </summary>
 24        /// <param name="command">The command.</param>
 25        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 26        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 27        [HttpPost("subscription")]
 28        public async Task<IActionResult> CreateSubscription([FromBody] CreateSubscriptionCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update a subscription.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 42        [HttpPut("subscription")]
 43        public async Task<IActionResult> UpdateSubscription([FromBody] UpdateSubscriptionCommand command)
 044        {
 045            var result = await this.Mediator.Send(command);
 046            return result.Successful == true
 047                ? this.Ok(result)
 048                : this.BadRequest(result);
 049        }
 50
 51        /// <summary>
 52        /// Delete a subscription.
 53        /// </summary>
 54        /// <param name="id">The id of the subscription.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 57        [HttpDelete("subscription/{id}")]
 58        public async Task<IActionResult> DeleteSubscription(int id)
 059        {
 060            var result = await this.Mediator.Send(new DeleteSubscriptionCommand { Id = id });
 061            return result.Successful == true
 062                ? this.Ok(result)
 063                : this.BadRequest(result);
 064        }
 65
 66        /// <summary>
 67        /// Get a subscription.
 68        /// </summary>
 69        /// <param name="id">The id of the subscription.</param>
 70        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 71        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 72        [HttpGet("subscription/{id}")]
 73        public async Task<IActionResult> GetSubscription(int id)
 074        {
 075            var result = await this.Mediator.Send(new GetSubscriptionByIdQuery { Id = id });
 076            return result.Successful == true
 077                ? this.Ok(result)
 078                : this.BadRequest(result);
 079        }
 80
 81        /// <summary>
 82        /// Get the subscriptions.
 83        /// </summary>
 84        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 85        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 86        [HttpGet("subscriptions")]
 87        public async Task<IActionResult> GetSubscriptions()
 088        {
 089            var result = await this.Mediator.Send(new GetSubscriptionsQuery { });
 090            return result.Successful == true
 091                ? this.Ok(result)
 092                : this.BadRequest(result);
 093        }
 94    }
 95}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_TodoItemsController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_TodoItemsController.html deleted file mode 100644 index 46cf97fb..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_TodoItemsController.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.TodoItemsController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.TodoItemsController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\TodoItemsController.cs
-
-
-
-
-
-
-
Line coverage
-
-
11%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:24
Coverable lines:27
Total lines:78
Line coverage:11.1%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateTodoItem()0%20%
UpdateTodoItem()0%20%
DeleteTodoItem()0%20%
GetTodoItemById()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\TodoItemsController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoItemsController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for TodoItems.
 9    /// </summary>
 10    [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 11    public class TodoItemsController : ApiBaseController
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="TodoItemsController"/> class.
 15        /// </summary>
 16        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 17        public TodoItemsController(IMediator mediator)
 418            : base(mediator)
 419        {
 420        }
 21
 22        /// <summary>
 23        /// Create the todo item.
 24        /// </summary>
 25        /// <param name="command">The command.</param>
 26        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 27        [HttpPost("item")]
 28        public async Task<IActionResult> CreateTodoItem([FromBody] CreateTodoItemCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update the todo item.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [HttpPut("item")]
 42        public async Task<IActionResult> UpdateTodoItem([FromBody] UpdateTodoItemCommand command)
 043        {
 044            var result = await this.Mediator.Send(command);
 045            return result.Successful == true
 046                ? this.Ok(result)
 047                : this.BadRequest(result);
 048        }
 49
 50        /// <summary>
 51        /// Delete the todo item.
 52        /// </summary>
 53        /// <param name="id">The id.</param>
 54        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 55        [HttpDelete("item/{id}")]
 56        public async Task<IActionResult> DeleteTodoItem(int id)
 057        {
 058            var result = await this.Mediator.Send(new DeleteTodoItemCommand { Id = id });
 059            return result.Successful == true
 060                ? this.Ok(result)
 061                : this.BadRequest(result);
 062        }
 63
 64        /// <summary>
 65        /// Get the todo item.
 66        /// </summary>
 67        /// <param name="id">The id.</param>
 68        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 69        [HttpGet("item/{id}")]
 70        public async Task<IActionResult> GetTodoItemById(int id)
 071        {
 072            var result = await this.Mediator.Send(new GetTodoItemByIdQuery { Id = id });
 073            return result.Successful == true
 074                ? this.Ok(result)
 075                : this.BadRequest(result);
 076        }
 77    }
 78}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_TodoListsController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_TodoListsController.html deleted file mode 100644 index 2c7a28b9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_TodoListsController.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.TodoListsController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.TodoListsController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\TodoListsController.cs
-
-
-
-
-
-
-
Line coverage
-
-
9%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:30
Coverable lines:33
Total lines:91
Line coverage:9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateTodoList()0%20%
UpdateTodoList()0%20%
DeleteTodoList()0%20%
GetTodoListById()0%20%
GetTodoLists()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\TodoListsController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoListsController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for TodoLists.
 9    /// </summary>
 10    [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 11    public class TodoListsController : ApiBaseController
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="TodoListsController"/> class.
 15        /// </summary>
 16        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 17        public TodoListsController(IMediator mediator)
 518            : base(mediator)
 519        {
 520        }
 21
 22        /// <summary>
 23        /// Create the todo list.
 24        /// </summary>
 25        /// <param name="command">The command.</param>
 26        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 27        [HttpPost("list")]
 28        public async Task<IActionResult> CreateTodoList([FromBody] CreateTodoListCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Update the todo list.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [HttpPut("list")]
 42        public async Task<IActionResult> UpdateTodoList([FromBody] UpdateTodoListCommand command)
 043        {
 044            var result = await this.Mediator.Send(command);
 045            return result.Successful == true
 046                ? this.Ok(result)
 047                : this.BadRequest(result);
 048        }
 49
 50        /// <summary>
 51        /// Delete the todo list.
 52        /// </summary>
 53        /// <param name="id">The id.</param>
 54        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 55        [HttpDelete("list/{id}")]
 56        public async Task<IActionResult> DeleteTodoList(int id)
 057        {
 058            var result = await this.Mediator.Send(new DeleteTodoListCommand { Id = id });
 059            return result.Successful == true
 060                ? this.Ok(result)
 061                : this.BadRequest(result);
 062        }
 63
 64        /// <summary>
 65        /// Get the todo list.
 66        /// </summary>
 67        /// <param name="id">The id.</param>
 68        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 69        [HttpGet("list/{id}")]
 70        public async Task<IActionResult> GetTodoListById(int id)
 071        {
 072            var result = await this.Mediator.Send(new GetTodoListByIdQuery { Id = id });
 073            return result.Successful == true
 074                ? this.Ok(result)
 075                : this.BadRequest(result);
 076        }
 77
 78        /// <summary>
 79        /// Get the todo lists.
 80        /// </summary>
 81        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 82        [HttpGet("lists")]
 83        public async Task<IActionResult> GetTodoLists()
 084        {
 085            var result = await this.Mediator.Send(new GetTodoListsQuery { });
 086            return result.Successful == true
 087                ? this.Ok(result)
 088                : this.BadRequest(result);
 089        }
 90    }
 91}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_UsersController.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_UsersController.html deleted file mode 100644 index 5a0f9cb4..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebApi_UsersController.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - -BlazorShop.WebApi.Controllers.UsersController - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebApi.Controllers.UsersController
Assembly:BlazorShop.WebApi
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\UsersController.cs
-
-
-
-
-
-
-
Line coverage
-
-
5%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:3
Uncovered lines:48
Coverable lines:51
Total lines:139
Line coverage:5.8%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:16
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
CreateUser()0%20%
ActivateUser()0%20%
UpdateUser()0%20%
UpdateUserEmail()0%20%
DeleteUser()0%20%
GetUserById()0%20%
GetUsers()0%20%
GetUsersInactive()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebApi\Controllers\UsersController.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UsersController.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebApi.Controllers
 6{
 7    /// <summary>
 8    /// Controller for Users.
 9    /// </summary>
 10    public class UsersController : ApiBaseController
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UsersController"/> class.
 14        /// </summary>
 15        /// <param name="mediator">The instance of the <see cref="IMediator"/> to use.</param>
 16        public UsersController(IMediator mediator)
 817            : base(mediator)
 818        {
 819        }
 20
 21        /// <summary>
 22        /// Create the user.
 23        /// </summary>
 24        /// <param name="command">The command.</param>
 25        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 26        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 27        [HttpPost("user")]
 28        public async Task<IActionResult> CreateUser([FromBody] CreateUserCommand command)
 029        {
 030            var result = await this.Mediator.Send(command);
 031            return result.Successful == true
 032                ? this.Ok(result)
 033                : this.BadRequest(result);
 034        }
 35
 36        /// <summary>
 37        /// Activate the user.
 38        /// </summary>
 39        /// <param name="command">The command.</param>
 40        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 41        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 42        [HttpPost("userActivate")]
 43        public async Task<IActionResult> ActivateUser([FromBody] ActivateUserCommand command)
 044        {
 045            var result = await this.Mediator.Send(command);
 046            return result.Successful == true
 047                ? this.Ok(result)
 048                : this.BadRequest(result);
 049        }
 50
 51        /// <summary>
 52        /// Update the user.
 53        /// </summary>
 54        /// <param name="command">The command.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 57        [HttpPut("user")]
 58        public async Task<IActionResult> UpdateUser([FromBody] UpdateUserCommand command)
 059        {
 060            var result = await this.Mediator.Send(command);
 061            return result.Successful == true
 062                ? this.Ok(result)
 063                : this.BadRequest(result);
 064        }
 65
 66        /// <summary>
 67        /// Update the user email.
 68        /// </summary>
 69        /// <param name="command">The command.</param>
 70        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 71        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 72        [HttpPut("userEmail")]
 73        public async Task<IActionResult> UpdateUserEmail([FromBody] UpdateUserEmailCommand command)
 074        {
 075            var result = await this.Mediator.Send(command);
 076            return result.Successful == true
 077                ? this.Ok(result)
 078                : this.BadRequest(result);
 079        }
 80
 81        /// <summary>
 82        /// Delete the user.
 83        /// </summary>
 84        /// <param name="id">The id of the user.</param>
 85        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 86        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 87        [HttpDelete("user/{id}")]
 88        public async Task<IActionResult> DeleteUser(int id)
 089        {
 090            var result = await this.Mediator.Send(new DeleteUserCommand { Id = id });
 091            return result.Successful == true
 092                ? this.Ok(result)
 093                : this.BadRequest(result);
 094        }
 95
 96        /// <summary>
 97        /// Get user.
 98        /// </summary>
 99        /// <param name="id">The id of the user.</param>
 100        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 101        [Authorize(Roles = $"{StringRoleResources.Admin}, {StringRoleResources.User}, {StringRoleResources.Default}")]
 102        [HttpGet("user/{id}")]
 103        public async Task<IActionResult> GetUserById(int id)
 0104        {
 0105            var result = await this.Mediator.Send(new GetUserByIdQuery { Id = id });
 0106            return result.Successful == true
 0107                ? this.Ok(result)
 0108                : this.BadRequest(result);
 0109        }
 110
 111        /// <summary>
 112        /// Get active users.
 113        /// </summary>
 114        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 115        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 116        [HttpGet("users")]
 117        public async Task<IActionResult> GetUsers()
 0118        {
 0119            var result = await this.Mediator.Send(new GetUsersQuery { });
 0120            return result.Successful == true
 0121                ? this.Ok(result)
 0122                : this.BadRequest(result);
 0123        }
 124
 125        /// <summary>
 126        /// Get inactive users.
 127        /// </summary>
 128        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 129        [Authorize(Roles = $"{StringRoleResources.Admin}")]
 130        [HttpGet("usersInactive")]
 131        public async Task<IActionResult> GetUsersInactive()
 0132        {
 0133            var result = await this.Mediator.Send(new GetUsersInactiveQuery { });
 0134            return result.Successful == true
 0135                ? this.Ok(result)
 0136                : this.BadRequest(result);
 0137        }
 138    }
 139}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AccountService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AccountService.html deleted file mode 100644 index 795887a7..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AccountService.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.AccountService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.AccountService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\AccountService.cs
-
-
-
-
-
-
-
Line coverage
-
-
13%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:37
Coverable lines:43
Total lines:86
Line coverage:13.9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
ChangePassword()0%20%
ResetPassword()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\AccountService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AccountService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IAccountService"/>.
 9    /// </summary>
 10    public class AccountService : IAccountService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="AccountService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 217        public AccountService(HttpClient httpClient, ISnackbar snackBar)
 218        {
 219            this.HttpClient = httpClient;
 220            this.SnackBar = snackBar;
 221            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 222        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<RequestResponse> ChangePassword(ChangePasswordCommand command)
 041        {
 042            var response = await this.HttpClient.PutAsJsonAsync("Accounts/change-password", command);
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<RequestResponse>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51            else
 052            {
 053                this.SnackBar.Add("The password was changed.", Severity.Success);
 054            }
 55
 056            return result;
 057        }
 58
 59        /// <inheritdoc/>
 60        public async Task<RequestResponse> ResetPassword(ResetPasswordCommand command)
 061        {
 062            var data = new FormUrlEncodedContent(new[]
 063            {
 064                new KeyValuePair<string, string>("Email", command.Email),
 065                new KeyValuePair<string, string>("NewPassword", command.NewPassword),
 066                new KeyValuePair<string, string>("NewConfirmPassword", command.NewConfirmPassword),
 067            });
 68
 069            var response = await this.HttpClient.PostAsync("Accounts/reset-password", data);
 070            var responseResult = await response.Content.ReadAsStringAsync();
 071            var result = JsonSerializer.Deserialize<RequestResponse>(
 072                responseResult, this.Options);
 73
 074            if (response.IsSuccessStatusCode == false)
 075            {
 076                this.SnackBar.Add(result.Error, Severity.Error);
 077            }
 78            else
 079            {
 080                this.SnackBar.Add("The password was reset.", Severity.Success);
 081            }
 82
 083            return result;
 084        }
 85    }
 86}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditClothe.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditClothe.html deleted file mode 100644 index 47d8f74d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditClothe.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Clothes.AddEditClothe - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Clothes.AddEditClothe
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Clothes\AddEditClothe.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:32
Coverable lines:32
Total lines:139
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)100%10%
get_Id()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitialized()100%10%
OnParametersSetAsync()0%20%
SaveClothe()0%40%
Cancel()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Clothes\AddEditClothe.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="AddEditClothe.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/clothes/add"
 8@page "/admin/clothes/edit/{Id:int}"
 9
 10@attribute [Authorize(Policy = StringRoleResources.Admin)]
 11
 12@inject IClotheService ClotheService
 13@inject NavigationManager NavManager
 14@inject HttpInterceptorService Interceptor
 15
 016<h1>@Title Clothe</h1>
 17<hr />
 18
 19<EditForm Model="@clothe" OnValidSubmit="SaveClothe">
 20    <FluentValidationValidator />
 21
 22    <div class="mb-3">
 23        <div class="col-md-4">
 24            <MudTextField class="form-control" InputType="InputType.Text"
 25                @bind-Value="clothe.Name" Label="Name"
 26                For="@(() => clothe.Name)"
 27                Variant="Variant.Outlined"></MudTextField>
 28        </div>
 29    </div>
 30    <div class="mb-3">
 31        <div class="col-md-4">
 32            <MudTextField class="form-control" InputType="InputType.Text"
 33                @bind-Value="clothe.Description" Label="Description"
 34                For="@(() => clothe.Description)"
 35                Lines="5"
 36                Variant="Variant.Outlined"></MudTextField>
 37        </div>
 38    </div>
 39    <div class="mb-3">
 40        <div class="col-md-4">
 41            <MudTextField class="form-control" InputType="InputType.Number"
 42                @bind-Value="clothe.Price" Label="Price"
 43                For="@(() => clothe.Price)"
 44                Min="1"
 45                Variant="Variant.Outlined"></MudTextField>
 46        </div>
 47    </div>
 48    <div class="mb-3">
 49        <div class="col-md-4">
 50            <MudTextField class="form-control" InputType="InputType.Number"
 51                @bind-Value="clothe.Amount" Label="Amount"
 52                For="@(() => clothe.Amount)"
 53                Min="1"
 54                Variant="Variant.Outlined"></MudTextField>
 55        </div>
 56    </div>
 57    <div class="mb-3">
 58        <div class="col-md-4">
 59            <MudTextField class="form-control" InputType="InputType.Text"
 60                @bind-Value="clothe.ImageName" Label="ImageName"
 61                For="@(() => clothe.ImageName)"
 62                Variant="Variant.Outlined"></MudTextField>
 63        </div>
 64    </div>
 65    <div class="mb-3">
 66        <div class="col-md-4">
 67            <MudTextField class="form-control" InputType="InputType.Text"
 68                @bind-Value="clothe.ImagePath" Label="ImagePath"
 69                For="@(() => clothe.ImagePath)"
 70                Variant="Variant.Outlined"></MudTextField>
 71        </div>
 72    </div>
 73
 74    <div class="form-group">
 75        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" Color="Color.Primary" ButtonType="Mu
 76            Save
 77        </MudButton>
 78        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel" Color="Color.Error" @onclick="Canc
 79            Cancel
 80        </MudButton>
 81    </div>
 82</EditForm>
 83
 84@code {
 85    [Parameter]
 086    public int Id { get; set; }
 087    protected string Title = "Add";
 088    public ClotheResponse clothe = new();
 89
 090    public void Dispose() => Interceptor.DisposeEvent();
 91
 92    /// <summary>
 93    /// Initialize the component on load.
 94    /// </summary>
 95    protected override void OnInitialized()
 096    {
 097        Interceptor.RegisterEvent();
 098    }
 99
 100    /// <summary>
 101    /// Initialize the component using the parameter.
 102    /// </summary>
 103    protected override async Task OnParametersSetAsync()
 0104    {
 0105        if (Id != 0)
 0106        {
 0107            Title = "Edit";
 0108            clothe = await ClotheService.GetClothe(Id);
 0109        }
 0110    }
 111
 112    /// <summary>
 113    /// Save the clothe.
 114    /// </summary>
 115    protected async Task SaveClothe()
 0116    {
 0117        RequestResponse result = new RequestResponse();
 0118        if (clothe.Id != 0)
 0119        {
 0120            result = await ClotheService.UpdateClothe(clothe);
 0121        }
 122        else
 0123        {
 0124            result = await ClotheService.AddClothe(clothe);
 0125        }
 0126        if (result.Successful)
 0127        {
 0128            Cancel();
 0129        }
 0130    }
 131
 132    /// <summary>
 133    /// Cancel.
 134    /// </summary>
 135    public void Cancel()
 0136    {
 0137        NavManager.NavigateTo("/admin/clothes");
 0138    }
 139}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditMusic.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditMusic.html deleted file mode 100644 index b6c90b04..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditMusic.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Musics.AddEditMusic - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Musics.AddEditMusic
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Musics\AddEditMusic.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:32
Coverable lines:32
Total lines:141
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)100%10%
get_Id()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitialized()100%10%
OnParametersSetAsync()0%20%
SaveMusic()0%40%
Cancel()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Musics\AddEditMusic.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="AddEditMusic.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/musics/add"
 8@page "/admin/musics/edit/{Id:int}"
 9
 10@attribute [Authorize(Policy = StringRoleResources.Admin)]
 11
 12@inject IMusicService MusicService
 13@inject NavigationManager NavManager
 14@inject HttpInterceptorService Interceptor
 15
 016<h1>@Title Music</h1>
 17<hr />
 18
 19<EditForm Model="@music" OnValidSubmit="SaveMusic">
 20    <FluentValidationValidator />
 21
 22    <div class="mb-3">
 23        <div class="col-md-4">
 24            <MudTextField class="form-control" InputType="InputType.Text"
 25                @bind-Value="music.Title" Label="Title"
 26                For="@(() => music.Title)"
 27                Variant="Variant.Outlined"></MudTextField>
 28        </div>
 29    </div>
 30    <div class="mb-3">
 31        <div class="col-md-4">
 32            <MudTextField class="form-control" InputType="InputType.Text"
 33                @bind-Value="music.Description" Label="Description"
 34                For="@(() => music.Description)"
 35                Variant="Variant.Outlined"></MudTextField>
 36        </div>
 37    </div>
 38    <div class="mb-3">
 39        <div class="col-md-4">
 40            <MudTextField class="form-control" InputType="InputType.Text"
 41                @bind-Value="music.Author" Label="Author"
 42                For="@(() => music.Author)"
 43                Variant="Variant.Outlined"></MudTextField>
 44        </div>
 45    </div>
 46    <div class="mb-3">
 47        <div class="col-md-4">
 48            <MatDatePicker @bind-Value="@music.DateRelease" Format="dd/MM/yyyy"></MatDatePicker>
 49        </div>
 50    </div>
 51    <div class="mb-3">
 52        <div class="col-md-4">
 53            <MudTextField class="form-control" InputType="InputType.Text"
 54                @bind-Value="music.ImageName" Label="ImageName"
 55                For="@(() => music.ImageName)"
 56                Variant="Variant.Outlined"></MudTextField>
 57        </div>
 58    </div>
 59    <div class="mb-3">
 60        <div class="col-md-4">
 61            <MudTextField class="form-control" InputType="InputType.Text"
 62                @bind-Value="music.ImagePath" Label="ImagePath"
 63                For="@(() => music.ImagePath)"
 64                Variant="Variant.Outlined"></MudTextField>
 65        </div>
 66    </div>
 67    <div class="mb-3">
 68        <div class="col-md-4">
 69            <MudTextField class="form-control" InputType="InputType.Text"
 70                @bind-Value="music.AccessLevel" Label="AccessLevel"
 71                For="@(() => music.AccessLevel)"
 72                Variant="Variant.Outlined"></MudTextField>
 73        </div>
 74    </div>
 75
 76    <div class="form-group" style="margin-bottom: 25px;">
 77        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" Color="Color.Primary" ButtonType="Mu
 78            Save
 79        </MudButton>
 80        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel" Color="Color.Error" @onclick="Canc
 81            Cancel
 82        </MudButton>
 83    </div>
 84</EditForm>
 85
 86@code {
 87    [Parameter]
 088    public int Id { get; set; }
 089    protected string Title = "Add";
 090    public MusicResponse music = new();
 91
 092    public void Dispose() => Interceptor.DisposeEvent();
 93
 94    /// <summary>
 95    /// Initialize the component on load.
 96    /// </summary>
 97    protected override void OnInitialized()
 098    {
 099        Interceptor.RegisterEvent();
 0100    }
 101
 102    /// <summary>
 103    /// Initialize the component using the parameter.
 104    /// </summary>
 105    protected override async Task OnParametersSetAsync()
 0106    {
 0107        if (Id != 0)
 0108        {
 0109            Title = "Edit";
 0110            music = await MusicService.GetMusic(Id);
 0111        }
 0112    }
 113
 114    /// <summary>
 115    /// Save the music.
 116    /// </summary>
 117    protected async Task SaveMusic()
 0118    {
 0119        RequestResponse result = new RequestResponse();
 0120        if (music.Id != 0)
 0121        {
 0122            result = await MusicService.UpdateMusic(music);
 0123        }
 124        else
 0125        {
 0126            result = await MusicService.AddMusic(music);
 0127        }
 0128        if (result.Successful)
 0129        {
 0130            Cancel();
 0131        }
 0132    }
 133
 134    /// <summary>
 135    /// Cancel.
 136    /// </summary>
 137    public void Cancel()
 0138    {
 0139        NavManager.NavigateTo("/admin/musics");
 0140    }
 141}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditRole.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditRole.html deleted file mode 100644 index 46ada01f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditRole.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Roles.AddEditRole - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Roles.AddEditRole
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Roles\AddEditRole.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:32
Coverable lines:32
Total lines:97
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)100%10%
get_Id()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitialized()100%10%
OnParametersSetAsync()0%20%
SaveRole()0%40%
Cancel()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Roles\AddEditRole.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="AddEditRole.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/roles/add"
 8@page "/admin/roles/edit/{Id:int}"
 9
 10@attribute [Authorize(Policy = StringRoleResources.Admin)]
 11
 12@inject IRoleService RoleService
 13@inject NavigationManager NavManager
 14@inject HttpInterceptorService Interceptor
 15
 016<h1>@Title Role</h1>
 17<hr />
 18
 19<EditForm Model="@Role" OnValidSubmit="SaveRole">
 20    <FluentValidationValidator />
 21
 22    <div class="mb-3">
 23        <div class="col-md-4">
 24            <MudTextField class="form-control" InputType="InputType.Text"
 25                @bind-Value="Role.Name" Label="Name"
 26                For="@(() => Role.Name)"
 27                Variant="Variant.Outlined"></MudTextField>
 28        </div>
 29    </div>
 30
 31    <div class="form-group">
 32        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" Color="Color.Primary" ButtonType="Mu
 33            Save
 34        </MudButton>
 35        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel" Color="Color.Error" @onclick="Canc
 36            Cancel
 37        </MudButton>
 38    </div>
 39</EditForm>
 40
 41@code {
 42    [Parameter]
 043    public int Id { get; set; }
 044    protected string Title = "Add";
 45
 046    public RoleResponse Role = new();
 47
 048    public void Dispose() => Interceptor.DisposeEvent();
 49
 50    /// <summary>
 51    /// Initialize the component on load.
 52    /// </summary>
 53    protected override void OnInitialized()
 054    {
 055        Interceptor.RegisterEvent();
 056    }
 57
 58    /// <summary>
 59    /// Initialize the component using the parameter.
 60    /// </summary>
 61    protected override async Task OnParametersSetAsync()
 062    {
 063        if (Id != 0)
 064        {
 065            Title = "Edit";
 066            Role = await RoleService.GetRole(Id);
 067        }
 068    }
 69
 70    /// <summary>
 71    /// Save the role.
 72    /// </summary>
 73    protected async Task SaveRole()
 074    {
 075        RequestResponse result = new();
 076        if (Role.Id != 0)
 077        {
 078            result = await RoleService.UpdateRole(Role);
 079        }
 80        else
 081        {
 082            result = await RoleService.AddRole(Role);
 083        }
 084        if (result.Successful)
 085        {
 086            Cancel();
 087        }
 088    }
 89
 90    /// <summary>
 91    /// Cancel.
 92    /// </summary>
 93    public void Cancel()
 094    {
 095        NavManager.NavigateTo("/admin/roles");
 096    }
 97}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditSubscription.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditSubscription.html deleted file mode 100644 index e7101c35..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditSubscription.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Subscriptions.AddEditSubscription - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Subscriptions.AddEditSubscription
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Subscriptions\AddEditSubscription.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:32
Coverable lines:32
Total lines:138
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)100%10%
get_Id()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitialized()100%10%
OnParametersSetAsync()0%20%
SaveSubscription()0%40%
Cancel()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Subscriptions\AddEditSubscription.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="AddEditSubscription.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/Subscriptions/add"
 8@page "/admin/Subscriptions/edit/{Id:int}"
 9
 10@attribute [Authorize(Policy = StringRoleResources.Admin)]
 11
 12@inject ISubscriptionService SubscriptionService
 13@inject NavigationManager NavManager
 14@inject HttpInterceptorService Interceptor
 15
 016<h1>@Title Subscription</h1>
 17<hr />
 18
 19<EditForm Model="@Subscription" OnValidSubmit="SaveSubscription">
 20    <FluentValidationValidator />
 21
 22    <div class="mb-3">
 23        <div class="col-md-4">
 24            <MudTextField class="form-control" InputType="InputType.Text"
 25                @bind-Value="Subscription.StripeSubscriptionId" Label="StripeSubscriptionId"
 26                For="@(() => Subscription.StripeSubscriptionId)"
 27                Variant="Variant.Outlined"></MudTextField>
 28        </div>
 29    </div>
 30    <div class="mb-3">
 31        <div class="col-md-4">
 32            <MudTextField class="form-control" InputType="InputType.Text"
 33                @bind-Value="Subscription.Name" Label="Name"
 34                For="@(() => Subscription.Name)"
 35                Variant="Variant.Outlined"></MudTextField>
 36        </div>
 37    </div>
 38    <div class="mb-3">
 39        <div class="col-md-4">
 40            <MudTextField class="form-control" InputType="InputType.Number"
 41                @bind-Value="Subscription.Price" Label="Price"
 42                For="@(() => Subscription.Price)"
 43                Min="1"
 44                Variant="Variant.Outlined"></MudTextField>
 45        </div>
 46    </div>
 47    <div class="mb-3">
 48        <div class="col-md-4">
 49            <MudTextField class="form-control" InputType="InputType.Text"
 50                @bind-Value="Subscription.Options" Label="Options"
 51                For="@(() => Subscription.Options)"
 52                Lines="5"
 53                Variant="Variant.Outlined"></MudTextField>
 54        </div>
 55    </div>
 56    <div class="mb-3">
 57        <div class="col-md-4">
 58            <MudTextField class="form-control" InputType="InputType.Text"
 59                @bind-Value="Subscription.ImageName" Label="ImageName"
 60                For="@(() => Subscription.ImageName)"
 61                Variant="Variant.Outlined"></MudTextField>
 62        </div>
 63    </div>
 64    <div class="mb-3">
 65        <div class="col-md-4">
 66            <MudTextField class="form-control" InputType="InputType.Text"
 67                @bind-Value="Subscription.ImagePath" Label="ImagePath"
 68                For="@(() => Subscription.ImagePath)"
 69                Variant="Variant.Outlined"></MudTextField>
 70        </div>
 71    </div>
 72
 73    <div class="form-group" style="margin-bottom: 25px;">
 74        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" Color="Color.Primary" ButtonType="Mu
 75            Save
 76        </MudButton>
 77        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel" Color="Color.Error" @onclick="Canc
 78            Cancel
 79        </MudButton>
 80    </div>
 81</EditForm>
 82
 83@code {
 84    [Parameter]
 085    public int Id { get; set; }
 086    protected string Title = "Add";
 087    public SubscriptionResponse Subscription = new();
 88
 089    public void Dispose() => Interceptor.DisposeEvent();
 90
 91    /// <summary>
 92    /// Initialize the component on load.
 93    /// </summary>
 94    protected override void OnInitialized()
 095    {
 096        Interceptor.RegisterEvent();
 097    }
 98
 99    /// <summary>
 100    /// Initialize the component using the parameter.
 101    /// </summary>
 102    protected override async Task OnParametersSetAsync()
 0103    {
 0104        if (Id != 0)
 0105        {
 0106            Title = "Edit";
 0107            Subscription = await SubscriptionService.GetSubscription(Id);
 0108        }
 0109    }
 110
 111    /// <summary>
 112    /// Save the subscription.
 113    /// </summary>
 114    protected async Task SaveSubscription()
 0115    {
 0116        RequestResponse result = new();
 0117        if (Subscription.Id != 0)
 0118        {
 0119            result = await SubscriptionService.UpdateSubscription(Subscription);
 0120        }
 121        else
 0122        {
 0123            result = await SubscriptionService.AddSubscription(Subscription);
 0124        }
 0125        if (result.Successful)
 0126        {
 0127            Cancel();
 0128        }
 0129    }
 130
 131    /// <summary>
 132    /// Cancel.
 133    /// </summary>
 134    public void Cancel()
 0135    {
 0136        NavManager.NavigateTo("/admin/subscriptions");
 0137    }
 138}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditUser.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditUser.html deleted file mode 100644 index 98e56b92..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AddEditUser.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Users.AddEditUser - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Users.AddEditUser
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Users\AddEditUser.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:38
Coverable lines:38
Total lines:125
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)100%10%
get_Id()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitializedAsync()100%10%
OnParametersSetAsync()0%20%
SaveUser()0%40%
Cancel()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Users\AddEditUser.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="AddEditUser.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/users/add"
 8@page "/admin/users/edit/{Id:int}"
 9
 10@attribute [Authorize(Policy = StringRoleResources.Admin)]
 11
 12@inject IUserService UserService
 13@inject IRoleService RoleService
 14@inject NavigationManager NavManager
 15@inject HttpInterceptorService Interceptor
 16
 017<h1>@Title User</h1>
 18<hr />
 19
 20<EditForm Model="@User" OnValidSubmit="SaveUser">
 21    <FluentValidationValidator />
 22
 23    <div class="mb-3">
 24        <div class="col-md-4">
 25            <MudTextField InputType="InputType.Text" class="form-control"
 26                For="@(() => User.FirstName)"
 27                @bind-Value="User.FirstName" Label="FirstName" Variant="Variant.Outlined"></MudTextField>
 28        </div>
 29    </div>
 30    <div class="mb-3">
 31        <div class="col-md-4">
 32            <MudTextField InputType="InputType.Text" class="form-control"
 33                For="@(() => User.LastName)"
 34                @bind-Value="User.LastName" Label="LastName" Variant="Variant.Outlined"></MudTextField>
 35        </div>
 36    </div>
 37    <div class="mb-3">
 38        <div class="col-md-4">
 39            <MudTextField InputType="InputType.Email" class="form-control"
 40                For="@(() => User.Email)"
 41                @bind-Value="User.Email" Label="LastName" Variant="Variant.Outlined"></MudTextField>
 42        </div>
 43    </div>
 44    <div class="mb-3">
 45        <div class="col-md-4">
 46            <MudSelect T="string" InputType="InputType.Text" @bind-Value="@User.RoleName"
 47                For="@(() => User.RoleName)"
 48                Placeholder="Select Role Name" Label="Role Name" Variant="Variant.Outlined" AnchorOrigin="Origin.BottomC
 049                    @foreach (var role in roles)
 050                    {
 051                        <MudSelectItem Value="@role.Name">@role.Name</MudSelectItem>
 052                    }
 53            </MudSelect>
 54        </div>
 55    </div>
 56
 57    <div class="form-group">
 58        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" Color="Color.Primary" ButtonType="Mu
 59            Save
 60        </MudButton>
 61        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel" Color="Color.Error" @onclick="Canc
 62            Cancel
 63        </MudButton>
 64    </div>
 65</EditForm>
 66
 67@code {
 68    [Parameter]
 069    public int Id { get; set; }
 070    protected string Title = "Add";
 71
 072    public UserResponse User = new();
 073    protected List<RoleResponse> roles = new();
 74
 075    public void Dispose() => Interceptor.DisposeEvent();
 76
 77    /// <summary>
 78    /// Initialize the component on load.
 79    /// </summary>
 80    protected override async Task OnInitializedAsync()
 081    {
 082        Interceptor.RegisterEvent();
 083        roles = await RoleService.GetRolesForAdmin();
 084    }
 85
 86    /// <summary>
 87    /// Initialize the component using the parameter.
 88    /// </summary>
 89    protected override async Task OnParametersSetAsync()
 090    {
 091        if (Id != 0)
 092        {
 093            Title = "Edit";
 094            User = await UserService.GetUser(Id);
 095        }
 096    }
 97
 98    /// <summary>
 99    /// Save the user.
 100    /// </summary>
 101    protected async Task SaveUser()
 0102    {
 0103        RequestResponse result = new();
 0104        if (User.Id != 0)
 0105        {
 0106            result = await UserService.UpdateUser(User);
 0107        }
 108        else
 0109        {
 0110            result = await UserService.AddUser(User);
 0111        }
 0112        if (result.Successful)
 0113        {
 0114            Cancel();
 0115        }
 0116    }
 117
 118    /// <summary>
 119    /// Cancel the operation.
 120    /// </summary>
 121    public void Cancel()
 0122    {
 0123        NavManager.NavigateTo("/admin/users");
 0124    }
 125}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AdminRoleHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AdminRoleHandler.html deleted file mode 100644 index 1b073226..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AdminRoleHandler.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - -BlazorShop.WebClient.AuthPolicies.AdminRoleHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.AuthPolicies.AdminRoleHandler
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\AdminRoleHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:33
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
HandleRequirementAsync(...)0%80%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\AdminRoleHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AdminRoleHandler.cs" company="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.AuthPolicies
 6{
 7    /// <summary>
 8    /// Handle the requirement of admin role.
 9    /// </summary>
 10    public class AdminRoleHandler : AuthorizationHandler<AdminRoleRequirement>
 11    {
 12        /// <summary>
 13        /// Search for the admin role.
 14        /// </summary>
 15        /// <param name="context">The instance of the <see cref="AuthorizationHandlerContext"/>.</param>
 16        /// <param name="requirement">The instance of the <see cref="UserRoleRequirement"/>.</param>
 17        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 18        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, AdminRoleRequirement require
 019        {
 020            if (context.User.Identity.IsAuthenticated)
 021            {
 022                var userRole = context.User.Claims.FirstOrDefault(c => c.Type == StringRoleResources.RoleClaim && c.Valu
 23
 024                if (userRole != null && userRole.Value.Equals(requirement.Role))
 025                {
 026                    context.Succeed(requirement);
 027                }
 028            }
 29
 030            return Task.CompletedTask;
 031        }
 32    }
 33}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AdminRoleRequirement.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AdminRoleRequirement.html deleted file mode 100644 index 02338dda..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AdminRoleRequirement.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.WebClient.AuthPolicies.AdminRoleRequirement - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.AuthPolicies.AdminRoleRequirement
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\AdminRoleRequirement.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:26
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Role()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\AdminRoleRequirement.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AdminRoleRequirement.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.AuthPolicies
 6{
 7    /// <summary>
 8    /// A custom policy to check for the Admin role.
 9    /// </summary>
 10    public class AdminRoleRequirement : IAuthorizationRequirement
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="AdminRoleRequirement"/> class.
 14        /// </summary>
 15        /// <param name="role">The role name.</param>
 016        public AdminRoleRequirement(string role)
 017        {
 018            this.Role = role;
 019        }
 20
 21        /// <summary>
 22        /// Gets the role name.
 23        /// </summary>
 024        public string Role { get; }
 25    }
 26}
-
-
-
-
-

Methods/Properties

-.ctor(System.String)
-get_Role()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AppState.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AppState.html deleted file mode 100644 index 446860fb..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AppState.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Shared.AppState - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Shared.AppState
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Shared\AppState.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:40
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_ChildContent()100%10%
get_CurrentCount()100%10%
set_CurrentCount(...)100%10%
OnInitialized()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Shared\AppState.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="AppState.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@inject IJSInProcessRuntime JS
 8
 9<CascadingValue Value=this>
 010    @ChildContent
 11</CascadingValue>
 12
 13@code {
 014  [Parameter] public RenderFragment? ChildContent { get; set; }
 15
 16  private int _currentCount;
 17
 18  public int CurrentCount
 19  {
 20    get
 021    {
 022      return _currentCount;
 023    }
 24    set
 025    {
 026      _currentCount = value;
 027      JS.InvokeVoid(JsInteropConstants.SetSessionStorage, nameof(CurrentCount), value);
 028           StateHasChanged();
 029    }
 30  }
 31
 32    /// <summary>
 33  /// Initialize the component on load.
 34  /// </summary>
 35  protected override void OnInitialized()
 036  {
 037    var value = JS.Invoke<string>(JsInteropConstants.GetSessionStorage, nameof(CurrentCount));
 038    int.TryParse(value, out _currentCount);
 039  }
 40}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AuthStateProvider.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AuthStateProvider.html deleted file mode 100644 index e05df989..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AuthStateProvider.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Auth.AuthStateProvider - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Auth.AuthStateProvider
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Auth\AuthStateProvider.cs
-
-
-
-
-
-
-
Line coverage
-
-
20%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:7
Uncovered lines:27
Coverable lines:34
Total lines:90
Line coverage:20.5%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_LocalStorage()100%10%
get_Anonymous()100%10%
get_NavMagager()100%10%
GetAuthenticationStateAsync()0%60%
NotifyUserAuthentication(...)100%10%
NotifyUserLogout()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Auth\AuthStateProvider.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AuthStateProvider.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Auth
 6{
 7    /// <summary>
 8    /// A service to use the authentication state provider.
 9    /// </summary>
 10    public class AuthStateProvider : AuthenticationStateProvider
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="AuthStateProvider"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="localStorage">The instance of the <see cref="ILocalStorageService"/> to use.</param>
 17        /// <param name="navMagager">The instance of the <see cref="NavigationManager"/> to use.</param>
 318        public AuthStateProvider(HttpClient httpClient, ILocalStorageService localStorage, NavigationManager navMagager)
 319        {
 320            this.HttpClient = httpClient;
 321            this.LocalStorage = localStorage;
 322            this.Anonymous = new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity()));
 323            this.NavMagager = navMagager;
 324        }
 25
 26        /// <summary>
 27        /// Gets the instance of the <see cref="HttpClient"/> to use.
 28        /// </summary>
 029        private HttpClient HttpClient { get; }
 30
 31        /// <summary>
 32        /// Gets the instance of the <see cref="ILocalStorageService"/> to use.
 33        /// </summary>
 034        private ILocalStorageService LocalStorage { get; }
 35
 36        /// <summary>
 37        /// Gets the instance of the <see cref="AuthenticationState"/> to use.
 38        /// </summary>
 039        private AuthenticationState Anonymous { get; }
 40
 41        /// <summary>
 42        /// Gets the instance of the <see cref="NavigationManager"/> to use.
 43        /// </summary>
 044        private NavigationManager NavMagager { get; }
 45
 46        /// <summary>
 47        /// Authenticate the user if the user its not authenticated.
 48        /// </summary>
 49        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 50        public override async Task<AuthenticationState> GetAuthenticationStateAsync()
 051        {
 052            var token = await this.LocalStorage.GetItemAsync<string>("authToken");
 53
 54            AuthenticationState? authenticationState;
 055            if (string.IsNullOrWhiteSpace(token) || string.IsNullOrWhiteSpace(this.HttpClient.DefaultRequestHeaders.Auth
 056            {
 057                this.NotifyUserLogout();
 058                authenticationState = this.Anonymous;
 059            }
 60            else
 061            {
 062                this.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.ToSt
 063                authenticationState = new AuthenticationState(
 064                        new ClaimsPrincipal(new ClaimsIdentity(JwtTokenParser.ParseClaimsFromJwt(token), "jwtAuthType"))
 065            }
 66
 067            return authenticationState;
 068        }
 69
 70        /// <summary>
 71        /// Notify the app that the user is authenticated.
 72        /// </summary>
 73        /// <param name="token">The bearer token value.</param>
 74        public void NotifyUserAuthentication(string token)
 075        {
 076            var authenticatedUser = new ClaimsPrincipal(new ClaimsIdentity(JwtTokenParser.ParseClaimsFromJwt(token), "jw
 077            var authState = Task.FromResult(new AuthenticationState(authenticatedUser));
 078            this.NotifyAuthenticationStateChanged(authState);
 079        }
 80
 81        /// <summary>
 82        /// Logout the user and notify the application state.
 83        /// </summary>
 84        public void NotifyUserLogout()
 085        {
 086            var authState = Task.FromResult(this.Anonymous);
 087            this.NotifyAuthenticationStateChanged(authState);
 088        }
 89    }
 90}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AuthenticationService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AuthenticationService.html deleted file mode 100644 index 48ebf5af..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_AuthenticationService.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Auth.AuthenticationService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Auth.AuthenticationService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Auth\AuthenticationService.cs
-
-
-
-
-
-
-
Line coverage
-
-
13%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:11
Uncovered lines:69
Coverable lines:80
Total lines:136
Line coverage:13.7%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_AuthStateProvider()100%10%
get_LocalStorage()100%10%
get_ToastService()100%10%
Login()0%40%
Register()0%40%
Logout()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Auth\AuthenticationService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="AuthenticationService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Auth;
 6
 7/// <summary>
 8/// An implementation of <see cref="IAuthenticationService"/>.
 9/// </summary>
 10public class AuthenticationService : IAuthenticationService
 11{
 12    /// <summary>
 13    /// Initializes a new instance of the <see cref="AuthenticationService"/> class.
 14    /// </summary>
 15    /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16    /// <param name="authStateProvider">The instance of the <see cref="AuthenticationStateProvider"/> to use.</param>
 17    /// <param name="localStorage">The instance of the <see cref="ILocalStorageService"/> to use.</param>
 18    /// <param name="toastService">The instance of the <see cref="IToastService"/> to use.</param>
 319    public AuthenticationService(
 320        HttpClient httpClient,
 321        AuthenticationStateProvider authStateProvider,
 322        ILocalStorageService localStorage,
 323        IToastService toastService)
 324    {
 325        this.HttpClient = httpClient;
 326        this.AuthStateProvider = authStateProvider;
 327        this.LocalStorage = localStorage;
 328        this.ToastService = toastService;
 329    }
 30
 31    /// <summary>
 32    /// Gets the instance of the <see cref="HttpClient"/> to use.
 33    /// </summary>
 034    private HttpClient HttpClient { get; }
 35
 36    /// <summary>
 37    /// Gets the instance of the <see cref="AuthenticationStateProvider"/> to use.
 38    /// </summary>
 039    private AuthenticationStateProvider AuthStateProvider { get; }
 40
 41    /// <summary>
 42    /// Gets the instance of the <see cref="ILocalStorageService"/> to use.
 43    /// </summary>
 044    private ILocalStorageService LocalStorage { get; }
 45
 46    /// <summary>
 47    /// Gets the instance of the <see cref="IToastService"/> to use.
 48    /// </summary>
 049    private IToastService ToastService { get; }
 50
 51    /// <inheritdoc/>
 52    public async Task<JwtTokenResponse> Login(LoginCommand command)
 053    {
 054        var data = new FormUrlEncodedContent(new[]
 055        {
 056            new KeyValuePair<string, string>("Email", command.Email),
 057            new KeyValuePair<string, string>("Password", command.Password),
 058        });
 59
 060        var response = await this.HttpClient.PostAsync("Accounts/login", data);
 061        var responseResult = await response.Content.ReadAsStringAsync();
 62
 063        var result = JsonSerializer.Deserialize<JwtTokenResponse>(
 064            responseResult,
 065            new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
 66
 067        JwtTokenResponse? jwtResponse = null;
 068        if (response.IsSuccessStatusCode == false)
 069        {
 070            this.ToastService.ShowError(result.Error);
 071        }
 072        else if (result.AccessToken == null)
 073        {
 074            this.ToastService.ShowError("Access Token is null");
 075        }
 76        else
 077        {
 078            await this.LocalStorage.SetItemAsync("authToken", result.AccessToken.ToString());
 079            ((AuthStateProvider)this.AuthStateProvider).NotifyUserAuthentication(result.AccessToken.ToString());
 80
 081            this.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(result.Type, result.Acce
 082            jwtResponse = new JwtTokenResponse { AccessToken = result.AccessToken.ToString() };
 083        }
 84
 085        return jwtResponse;
 086    }
 87
 88    /// <inheritdoc/>
 89    public async Task<JwtTokenResponse> Register(RegisterCommand command)
 090    {
 091        var data = new FormUrlEncodedContent(new[]
 092        {
 093            new KeyValuePair<string, string>("Email", command.Email),
 094            new KeyValuePair<string, string>("FirstName", command.FirstName),
 095            new KeyValuePair<string, string>("LastName", command.LastName),
 096            new KeyValuePair<string, string>("RoleName", command.RoleName),
 097            new KeyValuePair<string, string>("Password", command.Password),
 098            new KeyValuePair<string, string>("ConfirmPassword", command.ConfirmPassword),
 099        });
 100
 0101        var response = await this.HttpClient.PostAsync("Accounts/register", data);
 0102        var responseResult = await response.Content.ReadAsStringAsync();
 103
 0104        var result = JsonSerializer.Deserialize<JwtTokenResponse>(
 0105            responseResult,
 0106            new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
 107
 0108        JwtTokenResponse? jwtResponse = null;
 0109        if (response.IsSuccessStatusCode == false)
 0110        {
 0111            this.ToastService.ShowError(result.Error);
 0112        }
 0113        else if (result.AccessToken == null)
 0114        {
 0115            this.ToastService.ShowError("Access Token is null");
 0116        }
 117        else
 0118        {
 0119            await this.LocalStorage.SetItemAsync("authToken", result.AccessToken.ToString());
 0120            ((AuthStateProvider)this.AuthStateProvider).NotifyUserAuthentication(result.AccessToken.ToString());
 121
 0122            this.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(result.Type, result.Acce
 0123            jwtResponse = new JwtTokenResponse { AccessToken = result.AccessToken.ToString() };
 0124        }
 125
 0126        return jwtResponse;
 0127    }
 128
 129    /// <inheritdoc/>
 130    public async Task Logout()
 0131    {
 0132        await this.LocalStorage.RemoveItemAsync("authToken");
 0133        ((AuthStateProvider)this.AuthStateProvider).NotifyUserLogout();
 0134        this.HttpClient.DefaultRequestHeaders.Authorization = null;
 0135    }
 136}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Cart.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Cart.html deleted file mode 100644 index 71b7e6c8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Cart.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Cart.Cart - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Cart.Cart
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Cart\Cart.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:37
Coverable lines:37
Total lines:156
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
<BuildRenderTree()100%10%
<BuildRenderTree()100%10%
get_userId()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitializedAsync()0%20%
DeleteItem()100%10%
UpdateClotheQuantity()100%10%
PlaceOrder()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Cart\Cart.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Cart.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/cart"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject ICartService CartService
 13@inject NavigationManager NavigationManager
 14@inject HttpInterceptorService Interceptor
 15
 16<div class="body-container px-4 px-lg-0">
 17    <div class="container text-white py-5 text-center">
 18        <h1 class="display-4 text-primary">Shopping Cart</h1>
 19    </div>
 20
 021    @if (cartItems == null || cartItems.Count <= 0)
 022    {
 23        <p class="text-center font-weight-bold display-3">You have no items in your cart.</p>
 024    }
 25    else
 026    {
 27        <div class="pb-5">
 28            <div class="container">
 29                <div class="row">
 30                    <div class="col-lg-12 bg-white rounded shadow-sm mb-5">
 31                        <div class="table-responsive p-4">
 32                            <table class="table">
 33                                <thead>
 34                                    <tr>
 35                                        <th scope="col" class="border-0 bg-light">
 36                                            <div class="p-2 px-3 text-uppercase">Product</div>
 37                                        </th>
 38                                        <th scope="col" class="border-0 bg-light">
 39                                            <div class="py-2 text-uppercase">Price</div>
 40                                        </th>
 41                                        <th scope="col" class="border-0 bg-light">
 42                                            <div class="py-2 text-uppercase">Quantity</div>
 43                                        </th>
 44                                        <th scope="col" class="border-0 bg-light">
 45                                            <div class="py-2 text-uppercase">Remove</div>
 46                                        </th>
 47                                    </tr>
 48                                </thead>
 49
 50                                <tbody>
 051                                    @foreach (var item in cartItems)
 052                                    {
 53                                        <tr>
 54                                            <th scope="row" class="border-0">
 55                                                <div class="p-2">
 56                                                    <img src="images/clothes/@item.ClotheImagePath" alt="@item.ClotheIma
 57                                                    <div class="ml-3 d-inline-block align-middle">
 58                                                        <h5 class="mb-0">
 59                                                            <a href="clothes/view/@item.ClotheId" class="text-dark d-inl
 060                                                                @item.ClotheName
 61                                                            </a>
 62                                                        </h5>
 63                                                    </div>
 64                                                </div>
 65                                            </th>
 66                                            <td class="border-0 align-middle">
 067                                                <strong>$ @item.Price</strong>
 68                                            </td>
 69                                            <td class="border-0 align-middle">
 70                                                <EditForm Model="item">
 71                                                    <MudTextField InputType="InputType.Text" class="form-control" style=
 72                                                        @bind-Value="item.Amount" Label="Amount" Variant="Variant.Outlin
 73                                                        Min="1" For="@(() => item.Amount)"
 074                                                        @onclick="@(async () => await UpdateClotheQuantity(item, item.Am
 75                                                </EditForm>
 76                                            </td>
 77                                            <td class="border-0 align-middle">
 78                                                <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.De
 079                                                    Color="Color.Error" @onclick="(async () => { await DeleteItem(item.I
 80                                                    Delete
 81                                                </MudButton>
 82                                            </td>
 83                                        </tr>
 084                                    }
 85                                </tbody>
 86                            </table>
 87                        </div>
 88                        <div class="d-flex flex-row-reverse" style="margin-right: 50px;">
 89                            <p class="font-weight-bold display-6" style="margin-top: -15px;">
 090                                <strong>Total: $ @cartItems.Sum(item => item.Price * item.Amount)</strong>
 91                            </p>
 92                        </div>
 93                    </div>
 94
 95                    <div class="d-flex flex-row-reverse" style="margin-top: -10px;">
 96                        <MudButton class="btn btn-primary btn-lg" Variant="Variant.Filled"
 97                            StartIcon="@Icons.Material.Filled.ShoppingCartCheckout"
 98                            Color="Color.Success" @onclick="PlaceOrder">
 99                            Procceed to checkout
 100                        </MudButton>
 101                    </div>
 102                </div>
 103            </div>
 104        </div>
 0105    }
 106</div>
 107
 108@code {
 0109    private int userId { get; set; }
 0110    List<CartResponse> cartItems = new();
 111
 0112    public void Dispose() => Interceptor.DisposeEvent();
 113
 114    /// <summary>
 115    /// Initialize the component on load.
 116    /// </summary>
 117    protected override async Task OnInitializedAsync()
 0118    {
 0119        Interceptor.RegisterEvent();
 0120        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 0121        var user = authstate.User;
 122
 0123        if (!user.Identity.IsAuthenticated) return;
 0124        userId = int.Parse(user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.UserIdClaim).Value);
 125
 0126        cartItems = await CartService.GetCarts(userId);
 0127    }
 128
 129    /// <summary>
 130    /// Deleting the item.
 131    /// </summary>
 132    private async Task DeleteItem(int id)
 0133    {
 0134        await CartService.DeleteCart(id, userId);
 0135        cartItems = await CartService.GetCarts(userId);
 0136    }
 137
 138    /// <summary>
 139    /// Updating the clothe quantity.
 140    /// </summary>
 141    private async Task UpdateClotheQuantity(CartResponse cart, int newAmount)
 0142    {
 0143        cart.Amount = newAmount;
 0144        await CartService.UpdateCart(cart);
 0145    }
 146
 147    /// <summary>
 148    /// Placing the order.
 149    /// </summary>
 150    private async Task PlaceOrder()
 0151    {
 0152        string checkoutUrl = await CartService.Checkout(userId);
 0153        NavigationManager.NavigateTo(checkoutUrl, forceLoad: true);
 0154        await CartService.EmptyCart(userId);
 0155    }
 156}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CartService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CartService.html deleted file mode 100644 index 19a3fd4d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CartService.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.CartService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.CartService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\CartService.cs
-
-
-
-
-
-
-
Line coverage
-
-
4%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:118
Coverable lines:124
Total lines:201
Line coverage:4.8%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:22
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
AddCart()0%20%
DeleteCart()0%20%
EmptyCart()0%20%
GetCart()0%40%
GetCartCounts()0%20%
GetCarts()0%40%
UpdateCart()0%20%
Checkout()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\CartService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CartService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="ICartService"/>.
 9    /// </summary>
 10    public class CartService : ICartService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CartService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 817        public CartService(HttpClient httpClient, ISnackbar snackBar)
 818        {
 819            this.HttpClient = httpClient;
 820            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 821            this.SnackBar = snackBar;
 822        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<RequestResponse> AddCart(CartResponse cart)
 041        {
 042            var response = await this.HttpClient.PostAsJsonAsync($"Carts/cart", cart);
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<RequestResponse>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51            else
 052            {
 053                this.SnackBar.Add($"The item was added to cart: {cart.Name}", Severity.Success);
 054            }
 55
 056            return result;
 057        }
 58
 59        /// <inheritdoc/>
 60        public async Task<RequestResponse> DeleteCart(int id, int userId)
 061        {
 062            var response = await this.HttpClient.DeleteAsync($"Carts/cart/{id}/{userId}");
 063            var responseResult = await response.Content.ReadAsStringAsync();
 064            var result = JsonSerializer.Deserialize<RequestResponse>(
 065                responseResult, this.Options);
 66
 067            if (response.IsSuccessStatusCode == false)
 068            {
 069                this.SnackBar.Add(result.Error, Severity.Error);
 070            }
 71            else
 072            {
 073                this.SnackBar.Add("The item was deleted from the cart.", Severity.Success);
 074            }
 75
 076            return result;
 077        }
 78
 79        /// <inheritdoc/>
 80        public async Task<RequestResponse> EmptyCart(int userId)
 081        {
 082            var response = await this.HttpClient.DeleteAsync($"Carts/carts/{userId}");
 083            var responseResult = await response.Content.ReadAsStringAsync();
 084            var result = JsonSerializer.Deserialize<RequestResponse>(
 085                responseResult, this.Options);
 86
 087            if (response.IsSuccessStatusCode == false)
 088            {
 089                this.SnackBar.Add(result.Error, Severity.Error);
 090            }
 91            else
 092            {
 093                this.SnackBar.Add("The items from the cart were removed.", Severity.Success);
 094            }
 95
 096            return result;
 097        }
 98
 99        /// <inheritdoc/>
 100        public async Task<CartResponse> GetCart(int id, int userId)
 0101        {
 0102            var response = await this.HttpClient.GetAsync($"Carts/cart/{id}/{userId}");
 0103            var responseResult = await response.Content.ReadAsStringAsync();
 0104            var result = JsonSerializer.Deserialize<Result<CartResponse>>(
 0105                responseResult, this.Options);
 106
 0107            if (response.IsSuccessStatusCode == false)
 0108            {
 0109                this.SnackBar.Add(result.Error, Severity.Error);
 0110            }
 111
 0112            return !response.IsSuccessStatusCode
 0113                ? null
 0114                : result.Item;
 0115        }
 116
 117        /// <inheritdoc/>
 118        public async Task<int> GetCartCounts(int userId)
 0119        {
 0120            var response = await this.HttpClient.GetAsync($"Carts/count/{userId}");
 0121            var responseResult = await response.Content.ReadAsStringAsync();
 122
 0123            var result = 0;
 0124            if (response.IsSuccessStatusCode == false)
 0125            {
 0126                var resultError = JsonSerializer.Deserialize<RequestResponse>(
 0127                    responseResult, this.Options);
 128
 0129                this.SnackBar.Add(resultError.Error, Severity.Error);
 0130            }
 131            else
 0132            {
 0133                result = JsonSerializer.Deserialize<int>(
 0134                    responseResult, this.Options);
 0135            }
 136
 0137            return result;
 0138        }
 139
 140        /// <inheritdoc/>
 141        public async Task<List<CartResponse>> GetCarts(int userId)
 0142        {
 0143            var response = await this.HttpClient.GetAsync($"Carts/carts/{userId}");
 0144            var responseResult = await response.Content.ReadAsStringAsync();
 0145            var result = JsonSerializer.Deserialize<Result<CartResponse>>(
 0146                responseResult, this.Options);
 147
 0148            if (response.IsSuccessStatusCode == false)
 0149            {
 0150                this.SnackBar.Add(result.Error, Severity.Error);
 0151            }
 152
 0153            return !response.IsSuccessStatusCode
 0154                ? null
 0155                : result.Items;
 0156        }
 157
 158        /// <inheritdoc/>
 159        public async Task<RequestResponse> UpdateCart(CartResponse cart)
 0160        {
 0161            var response = await this.HttpClient.PutAsJsonAsync($"Carts/cart", cart);
 0162            var responseResult = await response.Content.ReadAsStringAsync();
 0163            var result = JsonSerializer.Deserialize<RequestResponse>(
 0164                responseResult, this.Options);
 165
 0166            if (response.IsSuccessStatusCode == false)
 0167            {
 0168                this.SnackBar.Add(result.Error, Severity.Error);
 0169            }
 170            else
 0171            {
 0172                this.SnackBar.Add("The cart was updated.", Severity.Success);
 0173            }
 174
 0175            return result;
 0176        }
 177
 178        /// <inheritdoc/>
 179        public async Task<string> Checkout(int userId)
 0180        {
 0181            var carts = await this.GetCarts(userId);
 0182            var response = await this.HttpClient.PostAsJsonAsync("Payments/checkout", carts.ToList());
 0183            var responseResult = await response.Content.ReadAsStringAsync();
 0184            var result = JsonSerializer.Deserialize<RequestResponse>(
 0185                responseResult, this.Options);
 186
 0187            if (response.IsSuccessStatusCode == false)
 0188            {
 0189                this.SnackBar.Add(result.Error, Severity.Error);
 0190            }
 191            else
 0192            {
 0193                this.SnackBar.Add("The checkout operation was successfully made.", Severity.Success);
 0194            }
 195
 0196            return !response.IsSuccessStatusCode
 0197                ? null
 0198                : responseResult;
 0199        }
 200    }
 201}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ClotheDetails.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ClotheDetails.html deleted file mode 100644 index 4c79f5dc..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ClotheDetails.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Clothes.ClotheDetails - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Clothes.ClotheDetails
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Clothes\ClotheDetails.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:35
Coverable lines:35
Total lines:227
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%20%
<BuildRenderTree()100%10%
get_Id()100%10%
get_UserId()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitializedAsync()0%20%
OnParametersSetAsync()0%20%
AddToCart()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Clothes\ClotheDetails.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="ClotheDetails.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/clothes/view/{Id:int}"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject IClotheService ClotheService
 13@inject ICartService CartService
 14@inject HttpInterceptorService Interceptor
 15
 16<h3>View Clothe Details</h3>
 17
 018@if (clothe.Id > 0)
 019{
 20    <div class="container">
 21        <div class="product">
 22            <div class="product-img">
 23                <img src="images/clothes/@clothe.ImagePath" alt="@clothe.ImageName" />
 24            </div>
 25            <div class="product-listing">
 26                <div class="content">
 027                    <h1 class="name">@clothe.Name</h1>
 028                    <p class="description">@clothe.Description</p>
 029                    <p class="price">$ @clothe.Price</p>
 30
 31                    <div class="btn-and-rating-box">
 32                        <a href="clothes" class="btn btn-outline-dark" role="button"> &#8592; Back to Product</a>
 33                        <span style="margin-left: 15px;"></span>
 34                        <button type="button" class="btn btn-sm btn-outline-secondary"
 035                        @onclick="(async () => { await AddToCart(clothe); })">
 36                            Add To Cart &#8594;
 37                        </button>
 38                    </div>
 39                </div>
 40            </div>
 41        </div>
 42    </div>
 043}
 44else
 045{
 46    <div class="d-flex justify-content-center" style="margin-top: 150px;">
 47        <h4 style="font-size: 45px;">No record found</h4>
 48    </div>
 049}
 50
 51@code {
 52    [Parameter]
 053    public int Id { get; set; }
 054    public int UserId { get; set; }
 055    public ClotheResponse clothe = new();
 56
 057    public void Dispose() => Interceptor.DisposeEvent();
 58
 59    /// <summary>
 60    /// Initialize the component on load.
 61    /// </summary>
 62    protected override async Task OnInitializedAsync()
 063    {
 064        Interceptor.RegisterEvent();
 065        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 066        var user = authstate.User;
 67
 068        if (!user.Identity.IsAuthenticated) return;
 069        UserId = int.Parse(user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.UserIdClaim).Value);
 070    }
 71
 72    /// <summary>
 73    /// Initialize the component using the parameter.
 74    /// </summary>
 75    protected override async Task OnParametersSetAsync()
 076    {
 077        if (Id != 0)
 078        {
 079            clothe = await ClotheService.GetClothe(Id);
 080        }
 081    }
 82
 83    /// <summary>
 84    /// Add item to cart.
 85    /// </summary>
 86    private async Task AddToCart(ClotheResponse clothe)
 087    {
 088        CartResponse cartItem = new();
 89
 090        cartItem.Name = clothe.Name;
 091        cartItem.Price = clothe.Price;
 092        cartItem.Amount = 1;
 093        cartItem.ClotheId = clothe.Id;
 094        cartItem.UserId = UserId;
 95
 096        await CartService.AddCart(cartItem);
 097    }
 98}
 99
 100<style>
 101    .container {
 102        width: 100%;
 103        position: relative;
 104        display: flex;
 105        justify-content: center;
 106        align-items: center;
 107        margin-top: 100px;
 108        font-family: "roboto", sans-serif;
 109    }
 110
 111    .product {
 112        position: relative;
 113        width: 1000px;
 114        min-width: 350px;
 115        min-height: 500px;
 116        height: auto;
 117        display: flex;
 118        justify-content: center;
 119        align-items: center;
 120    }
 121
 122    .product-img {
 123        width: 40%;
 124        height: 500px;
 125        background: #fff;
 126        position: relative;
 127        opacity: 0;
 128        transform: translateY(-50px);
 129        animation: fade-in 1s forwards 1;
 130
 131        background: rgba( 174, 157, 157, 0.1 );
 132        box-shadow: 0 8px 20px 0 rgba( 31, 38, 135, 0.37 );
 133        backdrop-filter: blur( 3.5px );
 134        -webkit-backdrop-filter: blur( 3.5px );
 135        border-radius: 10px;
 136        border: 1px solid rgba( 255, 255, 255, 0.18 );
 137    }
 138
 139    .product-img img {
 140        width: 100%;
 141        height: 100%;
 142        object-fit: contain;
 143        user-select: none;
 144    }
 145
 146    .product-listing {
 147        width: 60%;
 148        min-height: 500px;
 149        height: auto;
 150        background: #292929;
 151        padding: 40px;
 152        display: flex;
 153        justify-content: center;
 154        color: #eae3d2;
 155        opacity: 0;
 156        transform: translateY(50px);
 157        animation: fade-in 1s forwards 1;
 158    }
 159
 160    @@keyframes fade-in {
 161        100% {
 162            opacity: 1;
 163            transform: translateY(0);
 164        }
 165    }
 166
 167    .name {
 168        font-family: "dosis";
 169        font-size: 70px;
 170        text-transform: capitalize;
 171    }
 172
 173    .description {
 174        font-size: 18px;
 175        line-height: 30px;
 176        margin: 50px 0;
 177    }
 178
 179    .price {
 180        font-size: 70px;
 181        font-weight: 100;
 182        margin-bottom: 20px;
 183    }
 184
 185    .btn-and-rating-box {
 186        width: 100%;
 187        display: flex;
 188        justify-content: space-between;
 189    }
 190
 191    .btn {
 192        background: #eae3d2;
 193        color: #292929;
 194        border: none;
 195        text-transform: capitalize;
 196        font-size: 16px;
 197        padding: 10px 20px;
 198        cursor: pointer;
 199    }
 200
 201    .btn:hover {
 202        background-color: #eedbaf;
 203    }
 204
 205    @@media (max-width: 1100px) {
 206        .product {
 207            flex-direction: column;
 208            width: 90%;
 209            margin: 5vh 0;
 210        }
 211        .product-img {
 212            width: 100%;
 213            height: 300px;
 214        }
 215        .product-listing {
 216            width: 100%;
 217            min-height: auto;
 218        }
 219        .name,
 220        .price {
 221            font-size: 50px;
 222        }
 223        .description {
 224            font: 16px;
 225        }
 226    }
 227</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ClotheService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ClotheService.html deleted file mode 100644 index aabc884e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ClotheService.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.ClotheService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.ClotheService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\ClotheService.cs
-
-
-
-
-
-
-
Line coverage
-
-
7%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:71
Coverable lines:77
Total lines:135
Line coverage:7.7%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:14
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
GetClothes()0%40%
GetClothe()0%40%
AddClothe()0%20%
UpdateClothe()0%20%
DeleteClothe()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\ClotheService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ClotheService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IClotheService"/>.
 9    /// </summary>
 10    public class ClotheService : IClotheService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ClotheService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 517        public ClotheService(HttpClient httpClient, ISnackbar snackBar)
 518        {
 519            this.HttpClient = httpClient;
 520            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 521            this.SnackBar = snackBar;
 522        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<List<ClotheResponse>> GetClothes()
 041        {
 042            var response = await this.HttpClient.GetAsync("Clothes/clothes");
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<Result<ClotheResponse>>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51
 052            return !response.IsSuccessStatusCode
 053                ? null
 054                : result.Items;
 055        }
 56
 57        /// <inheritdoc/>
 58        public async Task<ClotheResponse> GetClothe(int id)
 059        {
 060            var response = await this.HttpClient.GetAsync($"Clothes/clothe/{id}");
 061            var responseResult = await response.Content.ReadAsStringAsync();
 062            var result = JsonSerializer.Deserialize<Result<ClotheResponse>>(
 063                responseResult, this.Options);
 64
 065            if (response.IsSuccessStatusCode == false)
 066            {
 067                this.SnackBar.Add(result.Error, Severity.Error);
 068            }
 69
 070            return !response.IsSuccessStatusCode
 071                ? null
 072                : result.Item;
 073        }
 74
 75        /// <inheritdoc/>
 76        public async Task<RequestResponse> AddClothe(ClotheResponse clothe)
 077        {
 078            var response = await this.HttpClient.PostAsJsonAsync("Clothes/clothe", clothe);
 079            var responseResult = await response.Content.ReadAsStringAsync();
 080            var result = JsonSerializer.Deserialize<RequestResponse>(
 081                responseResult, this.Options);
 82
 083            if (response.IsSuccessStatusCode == false)
 084            {
 085                this.SnackBar.Add(result.Error, Severity.Error);
 086            }
 87            else
 088            {
 089                this.SnackBar.Add("The clothe was added.", Severity.Success);
 090            }
 91
 092            return result;
 093        }
 94
 95        /// <inheritdoc/>
 96        public async Task<RequestResponse> UpdateClothe(ClotheResponse clothe)
 097        {
 098            var response = await this.HttpClient.PutAsJsonAsync("Clothes/clothe", clothe);
 099            var responseResult = await response.Content.ReadAsStringAsync();
 0100            var result = JsonSerializer.Deserialize<RequestResponse>(
 0101                responseResult, this.Options);
 102
 0103            if (response.IsSuccessStatusCode == false)
 0104            {
 0105                this.SnackBar.Add(result.Error, Severity.Error);
 0106            }
 107            else
 0108            {
 0109                this.SnackBar.Add("The clothe was updated.", Severity.Success);
 0110            }
 111
 0112            return result;
 0113        }
 114
 115        /// <inheritdoc/>
 116        public async Task<RequestResponse> DeleteClothe(int id)
 0117        {
 0118            var response = await this.HttpClient.DeleteAsync($"Clothes/clothe/{id}");
 0119            var responseResult = await response.Content.ReadAsStringAsync();
 0120            var result = JsonSerializer.Deserialize<RequestResponse>(
 0121                responseResult, this.Options);
 122
 0123            if (response.IsSuccessStatusCode == false)
 0124            {
 0125                this.SnackBar.Add(result.Error, Severity.Error);
 0126            }
 127            else
 0128            {
 0129                this.SnackBar.Add("The clothe was deleted.", Severity.Success);
 0130            }
 131
 0132            return result;
 0133        }
 134    }
 135}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Clothes.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Clothes.html deleted file mode 100644 index cdadb858..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Clothes.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Clothes.Clothes - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Clothes.Clothes
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Clothes\Clothes.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:64
Coverable lines:64
Total lines:198
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
<BuildRenderTree()100%10%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
ModalOk()100%10%
get_SearchString()100%10%
get_clotheList()100%10%
get_searchClotheData()100%10%
Dispose()100%10%
OnInitializedAsync()100%10%
GetClothes()100%10%
FilterClothes()0%20%
NavigateToPage(...)100%10%
DeleteConfirm(...)100%10%
DeleteClothe()100%10%
ResetSearch()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Clothes\Clothes.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Clothes.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/clothes"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Admin)]
 10
 11@inject IClotheService ClotheService
 12@inject NavigationManager NavManager
 13@inject HttpInterceptorService Interceptor
 14
 15<h1 class="display-3 font-weight-bold mb-0 text-primary mb-3">Clothes List</h1>
 16
 17<div class="row mb-4">
 18    <div class="col">
 19        <MatButtonLink Href="admin/clothes/add" Raised="true">Add Clothe</MatButtonLink>
 20    </div>
 21</div>
 22
 023@if (clotheList is null)
 024{
 25    <div class="d-flex justify-content-center" style="margin-top: 100px;">
 26        <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 27    </div>
 028}
 29else
 030{
 031    @if (clotheList.Count > 0)
 032    {
 33        <MatTable Items="@clotheList" LoadInitialData="true" Striped="true" AllowSelection="true"
 34            RowClass="tester" FilterByColumnName="Name" DebounceMilliseconds="150" class="mat-elevation-z5">
 35            <MatTableHeader>
 36                <th>Id</th>
 37                <th class="col-md-2">Name</th>
 38                <th class="col-md-4">Description</th>
 39                <th>Price</th>
 40                <th>Amount</th>
 41                <th>Image Name</th>
 42                <th>Image Path</th>
 43                <th>IsActive</th>
 44                <th class="col-md-6">Actions</th>
 45            </MatTableHeader>
 46
 47            <MatTableRow>
 048                <td>@String.Format("{0:d}", @context.Id)</td>
 049                <td class="col-md-2">@context.Name</td>
 050                <td class="col-md-4">@context.Description</td>
 051                <td>@context.Price</td>
 052                <td>@context.Amount</td>
 053                <td>@context.ImageName</td>
 054                <td>@context.ImagePath</td>
 055                <td>@context.IsActive</td>
 56                <td class="col-md-6">
 57                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Edit"
 058                        Color="Color.Success" @onclick="() => NavigateToPage(context.Id)">
 59                        Edit
 60                    </MudButton>
 61                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 062                        Color="Color.Error" @onclick="(() => { DeleteConfirm(context.Id); ModalShow(); })">
 63                        Delete
 64                    </MudButton>
 65                </td>
 66            </MatTableRow>
 67        </MatTable>
 68
 069        @if (showModal)
 070        {
 71            <div class="modal fade show" id="myModal" style="display:block; margin-top: 150px;" aria-modal="true" role="
 72                <div class="modal-dialog">
 73                    <div class="modal-content">
 74                        <div class="modal-header">
 75                            <h3 class="modal-title">Remove clothe</h3>
 76                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Close"
 77                                Color="Color.Warning" @onclick="@ModalCancel"
 78                                data-bs-dismiss="modal" aria-label="Close">
 79                                Close
 80                            </MudButton>
 81                        </div>
 82                        <div class="modal-body">
 83                            <h4>Do you want to remove this clothe from the shop?</h4>
 84                            <small>
 85                                <p>This represents a soft delete, the item will remain in the database but won't be show
 86                            </small>
 87                        </div>
 88                        <div class="modal-footer">
 89                            <MudButton class="mr-2" Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 090                                Color="Color.Error" @onclick="(async () => { await DeleteClothe(clothe.Id); ModalOk(); }
 91                                Delete
 92                            </MudButton>
 93                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel"
 94                                Color="Color.Warning" @onclick="@ModalCancel">
 95                                Cancel
 96                            </MudButton>
 97                        </div>
 98                    </div>
 99                </div>
 100            </div>
 0101        }
 0102    }
 103    else
 0104    {
 105        <div class="d-flex justify-content-center" style="margin-top: 150px;">
 106            <h4 style="font-size: 45px;">No record found</h4>
 107        </div>
 0108    }
 0109}
 110
 111@code {
 0112    bool showModal = false;
 113
 0114    void ModalShow() => showModal = true;
 0115    void ModalCancel() => showModal = false;
 0116    void ModalOk() => showModal = false;
 117
 0118    protected ClotheResponse? clothe = new();
 0119    protected string? SearchString { get; set; } = string.Empty;
 120
 0121    protected List<ClotheResponse>? clotheList { get; set; }
 0122    protected List<ClotheResponse>? searchClotheData { get; set; }
 123
 0124    public void Dispose() => Interceptor.DisposeEvent();
 125
 126    /// <summary>
 127    /// Initialize the component on load.
 128    /// </summary>
 129    protected override async Task OnInitializedAsync()
 0130    {
 0131        Interceptor.RegisterEvent();
 0132        await GetClothes();
 0133    }
 134
 135    /// <summary>
 136    /// Get the clothes.
 137    /// </summary>
 138    protected async Task GetClothes()
 0139    {
 0140        clotheList = await ClotheService.GetClothes();
 0141        searchClotheData = clotheList;
 0142    }
 143
 144    /// <summary>
 145    /// Filter the clothes.
 146    /// </summary>
 147    protected void FilterClothes()
 0148    {
 0149        if (!string.IsNullOrEmpty(SearchString))
 0150        {
 0151            clotheList = searchClotheData.Where(x => x.Name.IndexOf(SearchString, StringComparison.OrdinalIgnoreCase) !=
 0152        }
 153        else
 0154        {
 0155            clotheList = searchClotheData;
 0156        }
 0157    }
 158
 159    /// <summary>
 160    /// Navigate.
 161    /// </summary>
 162    private void NavigateToPage(int id)
 0163    {
 0164        NavManager.NavigateTo($"admin/clothes/edit/{id}");
 0165    }
 166
 167    /// <summary>
 168    /// Confirm the delete operation.
 169    /// </summary>
 170    protected void DeleteConfirm(int Id)
 0171    {
 0172        clothe = clotheList.FirstOrDefault(x => x.Id == Id);
 0173    }
 174
 175    /// <summary>
 176    /// Delete the clothe.
 177    /// </summary>
 178    protected async Task DeleteClothe(int Id)
 0179    {
 0180        await ClotheService.DeleteClothe(Id);
 0181        await GetClothes();
 0182    }
 183
 184    /// <summary>
 185    /// Reset the search filter.
 186    /// </summary>
 187    public void ResetSearch()
 0188    {
 0189        SearchString = string.Empty;
 0190        clotheList = searchClotheData;
 0191    }
 192}
 193
 194<style>
 195    label {
 196        width: 70%;
 197    }
 198</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CustomerRoleHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CustomerRoleHandler.html deleted file mode 100644 index 44be4bde..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CustomerRoleHandler.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - -BlazorShop.WebClient.AuthPolicies.CustomerRoleHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.AuthPolicies.CustomerRoleHandler
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\CustomerRoleHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:38
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:14
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
HandleRequirementAsync(...)0%140%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\CustomerRoleHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CustomerRoleHandler.cs" company="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.AuthPolicies
 6{
 7    /// <summary>
 8    /// Handle the requirement of customer role.
 9    /// </summary>
 10    public class CustomerRoleHandler : AuthorizationHandler<CustomerRoleRequirement>
 11    {
 12        /// <summary>
 13        /// Search for the customer role.
 14        /// </summary>
 15        /// <param name="context">The instance of the <see cref="AuthorizationHandlerContext"/>.</param>
 16        /// <param name="requirement">The instance of the <see cref="UserRoleRequirement"/>.</param>
 17        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 18        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, CustomerRoleRequirement requ
 019        {
 020            if (context.User.Identity.IsAuthenticated)
 021            {
 022                var defaultRole = context.User.Claims.FirstOrDefault(c => c.Type == StringRoleResources.RoleClaim && c.V
 023                var userRole = context.User.Claims.FirstOrDefault(c => c.Type == StringRoleResources.RoleClaim && c.Valu
 24
 025                if (userRole != null && userRole.Value.Equals(StringRoleResources.User))
 026                {
 027                    context.Succeed(requirement);
 028                }
 029                else if (defaultRole != null && defaultRole.Value.Equals(StringRoleResources.Default))
 030                {
 031                    context.Succeed(requirement);
 032                }
 033            }
 34
 035            return Task.CompletedTask;
 036        }
 37    }
 38}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CustomerRoleRequirement.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CustomerRoleRequirement.html deleted file mode 100644 index 3a16ae3e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_CustomerRoleRequirement.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - -BlazorShop.WebClient.AuthPolicies.CustomerRoleRequirement - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.AuthPolicies.CustomerRoleRequirement
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\CustomerRoleRequirement.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:33
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
.ctor(...)100%10%
get_Role()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\CustomerRoleRequirement.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="CustomerRoleRequirement.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.AuthPolicies
 6{
 7    /// <summary>
 8    /// A custom policy to check for the Customer role.
 9    /// </summary>
 10    public class CustomerRoleRequirement : IAuthorizationRequirement
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CustomerRoleRequirement"/> class.
 14        /// </summary>
 015        public CustomerRoleRequirement()
 016        {
 017        }
 18
 19        /// <summary>
 20        /// Initializes a new instance of the <see cref="CustomerRoleRequirement"/> class.
 21        /// </summary>
 22        /// <param name="role">The role name.</param>
 023        public CustomerRoleRequirement(string role)
 024        {
 025            this.Role = role;
 026        }
 27
 28        /// <summary>
 29        /// Gets the role name.
 30        /// </summary>
 031        public string Role { get; }
 32    }
 33}
-
-
-
-
-

Methods/Properties

-.ctor()
-.ctor(System.String)
-get_Role()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_DefaultRoleHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_DefaultRoleHandler.html deleted file mode 100644 index 94b13273..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_DefaultRoleHandler.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - -BlazorShop.WebClient.AuthPolicies.DefaultRoleHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.AuthPolicies.DefaultRoleHandler
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\DefaultRoleHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:33
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
HandleRequirementAsync(...)0%80%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\DefaultRoleHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DefaultRoleHandler.cs" company="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.AuthPolicies
 6{
 7    /// <summary>
 8    /// Handle the requirement of default role.
 9    /// </summary>
 10    public class DefaultRoleHandler : AuthorizationHandler<DefaultRoleRequirement>
 11    {
 12        /// <summary>
 13        /// Search for the default role.
 14        /// </summary>
 15        /// <param name="context">The instance of the <see cref="AuthorizationHandlerContext"/>.</param>
 16        /// <param name="requirement">The instance of the <see cref="UserRoleRequirement"/>.</param>
 17        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 18        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, DefaultRoleRequirement requi
 019        {
 020            if (context.User.Identity.IsAuthenticated)
 021            {
 022                var userRole = context.User.Claims.FirstOrDefault(c => c.Type == StringRoleResources.RoleClaim && c.Valu
 23
 024                if (userRole != null && userRole.Value.Equals(requirement.Role))
 025                {
 026                    context.Succeed(requirement);
 027                }
 028            }
 29
 030            return Task.CompletedTask;
 031        }
 32    }
 33}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_DefaultRoleRequirement.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_DefaultRoleRequirement.html deleted file mode 100644 index d0c5e0e9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_DefaultRoleRequirement.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.WebClient.AuthPolicies.DefaultRoleRequirement - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.AuthPolicies.DefaultRoleRequirement
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\DefaultRoleRequirement.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:26
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Role()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\DefaultRoleRequirement.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="DefaultRoleRequirement.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.AuthPolicies
 6{
 7    /// <summary>
 8    /// A custom policy to check for the Default role.
 9    /// </summary>
 10    public class DefaultRoleRequirement : IAuthorizationRequirement
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DefaultRoleRequirement"/> class.
 14        /// </summary>
 15        /// <param name="role">The role name.</param>
 016        public DefaultRoleRequirement(string role)
 017        {
 018            this.Role = role;
 019        }
 20
 21        /// <summary>
 22        /// Gets the role name.
 23        /// </summary>
 024        public string Role { get; }
 25    }
 26}
-
-
-
-
-

Methods/Properties

-.ctor(System.String)
-get_Role()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_HttpInterceptorService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_HttpInterceptorService.html deleted file mode 100644 index 04c94863..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_HttpInterceptorService.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Interceptor.HttpInterceptorService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Interceptor.HttpInterceptorService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Interceptor\HttpInterceptorService.cs
-
-
-
-
-
-
-
Line coverage
-
-
17%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:5
Uncovered lines:23
Coverable lines:28
Total lines:84
Line coverage:17.8%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:7
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_Interceptor()100%10%
get_NavManager()100%10%
RegisterEvent()100%10%
DisposeEvent()100%10%
InterceptResponse(...)0%70%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Interceptor\HttpInterceptorService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="HttpInterceptorService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Interceptor
 6{
 7    /// <summary>
 8    /// A middleware between the server and client to intercept the server response.
 9    /// </summary>
 10    public class HttpInterceptorService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="HttpInterceptorService"/> class.
 14        /// </summary>
 15        /// <param name="interceptor">The instance of the <see cref="HttpClientInterceptor"/> to use.</param>
 16        /// <param name="navManager">The instance of the <see cref="NavigationManager"/> to use.</param>
 317        public HttpInterceptorService(HttpClientInterceptor interceptor, NavigationManager navManager)
 318        {
 319            this.Interceptor = interceptor;
 320            this.NavManager = navManager;
 321        }
 22
 23        /// <summary>
 24        /// Gets the instance of the <see cref="HttpClientInterceptor"/> to use.
 25        /// </summary>
 026        private HttpClientInterceptor Interceptor { get; }
 27
 28        /// <summary>
 29        /// Gets the instance of the <see cref="NavigationManager"/> to use.
 30        /// </summary>
 031        private NavigationManager NavManager { get; }
 32
 33        /// <summary>
 34        /// Register the event.
 35        /// </summary>
 36        #pragma warning disable CS8622 // Nullability of reference types in type of parameter doesn't match the target d
 037        public void RegisterEvent() => this.Interceptor.AfterSend += this.InterceptResponse;
 38        #pragma warning restore CS8622 // Nullability of reference types in type of parameter doesn't match the target d
 39
 40        /// <summary>
 41        /// Remove the event.
 42        /// </summary>
 43        #pragma warning disable CS8622 // Nullability of reference types in type of parameter doesn't match the target d
 044        public void DisposeEvent() => this.Interceptor.AfterSend -= this.InterceptResponse;
 45        #pragma warning restore CS8622 // Nullability of reference types in type of parameter doesn't match the target d
 46
 47        /// <summary>
 48        /// Intercept the response and check for the error code received from the server.
 49        /// </summary>
 50        /// <param name="sender">The object send.</param>
 51        /// <param name="e">The http client interceptor args.</param>
 52        /// <exception cref="HttpResponseException"> The http response exception type.</exception>
 53        protected void InterceptResponse(object sender, HttpClientInterceptorEventArgs e)
 054        {
 055            if (!e.Response.IsSuccessStatusCode)
 056            {
 057                var statusCode = e.Response.StatusCode;
 58
 59                string message;
 060                switch (statusCode)
 61                {
 62                    case HttpStatusCode.NotFound:
 063                        this.NavManager.NavigateTo("/not-found");
 064                        message = "The requested resource was not found.";
 065                        break;
 66                    case HttpStatusCode.Unauthorized:
 067                        this.NavManager.NavigateTo("/unauthorized");
 068                        message = "User is not authorized";
 069                        break;
 70                    case HttpStatusCode.Forbidden:
 071                        this.NavManager.NavigateTo("/unauthorized");
 072                        message = "User is not authorized";
 073                        break;
 74                    default:
 075                        this.NavManager.NavigateTo("/server-error");
 076                        message = "Something went wrong, please contact Administrator";
 077                        break;
 78                }
 79
 080                throw new HttpResponseException(message);
 81            }
 082        }
 83    }
 84}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_HttpResponseException.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_HttpResponseException.html deleted file mode 100644 index c361ed7b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_HttpResponseException.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Interceptor.HttpResponseException - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Interceptor.HttpResponseException
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Interceptor\HttpResponseException.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:49
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
.ctor(...)100%10%
.ctor(...)100%10%
.ctor(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Interceptor\HttpResponseException.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="HttpResponseException.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Interceptor
 6{
 7    /// <summary>
 8    /// A custom http response exception.
 9    /// </summary>
 10    [Serializable]
 11    internal class HttpResponseException : Exception
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the <see cref="HttpResponseException"/> class.
 15        /// </summary>
 016        public HttpResponseException()
 017        {
 018        }
 19
 20        /// <summary>
 21        /// Initializes a new instance of the <see cref="HttpResponseException"/> class.
 22        /// </summary>
 23        /// <param name="message">The message.</param>
 24        public HttpResponseException(string message)
 025            : base(message)
 026        {
 027        }
 28
 29        /// <summary>
 30        /// Initializes a new instance of the <see cref="HttpResponseException"/> class.
 31        /// </summary>
 32        /// <param name="message">The message.</param>
 33        /// <param name="innerException">The inner exception.</param>
 34        public HttpResponseException(string message, Exception innerException)
 035            : base(message, innerException)
 036        {
 037        }
 38
 39        /// <summary>
 40        /// Initializes a new instance of the <see cref="HttpResponseException"/> class.
 41        /// </summary>
 42        /// <param name="info">The instance of the <see cref="SerializationInfo"/> to use.</param>
 43        /// <param name="context">The instance of the <see cref="StreamingContext"/> to use.</param>
 44        protected HttpResponseException(SerializationInfo info, StreamingContext context)
 045            : base(info, context)
 046        {
 047        }
 48    }
 49}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Index.2.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Index.2.html deleted file mode 100644 index 3ce3661f..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Index.2.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Musics.Index - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Musics.Index
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Musics\Index.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:118
Coverable lines:118
Total lines:290
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:28
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%180%
<BuildRenderTree()100%10%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
ModalOk()100%10%
get_musicsList()100%10%
get_searchMusicsData()100%10%
get_SearchString()100%10%
get_UserId()100%10%
Dispose()100%10%
OnInitializedAsync()0%20%
GetUserSubscriber()0%40%
ActivateMembership()0%20%
ViewMusic(...)100%10%
GetMusics()100%10%
GetSubscriptions()100%10%
FilterMusics()0%20%
ResetSearch()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Musics\Index.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Index.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/musics"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject IMusicService MusicService
 13@inject ISubscriptionService SubscriptionService
 14@inject ISubscriberService SubscriberService
 15@inject NavigationManager NavManager
 16@inject HttpClient HttpClient
 17@inject HttpInterceptorService Interceptor
 18
 19<h3 class="mb-3">Musics Section</h3>
 20
 21<div class="row">
 22    <div class="input-group col">
 23        <MudTextField InputType="InputType.Text" class="form-control"
 24            Immediate="true" Variant="Variant.Outlined" Placeholder="Search music by title"
 25            @bind-Value="SearchString" OnKeyUp="FilterMusics" />
 26        <div class="input-group-append" style="margin-left: 15px;">
 27            <button class="btn btn-primary btn-lg" @onclick="ResetSearch">
 28                <i class="fas fa-times"></i>
 29                Reset Filter
 30            </button>
 31        </div>
 32    </div>
 33</div>
 34<br />
 35
 036@if (musicsList is null)
 037{
 38    <div class="d-flex justify-content-center" style="margin-top: 100px;">
 39        <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 40    </div>
 041}
 42else
 043{
 044    @if (musicsList.Count == 0)
 045    {
 46        <div class="d-flex justify-content-center" style="margin-top: 150px;">
 47            <h4 style="font-size: 45px;">No record found</h4>
 48        </div>
 049    }
 50    else
 051    {
 52        <div class="container px-4 py-5" id="custom-cards">
 53            <div class="row border-bottom">
 54                <h2 class="">Rent Music</h2>
 55                <h2 class="d-flex flex-row-reverse" style="margin-top: -45px; border: none;">
 056                    <button type="button" class="btn btn-sm btn-outline-primary" @onclick="(() => ModalShow())">
 057                        @Title Membership
 58                    </button>
 59                </h2>
 60            </div>
 61
 62            <div class="row row-cols-1 row-cols-lg-3 align-items-stretch g-4 py-5">
 063                @foreach (var item in musicsList)
 064                {
 65                    <div class="col">
 66                        <div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-5 shadow-lg" style=
 67                            <div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1">
 068                                <h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">@item.Title</h2>
 69                                <ul class="d-flex list-unstyled mt-auto">
 70                                    <li class="me-auto">
 71                                        <img src="https://www.onlinelogomaker.com/blog/wp-content/uploads/2017/06/music-
 72                                    </li>
 73                                    <li class="d-flex align-items-center">
 74                                        <small>
 75                                            <button type="button" class="btn btn-sm btn-outline-success" style="border: 
 076                                                @onclick="(() => { ViewMusic(item.Id); })">
 77                                                View Music
 78                                            </button>
 79                                        </small>
 80                                    </li>
 81                                </ul>
 82                            </div>
 083                            @if (MembershipAccess !=0 && MembershipAccess >= item.AccessLevel)
 084                            {
 85                                <div class="text-center mb-3">
 86                                    <audio controls>
 87                                        <source src="audio/music_audio.mp3" type="audio/ogg" />
 88                                        <source src="audio/music_audio.mp3" type="audio/mpeg" />
 89                                        <a href="audio/music_audio.mp3">music</a>
 90                                    </audio>
 91                                </div>
 092                            }
 93                        </div>
 94                    </div>
 095                }
 96            </div>
 97        </div>
 98
 099        @if (showModal)
 0100        {
 101            <div class="modal fade show" id="myModal" style="display:block; margin-top: 125px; margin-left: -100px;" ari
 102                <div class="modal-dialog">
 103                    <div class="modal-content" style="width: 900px;">
 104                        <div class="modal-header d-flex justify-content-center">
 0105                            <h3 class="modal-title">@Title Music Membership</h3>
 106                        </div>
 107
 108                        <div class="modal-body">
 109                            <h4 class="text-center align-items-center">What type of membership do you want to choose?</h
 110
 111                            <div class="container py-3">
 112                                <main>
 113                                    <div class="row row-cols-1 row-cols-md-3 mb-3 text-center">
 0114                                        @foreach (var subscription in subscriptions)
 0115                                        {
 116                                            <div class="col" style="">
 117                                                <div class="card mb-4 rounded-3 shadow-sm">
 118                                                    <div class="card-header py-3">
 0119                                                        <h4 class="my-0 fw-normal">@subscription.Name</h4>
 120                                                    </div>
 121                                                    <div class="card-body">
 122                                                        <h1 class="card-title pricing-card-title">
 0123                                                            <small class="text-muted fw-light">@subscription.CurrencySym
 124                                                        </h1>
 125                                                        <ul class="list-unstyled mt-3 mb-4">
 0126                                                            @foreach (var item in subscription.Options.Split(","))
 0127                                                            {
 0128                                                                <li>@item</li>
 0129                                                            }
 130                                                        </ul>
 0131                                                        <button type="button" class="btn btn-danger" @onclick="(async ()
 0132                                                            await ActivateMembership(subscription); ModalOk();
 0133                                                        })">@Title @subscription.Name Plan</button>
 134                                                    </div>
 135                                                </div>
 136                                            </div>
 0137                                        }
 0138                                        @if (MembershipAccess > 0)
 0139                                        {
 140                                            <div class="col-md-12">
 0141                                                <h4>Your current pricing plan is: @subscriber.SubscriptionName Subscript
 142                                            </div>
 0143                                        }
 144                                    </div>
 145                                </main>
 146                            </div>
 147                        </div>
 148
 149                        <div class="modal-footer">
 150                            <button type="button" class="btn" @onclick="@ModalCancel">Cancel</button>
 151                        </div>
 152                    </div>
 153                </div>
 154            </div>
 0155        }
 0156    }
 0157}
 158
 159@code {
 0160    bool showModal = false;
 161
 0162    void ModalShow() => showModal = true;
 0163    void ModalCancel() => showModal = false;
 0164    void ModalOk() => showModal = false;
 165
 0166    private int MembershipAccess = 0;
 0167    private string Title = "Activate";
 168
 0169    private SubscriberResponse subscriber = new();
 0170    private List<SubscriptionResponse> subscriptions = new();
 171
 0172    private List<MusicResponse> musicsList { get; set; }
 0173    protected List<MusicResponse> searchMusicsData { get; set; }
 174
 0175    protected string SearchString { get; set; } = string.Empty;
 0176    private int UserId { get; set; }
 177
 0178    public void Dispose() => Interceptor.DisposeEvent();
 179
 180    /// <summary>
 181    /// Initialize the component on load.
 182    /// </summary>
 183    protected override async Task OnInitializedAsync()
 0184    {
 0185        Interceptor.RegisterEvent();
 0186        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 0187        var user = authstate.User;
 188
 0189        if (!user.Identity.IsAuthenticated) return;
 0190        UserId = int.Parse(user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.UserIdClaim).Value);
 191
 0192        await GetMusics();
 0193        await GetSubscriptions();
 0194        await GetUserSubscriber(UserId);
 0195    }
 196
 197    /// <summary>
 198    /// Get the user subscriber.
 199    /// </summary>
 200    private async Task GetUserSubscriber(int userId)
 0201    {
 0202        subscriber = await SubscriberService.GetUserSubscriber(userId);
 0203        if (DateTime.Now <= subscriber.CurrentPeriodEnd && subscriber.Id > 0)
 0204        {
 0205            MembershipAccess = subscriber.SubscriptionId;
 0206            Title = "Update";
 0207        }
 0208    }
 209
 210    /// <summary>
 211    /// Activate the membership.
 212    /// </summary>
 213    private async Task ActivateMembership(SubscriptionResponse subscription)
 0214    {
 0215        var subscriberObj = new SubscriberResponse
 0216        {
 0217            DateStart = DateTime.Now,
 0218            CurrentPeriodEnd = DateTime.Now.AddDays(30),
 0219            CustomerId = UserId,
 0220            SubscriptionId = subscription.Id,
 0221            StripeSubscriptionId = subscription.StripeSubscriptionId
 0222        };
 0223        await SubscriberService.AddSubscriber(subscriberObj);
 224
 0225        if (MembershipAccess == 0)
 0226        {
 0227            var response = await HttpClient.PostAsJsonAsync("Payments/create-subscription", subscriberObj);
 0228            var subscriptionCheckoutUrl = await response.Content.ReadAsStringAsync();
 0229            NavManager.NavigateTo(subscriptionCheckoutUrl, forceLoad: true);
 0230        }
 231        else
 0232        {
 0233            subscriberObj.Id = 1;
 0234            subscriberObj.StripeSubscriberSubscriptionId = subscriber.StripeSubscriberSubscriptionId;
 235
 0236            var response = await HttpClient.PostAsJsonAsync("Payments/update-subscription", subscriberObj);
 0237            var subscriptionCheckoutUrl = await response.Content.ReadAsStringAsync();
 0238            NavManager.NavigateTo(subscriptionCheckoutUrl, forceLoad: true);
 0239        }
 0240    }
 241
 242    /// <summary>
 243    /// View the music details.
 244    /// </summary>
 245    private void ViewMusic(int id)
 0246    {
 0247        NavManager.NavigateTo($"musics/view/{id}");
 0248    }
 249
 250    /// <summary>
 251    /// Get the musics.
 252    /// </summary>
 253    protected async Task GetMusics()
 0254    {
 0255        musicsList = await MusicService.GetMusics();
 0256        searchMusicsData = musicsList;
 0257    }
 258
 259    /// <summary>
 260    /// Get the subscriptions.
 261    /// </summary>
 262    protected async Task GetSubscriptions()
 0263    {
 0264        subscriptions = await SubscriptionService.GetSubscriptions();
 0265    }
 266
 267    /// <summary>
 268    /// Filter the musics.
 269    /// </summary>
 270    protected void FilterMusics()
 0271    {
 0272        if (!string.IsNullOrEmpty(SearchString))
 0273        {
 0274            musicsList = searchMusicsData.Where(x => x.Title.IndexOf(SearchString, StringComparison.OrdinalIgnoreCase) !
 0275        }
 276        else
 0277        {
 0278            musicsList = searchMusicsData;
 0279        }
 0280    }
 281
 282    /// <summary>
 283    /// Reset the search filter.
 284    /// </summary>
 285    public void ResetSearch()
 0286    {
 0287        SearchString = string.Empty;
 0288        musicsList = searchMusicsData;
 0289    }
 290}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Index.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Index.html deleted file mode 100644 index 42cee97d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Index.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Clothes.Index - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Clothes.Index
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Clothes\Index.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:56
Coverable lines:56
Total lines:192
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
<BuildRenderTree()100%10%
get_clothesList()100%10%
get_searchClothesData()100%10%
get_SearchString()100%10%
get_UserId()100%10%
Dispose()100%10%
OnInitializedAsync()0%20%
GetClothes()100%10%
AddToCart()100%10%
FilterClothes()0%20%
ResetSearch()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Clothes\Index.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Index.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/clothes"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject IClotheService ClotheService
 13@inject ICartService CartService
 14@inject HttpInterceptorService Interceptor
 15
 16<h3>Clothes Shop</h3>
 17
 18<div class="row">
 19    <div class="input-group col">
 20        <MudTextField InputType="InputType.Text" class="form-control"
 21            Immediate="true" Variant="Variant.Outlined" Placeholder="Search clothe by name"
 22            @bind-Value="SearchString" OnKeyUp="FilterClothes" />
 23        <div class="input-group-append" style="margin-left: 15px;">
 24            <button class="btn btn-primary btn-lg" @onclick="ResetSearch">
 25                <i class="fas fa-times"></i>
 26                Reset Filter
 27            </button>
 28        </div>
 29    </div>
 30</div>
 31<br />
 32
 033@if (clothesList is null)
 034{
 35    <div class="d-flex justify-content-center" style="margin-top: 100px;">
 36        <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 37    </div>
 038}
 39else
 040{
 041    @if (clothesList.Count == 0)
 042    {
 43        <div class="d-flex justify-content-center" style="margin-top: 150px;">
 44            <h4 style="font-size: 45px;">No record found</h4>
 45        </div>
 046    }
 47    else
 048    {
 49        <div class="album py-5">
 50            <div class="container">
 51                <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3">
 052                    @foreach (var clothe in clothesList)
 053                    {
 54                        <div class="col">
 55                            <div class="card shadow-sm">
 56                                <img src="images/clothes/@clothe.ImagePath" style="height: 350px;" class="img-fluid" alt
 57                                <div class="card-body">
 058                                    <p class="card-text name">@clothe.Name</p>
 59                                    <div class="d-flex justify-content-between align-items-center">
 60                                        <div class="btn-group">
 61                                            <button type="button" class="btn btn-sm btn-outline-secondary"
 062                                                @onclick="(async () => { await AddToCart(clothe); })">
 63                                                Add To Cart
 64                                            </button>
 65                                            <span style="margin-left: 15px;"></span>
 66                                            <a href='clothes/view/@clothe.Id' class="btn btn-outline-dark" role="button"
 67                                                View Product
 68                                            </a>
 69                                        </div>
 070                                    <small class="text-muted price">$ @clothe.Price</small>
 71                                    </div>
 72                                </div>
 73                            </div>
 74                        </div>
 075                    }
 76                </div>
 77            </div>
 78        </div>
 079    }
 080}
 81
 82@code {
 083    protected List<ClotheResponse> clothesList { get; set; }
 084    protected List<ClotheResponse> searchClothesData  { get; set; }
 85
 086    protected string SearchString { get; set; } = string.Empty;
 087    private int UserId { get; set; }
 88
 089    public void Dispose() => Interceptor.DisposeEvent();
 90
 91    /// <summary>
 92    /// Initialize the component on load.
 93    /// </summary>
 94    protected override async Task OnInitializedAsync()
 095    {
 096        Interceptor.RegisterEvent();
 097        clothesList = new List<ClotheResponse>();
 098        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 099        var user = authstate.User;
 100
 0101        if (!user.Identity.IsAuthenticated) return;
 0102        UserId = int.Parse(user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.UserIdClaim).Value);
 103
 0104        await GetClothes();
 0105    }
 106
 107    /// <summary>
 108    /// Get the clothes.
 109    /// </summary>
 110    protected async Task GetClothes()
 0111    {
 0112        clothesList = await ClotheService.GetClothes();
 0113        searchClothesData = clothesList;
 0114    }
 115
 116    /// <summary>
 117    /// Add item to cart.
 118    /// </summary>
 119    private async Task AddToCart(ClotheResponse clothe)
 0120    {
 0121        CartResponse cartItem = new();
 122
 0123        cartItem.Name = clothe.Name;
 0124        cartItem.Price = clothe.Price;
 0125        cartItem.Amount = 1;
 0126        cartItem.ClotheId = clothe.Id;
 0127        cartItem.UserId = UserId;
 128
 0129        await CartService.AddCart(cartItem);
 0130    }
 131
 132    /// <summary>
 133    /// Filter the clothes.
 134    /// </summary>
 135    protected void FilterClothes()
 0136    {
 0137        if (!string.IsNullOrEmpty(SearchString))
 0138        {
 0139            clothesList = searchClothesData.Where(x => x.Name.IndexOf(SearchString, StringComparison.OrdinalIgnoreCase) 
 0140        }
 141        else
 0142        {
 0143            clothesList = searchClothesData;
 0144        }
 0145    }
 146
 147    /// <summary>
 148    /// Reset the search filter.
 149    /// </summary>
 150    public void ResetSearch()
 0151    {
 0152        SearchString = string.Empty;
 0153        clothesList = searchClothesData;
 0154    }
 155}
 156
 157<style>
 158    .container {
 159        position: relative;
 160        display: flex;
 161        justify-content: center;
 162        align-items: center;
 163        margin-top: 50px;
 164        font-family: "roboto", sans-serif;
 165    }
 166
 167    .name {
 168        font-family: "dosis";
 169        font-size: 30px;
 170        text-transform: capitalize;
 171    }
 172
 173    .price {
 174        font-size: 20px;
 175        font-weight: 100;
 176        margin-bottom: 1px;
 177    }
 178
 179    .btn {
 180        background: #eae3d2;
 181        color: #292929;
 182        border: none;
 183        text-transform: capitalize;
 184        font-size: 16px;
 185        padding: 10px 20px;
 186        cursor: pointer;
 187    }
 188
 189    .btn:hover {
 190        background-color: #eedbaf;
 191    }
 192</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_JwtTokenParser.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_JwtTokenParser.html deleted file mode 100644 index 38f0e33b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_JwtTokenParser.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Auth.JwtTokenParser - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Auth.JwtTokenParser
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Auth\JwtTokenParser.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:35
Coverable lines:35
Total lines:78
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
ParseClaimsFromJwt(...)100%10%
ExtractRolesFromJWT(...)0%60%
ParseBase64WithoutPadding(...)0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Auth\JwtTokenParser.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="JwtTokenParser.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Auth
 6{
 7    /// <summary>
 8    /// A service to parse claims from the generated token.
 9    /// </summary>
 10    public static class JwtTokenParser
 11    {
 12        /// <summary>
 13        /// Taking the claims from the token.
 14        /// </summary>
 15        /// <param name="jwt">The token.</param>
 16        /// <returns>The user claims list.</returns>
 17        public static IEnumerable<Claim> ParseClaimsFromJwt(string jwt)
 018        {
 019            var claims = new List<Claim>();
 020            var payload = jwt.Split('.')[1];
 021            var jsonBytes = ParseBase64WithoutPadding(payload);
 022            var keyValuePairs = JsonSerializer.Deserialize<Dictionary<string, object>>(jsonBytes);
 23
 024            ExtractRolesFromJWT(claims, keyValuePairs);
 025            claims.AddRange(keyValuePairs.Select(keyValue => new Claim(keyValue.Key, keyValue.Value.ToString())));
 26
 027            return claims;
 028        }
 29
 30        /// <summary>
 31        /// Extracts the roles from the JWT token.
 32        /// </summary>
 33        /// <param name="claims">The list of user claims.</param>
 34        /// <param name="keyValuePairs">The dictionary.</param>
 35        private static void ExtractRolesFromJWT(List<Claim> claims, Dictionary<string, object> keyValuePairs)
 036        {
 037            keyValuePairs.TryGetValue(ClaimTypes.Role, out object roles);
 038            if (roles is not null)
 039            {
 040                var parsedRoles = roles.ToString().Trim().TrimStart('[').TrimEnd(']').Split(',');
 41
 042                if (parsedRoles.Length > 1)
 043                {
 044                    foreach (var parsedRole in parsedRoles)
 045                    {
 046                        claims.Add(new Claim(ClaimTypes.Role, parsedRole.Trim('"')));
 047                    }
 048                }
 49                else
 050                {
 051                    claims.Add(new Claim(ClaimTypes.Role, parsedRoles[0]));
 052                }
 53
 054                keyValuePairs.Remove(ClaimTypes.Role);
 055            }
 056        }
 57
 58        /// <summary>
 59        /// Checking the base64 string nad fix it in case of missing the padding.
 60        /// </summary>
 61        /// <param name="base64">The base64 value.</param>
 62        /// <returns>The completed base64 string.</returns>
 63        private static byte[] ParseBase64WithoutPadding(string base64)
 064        {
 065            switch (base64.Length % 4)
 66            {
 67                case 2:
 068                    base64 += "==";
 069                    break;
 70                case 3:
 071                    base64 += "=";
 072                    break;
 73            }
 74
 075            return Convert.FromBase64String(base64);
 076        }
 77    }
 78}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Login.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Login.html deleted file mode 100644 index ae9f6b49..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Login.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Account.Login - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Account.Login
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\Login.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:108
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
get_showPassword()100%10%
OnInitializedAsync()0%20%
ShowPassword()0%20%
ExecuteLogin()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\Login.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Login.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/login"
 8
 9@inject IAuthenticationService AuthService
 10@inject AuthenticationStateProvider AuthStateProvider
 11@inject NavigationManager NavManager
 12
 13<div>
 14    <div class="container page">
 15        <div class="row">
 16            <div class="col-md-6 offset-md-3 col-xs-12">
 17                <h1 class="mb-3 text-xs-center">Sign in</h1>
 18                <EditForm Model="@loginCommand" OnValidSubmit="ExecuteLogin">
 19                    <FluentValidationValidator />
 20
 21                    <fieldset class="mt-3 form-group">
 22                        <div>
 23                            <MudTextField class="form-control form-control-lg" InputType="InputType.Email"
 24                                @bind-Value="loginCommand.Email" Label="Email"
 25                                For="@(() => loginCommand.Email)"
 26                                Variant="Variant.Outlined"></MudTextField>
 27                        </div>
 28                    </fieldset>
 29                    <fieldset class="mt-2 form-group">
 30                        <div>
 31                            <MudTextField InputType="@TxtType" class="form-control form-control-lg"
 32                                @bind-Value="loginCommand.Password" Label="Password"
 33                                For="@(() => loginCommand.Password)"
 34                                Variant="Variant.Outlined"></MudTextField>
 35                        </div>
 36                        <span>
 37                            <MudCheckBox @bind-Checked="@showPassword" Color="Color.Primary" @onclick="ShowPassword" />
 38                            Show Password
 39                        </span>
 40                    </fieldset>
 41                    <fieldset class="mt-3 text-xs-center">
 42                        <MudLink Href="reset-password" Underline="Underline.None"><strong>Forgot your password?</strong>
 43                    </fieldset>
 44                    <MudButton class="mt-3 btn btn-lg btn-primary pull-xs-right"
 45                        Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Login"
 46                        Color="Color.Primary" ButtonType="MudBlazor.ButtonType.Submit">
 47                            Login
 48                    </MudButton>
 49                </EditForm>
 50            </div>
 51        </div>
 52    </div>
 53</div>
 54
 55@code {
 056    private LoginCommand loginCommand = new();
 57
 058    public MudBlazor.InputType TxtType = InputType.Password;
 059    public bool showPassword { get; set; } = false;
 60
 61    /// <summary>
 62    /// Initialize the component on load.
 63    /// </summary>
 64    protected override async Task OnInitializedAsync()
 065    {
 066        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 067        var user = authstate.User;
 068        if (user.Identity.IsAuthenticated)
 069        {
 070            NavManager.NavigateTo("/");
 071        }
 072    }
 73
 74    /// <summary>
 75    /// Show the password.
 76    /// </summary>
 77    public void ShowPassword()
 078    {
 079        if(showPassword == false)
 080        {
 081            TxtType = InputType.Text;
 082        }
 83        else
 084        {
 085            TxtType = InputType.Password;
 086        }
 087    }
 88
 89    /// <summary>
 90    /// Login the user.
 91    /// </summary>
 92    private async Task ExecuteLogin()
 093    {
 094        var result = await AuthService.Login(loginCommand);
 095        if (result is not null)
 096        {
 097            NavManager.NavigateTo("/");
 098        }
 099    }
 100}
 101
 102<style>
 103   .e-input-eye:before {
 104        content: '\e345';
 105        font-family: e-icons;
 106        font-size: 13px;
 107    }
 108</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Logout.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Logout.html deleted file mode 100644 index 59109cbe..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Logout.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Account.Logout - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Account.Logout
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\Logout.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:4
Coverable lines:4
Total lines:23
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
OnInitializedAsync()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\Logout.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Logout.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/logout"
 8
 9@attribute [Authorize]
 10
 11@inject NavigationManager NavManager
 12@inject IAuthenticationService AuthService
 13
 14@code {
 15    /// <summary>
 16    /// Initialize the component on load.
 17    /// </summary>
 18    protected override async Task OnInitializedAsync()
 019    {
 020        await AuthService.Logout();
 021        NavManager.NavigateTo("/");
 022    }
 23}
-
-
-
-
-

Methods/Properties

-OnInitializedAsync()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MainLayout.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MainLayout.html deleted file mode 100644 index a18cd806..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MainLayout.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Shared.MainLayout - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Shared.MainLayout
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Shared\MainLayout.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:29
Coverable lines:29
Total lines:111
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_AppState()100%10%
get_counts()100%10%
get_username()100%10%
get_userId()100%10%
get_userRole()100%10%
OnInitializedAsync()0%40%
GetCartCount()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Shared\MainLayout.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="MainLayout.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@inherits LayoutComponentBase
 8
 9@inject AuthenticationStateProvider AuthStateProvider
 10@inject ICartService CartService
 11@inject HttpClient httpClient
 12
 13<PageTitle>Blazor Shop</PageTitle>
 14
 15<MudLayout>
 16    <div class="page">
 17        <div class="sidebar">
 18            <NavMenu />
 19        </div>
 20
 21        <main>
 22            <div class="top-row" style="z-index: 100;">
 23                <AuthorizeView>
 24                    <NotAuthorized>
 25                        <NavLink class="nav-link" href="login">
 26                            <span class="oi oi-account-login" aria-hidden="true"></span> Login
 27                        </NavLink>
 28                        <NavLink class="nav-link" href="register">
 29                            <span class="oi oi-share-boxed" aria-hidden="true"></span> Register
 30                        </NavLink>
 31                    </NotAuthorized>
 32                </AuthorizeView>
 33
 34                <AuthorizeView Policy="Customer">
 35                    <Authorized>
 036                        Welcome @username
 37                        <NavLink href="cart" class="nav-link">
 38                            <i class="oi oi-cart"></i>
 039                            Cart (<span>@counts</span>)
 40                        </NavLink>
 41                    </Authorized>
 42                </AuthorizeView>
 43
 44                <AuthorizeView Policy="Admin">
 45                    <Authorized>
 046                        Welcome @username
 47                    </Authorized>
 48                </AuthorizeView>
 49            </div>
 50
 51            <article class="content px-4">
 052                @Body
 53            </article>
 54        </main>
 55    </div>
 56</MudLayout>
 57
 58<MudThemeProvider/>
 59<MudDialogProvider/>
 60<MudSnackbarProvider/>
 61
 62<BlazoredToasts Position="ToastPosition.BottomRight"
 63                Timeout="5"
 64                IconType="IconType.FontAwesome"
 65                SuccessClass="success-toast-override"
 66                SuccessIcon="fa fa-thumbs-up"
 67                ErrorClass="error-toast-override"
 68                ErrorIcon="fa fa-bug" />
 69
 70@code {
 071    [CascadingParameter] AppState AppState { get; set; }
 072    private int counts { get; set; }
 73
 074    private string username { get; set; }
 075    private int userId { get; set; }
 076    private string userRole { get; set; }
 77
 78    /// <summary>
 79    /// .
 80    /// </summary>
 81    protected async override Task OnInitializedAsync()
 082    {
 083        await httpClient.GetAsync("Home/test");
 84
 085        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 086        var user = authstate.User;
 87
 088        if (!user.Identity.IsAuthenticated) return;
 089        username = user.Claims.FirstOrDefault(
 090            x => x.Type == StringRoleResources.NameClaim || x.Type == StringRoleResources.NameClaimSecond
 091        ).Value.Replace("@", " ");
 092        userId = int.Parse(user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.UserIdClaim).Value);
 093        userRole = user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.RoleClaim).Value;
 94
 095        var isAdmin = user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.RoleClaim).Value;
 96
 097        if (!isAdmin.Equals(StringRoleResources.Admin))
 098        {
 099            counts = await GetCartCount(userId);
 0100        }
 0101    }
 102
 103    /// <summary>
 104    /// .
 105    /// </summary>
 106    private async Task<int> GetCartCount(int userId)
 0107    {
 0108        var cart = await CartService.GetCartCounts(userId);
 0109        return cart > 0 ? cart : 0;
 0110    }
 111}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MusicDetails.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MusicDetails.html deleted file mode 100644 index 1d2987be..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MusicDetails.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Musics.MusicDetails - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Musics.MusicDetails
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Musics\MusicDetails.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:174
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%20%
get_Id()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitialized()100%10%
OnParametersSetAsync()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Musics\MusicDetails.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="MusicDetails.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/musics/view/{Id:int}"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject IMusicService MusicService
 12@inject HttpInterceptorService Interceptor
 13
 14<h3 class="text-center">View Music Details</h3>
 15
 016@if (music.Id > 0)
 017{
 18    <div class="container">
 19        <div class="product">
 20            <div class="product-img">
 21                <img src="images/musics/@music.ImagePath" alt="@music.ImageName" />
 22            </div>
 23            <div class="product-listing">
 24                <div class="content">
 025                    <h1>@music.Title</h1>
 026                    <p>@music.Description</p>
 027                    <p>Author: @music.Author</p>
 028                    <p>Date of Release: @music.DateRelease.ToString("dd/MM/yyyy")</p>
 29
 30                    <div class="btn-and-rating-box d-flex justify-content-center">
 31                        <a href="musics" class="btn btn-outline-dark" role="button"> &#8592; Go Back</a>
 32                    </div>
 33                </div>
 34            </div>
 35        </div>
 36    </div>
 037}
 38else
 039{
 40    <div class="d-flex justify-content-center" style="margin-top: 150px;">
 41        <h4 style="font-size: 45px;">No record found</h4>
 42    </div>
 043}
 44
 45@code {
 46    [Parameter]
 047    public int Id { get; set; }
 048    public MusicResponse music = new();
 49
 050    public void Dispose() => Interceptor.DisposeEvent();
 51
 52    /// <summary>
 53    /// Initialize the component on load.
 54    /// </summary>
 55    protected override void OnInitialized()
 056    {
 057        Interceptor.RegisterEvent();
 058    }
 59
 60    /// <summary>
 61    /// Initialize the component using the parameter.
 62    /// </summary>
 63    protected override async Task OnParametersSetAsync()
 064    {
 065        if (Id != 0)
 066        {
 067            music = await MusicService.GetMusic(Id);
 068        }
 069    }
 70}
 71
 72<style>
 73    .container {
 74        width: 100%;
 75        position: relative;
 76        display: flex;
 77        justify-content: center;
 78        align-items: center;
 79        margin-top: 100px;
 80        font-family: "roboto", sans-serif;
 81    }
 82
 83    .product {
 84        position: relative;
 85        width: 1000px;
 86        min-width: 350px;
 87        min-height: 500px;
 88        height: auto;
 89        display: flex;
 90        justify-content: center;
 91        align-items: center;
 92    }
 93
 94    .product-img {
 95        width: 40%;
 96        height: 500px;
 97        background: #fff;
 98        position: relative;
 99        opacity: 0;
 100        transform: translateY(-50px);
 101        animation: fade-in 1s forwards 1;
 102
 103        background: rgba( 174, 157, 157, 0.1 );
 104        box-shadow: 0 8px 20px 0 rgba( 31, 38, 135, 0.37 );
 105        backdrop-filter: blur( 3.5px );
 106        -webkit-backdrop-filter: blur( 3.5px );
 107        border-radius: 10px;
 108        border: 1px solid rgba( 255, 255, 255, 0.18 );
 109    }
 110
 111    .product-img img {
 112        width: 100%;
 113        height: 100%;
 114        object-fit: contain;
 115        user-select: none;
 116    }
 117
 118    .product-listing {
 119        width: 60%;
 120        min-height: 500px;
 121        height: auto;
 122        background: #292929;
 123        padding: 40px;
 124        display: flex;
 125        justify-content: center;
 126        color: #eae3d2;
 127        opacity: 0;
 128        transform: translateY(50px);
 129        animation: fade-in 1s forwards 1;
 130    }
 131
 132    @@keyframes fade-in {
 133        100% {
 134            opacity: 1;
 135            transform: translateY(0);
 136        }
 137    }
 138
 139    .btn-and-rating-box {
 140        width: 100%;
 141        display: flex;
 142        justify-content: space-between;
 143    }
 144
 145    .btn {
 146        background: #eae3d2;
 147        color: #292929;
 148        border: none;
 149        text-transform: capitalize;
 150        font-size: 16px;
 151        padding: 10px 20px;
 152        cursor: pointer;
 153    }
 154
 155    .btn:hover {
 156        background-color: #eedbaf;
 157    }
 158
 159    @@media (max-width: 1100px) {
 160        .product {
 161            flex-direction: column;
 162            width: 90%;
 163            margin: 5vh 0;
 164        }
 165        .product-img {
 166            width: 100%;
 167            height: 300px;
 168        }
 169        .product-listing {
 170            width: 100%;
 171            min-height: auto;
 172        }
 173    }
 174</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MusicService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MusicService.html deleted file mode 100644 index b2e3ca34..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MusicService.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.MusicService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.MusicService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\MusicService.cs
-
-
-
-
-
-
-
Line coverage
-
-
7%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:71
Coverable lines:77
Total lines:135
Line coverage:7.7%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:14
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
GetMusics()0%40%
GetMusic()0%40%
AddMusic()0%20%
UpdateMusic()0%20%
DeleteMusic()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\MusicService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="MusicService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IMusicService"/>.
 9    /// </summary>
 10    public class MusicService : IMusicService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="MusicService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 517        public MusicService(HttpClient httpClient, ISnackbar snackBar)
 518        {
 519            this.HttpClient = httpClient;
 520            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 521            this.SnackBar = snackBar;
 522        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<List<MusicResponse>> GetMusics()
 041        {
 042            var response = await this.HttpClient.GetAsync("Musics/musics");
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<Result<MusicResponse>>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51
 052            return !response.IsSuccessStatusCode
 053                ? null
 054                : result.Items;
 055        }
 56
 57        /// <inheritdoc/>
 58        public async Task<MusicResponse> GetMusic(int id)
 059        {
 060            var response = await this.HttpClient.GetAsync($"Musics/music/{id}");
 061            var responseResult = await response.Content.ReadAsStringAsync();
 062            var result = JsonSerializer.Deserialize<Result<MusicResponse>>(
 063                responseResult, this.Options);
 64
 065            if (response.IsSuccessStatusCode == false)
 066            {
 067                this.SnackBar.Add(result.Error, Severity.Error);
 068            }
 69
 070            return !response.IsSuccessStatusCode
 071                ? null
 072                : result.Item;
 073        }
 74
 75        /// <inheritdoc/>
 76        public async Task<RequestResponse> AddMusic(MusicResponse music)
 077        {
 078            var response = await this.HttpClient.PostAsJsonAsync("Musics/music", music);
 079            var responseResult = await response.Content.ReadAsStringAsync();
 080            var result = JsonSerializer.Deserialize<RequestResponse>(
 081                responseResult, this.Options);
 82
 083            if (response.IsSuccessStatusCode == false)
 084            {
 085                this.SnackBar.Add(result.Error, Severity.Error);
 086            }
 87            else
 088            {
 089                this.SnackBar.Add("The Music was added.", Severity.Success);
 090            }
 91
 092            return result;
 093        }
 94
 95        /// <inheritdoc/>
 96        public async Task<RequestResponse> UpdateMusic(MusicResponse music)
 097        {
 098            var response = await this.HttpClient.PutAsJsonAsync("Musics/music", music);
 099            var responseResult = await response.Content.ReadAsStringAsync();
 0100            var result = JsonSerializer.Deserialize<RequestResponse>(
 0101                responseResult, this.Options);
 102
 0103            if (response.IsSuccessStatusCode == false)
 0104            {
 0105                this.SnackBar.Add(result.Error, Severity.Error);
 0106            }
 107            else
 0108            {
 0109                this.SnackBar.Add("The Music was updated.", Severity.Success);
 0110            }
 111
 0112            return result;
 0113        }
 114
 115        /// <inheritdoc/>
 116        public async Task<RequestResponse> DeleteMusic(int id)
 0117        {
 0118            var response = await this.HttpClient.DeleteAsync($"Musics/music/{id}");
 0119            var responseResult = await response.Content.ReadAsStringAsync();
 0120            var result = JsonSerializer.Deserialize<RequestResponse>(
 0121                responseResult, this.Options);
 122
 0123            if (response.IsSuccessStatusCode == false)
 0124            {
 0125                this.SnackBar.Add(result.Error, Severity.Error);
 0126            }
 127            else
 0128            {
 0129                this.SnackBar.Add("The Music was deleted.", Severity.Success);
 0130            }
 131
 0132            return result;
 0133        }
 134    }
 135}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Musics.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Musics.html deleted file mode 100644 index 074719fa..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Musics.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Musics.Musics - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Musics.Musics
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Musics\Musics.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:47
Coverable lines:47
Total lines:165
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
<BuildRenderTree()100%10%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
ModalOk()100%10%
get_musicsList()100%10%
Dispose()100%10%
OnInitializedAsync()100%10%
GetMusics()100%10%
DeleteConfirm(...)100%10%
DeleteMusic()100%10%
NavigateToPage(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Musics\Musics.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Musics.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/musics"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Admin)]
 10
 11@inject IMusicService MusicService
 12@inject NavigationManager NavManager
 13@inject HttpInterceptorService Interceptor
 14
 15<h1 class="display-3 font-weight-bold mb-0 text-primary mb-3">Music Songs List</h1>
 16
 17<div class="row mb-4">
 18    <div class="col">
 19        <MatButtonLink Href="admin/musics/add" Raised="true">Add Music</MatButtonLink>
 20    </div>
 21</div>
 22
 023@if (musicsList == null)
 024{
 25    <div class="d-flex justify-content-center" style="margin-top: 100px;">
 26        <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 27    </div>
 028}
 29else
 030{
 031    @if (musicsList.Count > 0)
 032    {
 33        <MatTable Items="@musicsList" LoadInitialData="true" Striped="true" AllowSelection="true"
 34            RowClass="tester" FilterByColumnName="Title" DebounceMilliseconds="150" class="mat-elevation-z5">
 35            <MatTableHeader>
 36                <th>Id</th>
 37                <th>Title</th>
 38                <th>Description</th>
 39                <th>Author</th>
 40                <th>DateRelease</th>
 41                <th>ImageName</th>
 42                <th>ImagePath</th>
 43                <th>Actions</th>
 44            </MatTableHeader>
 45
 46            <MatTableRow>
 047                <td>@String.Format("{0:d}", @context.Id)</td>
 048                <td class="col-md-2">@context.Title</td>
 049                <td class="col-md-6">@context.Description</td>
 050                <td>@context.Author</td>
 051                <td class="col-md-2">@context.DateRelease.ToString("dd/MM/yyyy")</td>
 052                <td>@context.ImageName</td>
 053                <td>@context.ImagePath</td>
 54                <td class="col-md-4">
 55                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Edit"
 056                        Color="Color.Success" @onclick="() => NavigateToPage(context.Id)">
 57                        Edit
 58                    </MudButton>
 59                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 060                        Color="Color.Error" @onclick="(() => { DeleteConfirm(context.Id); ModalShow(); })">
 61                        Delete
 62                    </MudButton>
 63                </td>
 64            </MatTableRow>
 65        </MatTable>
 66
 067        @if (showModal)
 068        {
 69            <div class="modal fade show" id="myModal" style="display:block; margin-top: 150px;" aria-modal="true" role="
 70                <div class="modal-dialog">
 71                    <div class="modal-content">
 72                        <div class="modal-header">
 73                            <h3 class="modal-title">Delete Music</h3>
 74                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Close"
 75                                Color="Color.Warning" @onclick="@ModalCancel"
 76                                data-bs-dismiss="modal" aria-label="Close">
 77                                Close
 78                            </MudButton>
 79                        </div>
 80                        <div class="modal-body">
 81                            <h4>Do you want to delete this music?</h4>
 82                        </div>
 83                        <div class="modal-footer">
 84                            <MudButton class="mr-2" Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 085                                Color="Color.Error" @onclick="(async () => { await DeleteMusic(music.Id); ModalOk(); })"
 86                                Delete
 87                            </MudButton>
 88                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel"
 89                                Color="Color.Warning" @onclick="@ModalCancel">
 90                                Cancel
 91                            </MudButton>
 92                        </div>
 93                    </div>
 94                </div>
 95            </div>
 096        }
 097    }
 98    else
 099    {
 100        <div class="d-flex justify-content-center" style="margin-top: 150px;">
 101            <h4 style="font-size: 45px;">No record found</h4>
 102        </div>
 0103    }
 0104}
 105
 106@code {
 0107    bool showModal = false;
 108
 0109    void ModalShow() => showModal = true;
 0110    void ModalCancel() => showModal = false;
 0111    void ModalOk() => showModal = false;
 112
 0113    protected MusicResponse? music = new();
 0114    protected List<MusicResponse>? musicsList { get; set; }
 115
 0116    public void Dispose() => Interceptor.DisposeEvent();
 117
 118    /// <summary>
 119    /// Initialize the component on load.
 120    /// </summary>
 121    protected override async Task OnInitializedAsync()
 0122    {
 0123        Interceptor.RegisterEvent();
 0124        await GetMusics();
 0125    }
 126
 127    /// <summary>
 128    /// Get the musics.
 129    /// </summary>
 130    protected async Task GetMusics()
 0131    {
 0132        musicsList = await MusicService.GetMusics();
 0133    }
 134
 135    /// <summary>
 136    /// Confirm the delete operation.
 137    /// </summary>
 138    protected void DeleteConfirm(int Id)
 0139    {
 0140        music = musicsList.FirstOrDefault(x => x.Id == Id);
 0141    }
 142
 143    /// <summary>
 144    /// Delete the music.
 145    /// </summary>
 146    protected async Task DeleteMusic(int Id)
 0147    {
 0148        await MusicService.DeleteMusic(Id);
 0149        await GetMusics();
 0150    }
 151
 152    /// <summary>
 153    /// Navigate.
 154    /// </summary>
 155    private void NavigateToPage(int id)
 0156    {
 0157        NavManager.NavigateTo($"admin/musics/edit/{id}");
 0158    }
 159}
 160
 161<style>
 162    label {
 163        width: 70%;
 164    }
 165</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MyOrders.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MyOrders.html deleted file mode 100644 index 11b179a4..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MyOrders.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Orders.MyOrders - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Orders.MyOrders
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Orders\MyOrders.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:51
Coverable lines:51
Total lines:154
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
get_ordersList()100%10%
get_searchOrdersData()100%10%
get_SearchString()100%10%
get_userEmail()100%10%
get_userId()100%10%
Dispose()100%10%
OnInitializedAsync()0%20%
GetOrders()100%10%
ViewOrder(...)100%10%
FilterOrders()0%20%
ResetSearch()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Orders\MyOrders.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="MyOrders.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/orders"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject IOrderService OrderService
 13@inject NavigationManager NavigationManager
 14@inject HttpInterceptorService Interceptor
 15
 16<main class="container">
 17    <div class="d-flex align-items-center p-3 my-3 text-white bg-purple shadow-lg p-3 bg-white rounded">
 18        <img class="me-3" src="images/orders.png" alt="orders" width="58" height="38">
 19        <div class="lh-1">
 20            <h1 class="display-3 font-weight-bold mb-0 text-primary" style="margin-left: 30px;">My Orders</h1>
 21        </div>
 22    </div>
 23
 24    <div class="row">
 25        <div class="input-group col shadow-lg p-3 bg-white rounded mb-5">
 26            <MudTextField InputType="InputType.Text" class="form-control"
 27                Immediate="true" Variant="Variant.Outlined" Placeholder="Search order by name"
 28                @bind-Value="SearchString" OnKeyUp="FilterOrders" />
 29            <div class="input-group-append" style="margin-left: 15px;">
 30                <MudButton class="btn btn-primary btn-lg mt-3" Variant="Variant.Filled" StartIcon="@Icons.Material.Fille
 31                    Color="Color.Success" @onclick="ResetSearch">
 32                    Reset Filter
 33                </MudButton>
 34            </div>
 35        </div>
 36    </div>
 37
 038    @if (ordersList is null)
 039    {
 40        <div class="d-flex justify-content-center" style="margin-top: 100px;">
 41            <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 42        </div>
 043    }
 44    else
 045    {
 046        @if (ordersList.Count > 0)
 047        {
 048            @foreach (var order in ordersList)
 049            {
 50                <div class="container col-xxl-12 shadow-lg p-3 bg-white rounded mb-3">
 51                    <div class="row flex-lg-row align-items-center">
 52                        <div class="col-md-3">
 53                            <img src="images/order.jpg" class="d-block img-fluid" alt="Order Image" width="150" height="
 54                        </div>
 55
 56                        <div class="col-md-6" style="margin-left: -90px;">
 057                            <h5 class="display-8 fw-bold lh-1 mb-3">@order.OrderName</h5>
 58                            <div class="col-md-10">
 059                                <p class="lead">@order.OrderDate.ToString("dd/MM/yyyy HH:mm tt")</p>
 60                            </div>
 61                        </div>
 62
 63                        <div class="col-md-3">
 64                            <div class="border-0 d-flex flex-row-reverse">
 65                                <MudButton class="btn btn-primary btn-lg" Variant="Variant.Filled" StartIcon="@Icons.Mat
 066                                    Color="Color.Success" @onclick="(() => ViewOrder(order.Id))">
 67                                    View Order
 68                                </MudButton>
 69                            </div>
 70                        </div>
 71                    </div>
 72                </div>
 073            }
 074        }
 75        else
 076        {
 77            <div class="container col-xxl-12 shadow-lg p-3 bg-white rounded mb-3">
 78                <div class="row flex-lg-row align-items-center">
 79                    <div class="text-center">
 80                        <h4 class="display-6 fw-bold lh-1 mb-3">No record found...</h4>
 81                    </div>
 82                </div>
 83            </div>
 084        }
 085    }
 86</main>
 87
 88@code {
 089    private List<OrderResponse> ordersList { get; set; }
 090    protected List<OrderResponse> searchOrdersData { get; set; }
 91
 092    protected string SearchString { get; set; } = string.Empty;
 093    private string userEmail { get; set; }
 094    private int userId { get; set; }
 95
 096    public void Dispose() => Interceptor.DisposeEvent();
 97
 98    /// <summary>
 99    /// Initialize the component on load.
 100    /// </summary>
 101    protected override async Task OnInitializedAsync()
 0102    {
 0103        Interceptor.RegisterEvent();
 0104        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 0105        var user = authstate.User;
 106
 0107        if (!user.Identity.IsAuthenticated) return;
 0108        userId = int.Parse(user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.UserIdClaim).Value);
 0109        userEmail = user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.EmailClaim).Value;
 110
 0111        await GetOrders(userEmail);
 0112    }
 113
 114    /// <summary>
 115    /// Get the orders.
 116    /// </summary>
 117    public async Task GetOrders(string userEmail)
 0118    {
 0119        ordersList = await OrderService.GetOrders(userEmail);
 0120        searchOrdersData = ordersList;
 0121    }
 122
 123    /// <summary>
 124    /// View the order details.
 125    /// </summary>
 126    private void ViewOrder(int id)
 0127    {
 0128        NavigationManager.NavigateTo($"/orders/view/{id}");
 0129    }
 130
 131    /// <summary>
 132    /// Filter the orders.
 133    /// </summary>
 134    protected void FilterOrders()
 0135    {
 0136        if (!string.IsNullOrEmpty(SearchString))
 0137        {
 0138            ordersList = searchOrdersData.Where(x => x.OrderName.IndexOf(SearchString, StringComparison.OrdinalIgnoreCas
 0139        }
 140        else
 0141        {
 0142            ordersList = searchOrdersData;
 0143        }
 0144    }
 145
 146    /// <summary>
 147    /// Reset the search filter.
 148    /// </summary>
 149    public void ResetSearch()
 0150    {
 0151        SearchString = string.Empty;
 0152        ordersList = searchOrdersData;
 0153    }
 154}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MySubscriptions.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MySubscriptions.html deleted file mode 100644 index b8bc5b5a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_MySubscriptions.html +++ /dev/null @@ -1,553 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Subscriptions.MySubscriptions - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Subscriptions.MySubscriptions
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Subscriptions\MySubscriptions.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:128
Coverable lines:128
Total lines:350
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:26
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%160%
<BuildRenderTree()100%10%
<BuildRenderTree()100%10%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
ModalOk()100%10%
get_UserId()100%10%
get_UserEmail()100%10%
get_SearchString()100%10%
Dispose()100%10%
OnInitializedAsync()0%60%
GetSubscriptions()100%10%
GetActveSubscription()0%40%
CancelMembership()100%10%
GetUserSubscriptions()100%10%
ActivateMembership()0%20%
FilterSubscriptions()0%20%
ResetSearch()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Subscriptions\MySubscriptions.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="MySubscriptions.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/subscriptions"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject ISubscriberService SubscriberService
 13@inject ISubscriptionService SubscriptionService
 14@inject IStripeService StripeService
 15@inject HttpClient HttpClient
 16@inject NavigationManager NavManager
 17@inject HttpInterceptorService Interceptor
 18
 19<main class="container">
 20    <div class="col-xxl-12 d-flex align-items-center p-3 my-3 text-white bg-purple shadow-lg p-3 bg-white rounded mb-5">
 21        <img class="me-3" src="images/subscriptions.png" alt="Subscriptions" width="58" height="38">
 22        <div class="col-xxl-12 lh-1">
 23            <h1 class="display-3 font-weight-bold mb-0 text-primary" style="margin-left: 10px;">My Subscriptions</h1>
 24
 25            <h2 class="col-xxl-12 d-flex flex-row-reverse" style="margin-left: -75px; margin-top: -60px; border: none;">
 26                <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save"
 27                    class="btn btn-lg btn-outline-primary"
 028                    @onclick="(() => ModalShow())"
 29                    Color="Color.Primary" ButtonType="MudBlazor.ButtonType.Button">
 030                        @Title Membership
 31                </MudButton>
 32            </h2>
 33        </div>
 34    </div>
 35
 036    @if (showModal)
 037    {
 38        <div class="modal fade show" id="myModal" style="display:block; margin-top: 125px; margin-left: -100px;" aria-mo
 39            <div class="modal-dialog">
 40                <div class="modal-content" style="width: 900px;">
 41                    <div class="modal-header d-flex justify-content-center">
 042                        <h3 class="modal-title">@Title Music Membership</h3>
 43                    </div>
 44
 45                    <div class="modal-body">
 46                        <h4 class="text-center align-items-center">What type of membership do you want to choose?</h4>
 47
 48                        <div class="container py-3">
 49                            <main>
 50                                <div class="row row-cols-1 row-cols-md-3 mb-3 text-center">
 051                                    @if (subscriptions.Count == 0)
 052                                    {
 53                                        <div class="col" style="">
 54                                            <div class="card mb-4 rounded-3 shadow-sm">
 55                                                <div class="card-body">
 56                                                    <h4 class="card-title pricing-card-title">
 57                                                        No subscription found...
 58                                                    </h4>
 59                                                </div>
 60                                            </div>
 61                                        </div>
 062                                    }
 063                                    @foreach (var subscription in subscriptions)
 064                                    {
 65                                        <div class="col" style="">
 66                                            <div class="card mb-4 rounded-3 shadow-sm">
 67                                                <div class="card-header py-3">
 068                                                    <h4 class="my-0 fw-normal">@subscription.Name</h4>
 69                                                </div>
 70                                                <div class="card-body">
 71                                                    <h1 class="card-title pricing-card-title">
 072                                                        <small class="text-muted fw-light">@subscription.CurrencySymbol 
 73                                                    </h1>
 74                                                    <ul class="list-unstyled mt-3 mb-4">
 075                                                        @foreach (var item in subscription.Options.Split(","))
 076                                                        {
 077                                                            <li>@item</li>
 078                                                        }
 79                                                    </ul>
 80                                                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Fille
 81                                                        Color="Color.Success"
 082                                                       @onclick="(async () => { await ActivateMembership(subscription); 
 083                                                            @Title @subscription.Name Plan
 84                                                    </MudButton>
 85                                                </div>
 86                                            </div>
 87                                        </div>
 088                                    }
 089                                    @if (MembershipAccess > 0)
 090                                    {
 91                                        <div class="col-md-12">
 092                                            <h4>Your current pricing plan is: @subscriptionActive.SubscriptionName Subsc
 93                                        </div>
 094                                    }
 95                                </div>
 96                            </main>
 97                        </div>
 98                    </div>
 99
 100                    <div class="modal-footer">
 101                        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel"
 102                            Color="Color.Warning" @onclick="@ModalCancel">
 103                                Cancel
 104                        </MudButton>
 105                    </div>
 106                </div>
 107            </div>
 108        </div>
 0109    }
 110
 111    <h4 class="display-6 fw-bold lh-1 mb-3 d-flex justify-content-start">Current Active Subscription</h4>
 0112    @if (subscriptionActive.Id > 0)
 0113    {
 114        <div class="container col-xxl-12 shadow-lg p-3 bg-white rounded mb-3">
 115            <div class="row flex-lg-row align-items-center">
 116                <div class="col-md-3">
 117                    <img src="images/@subscriptionActive.ImagePath" class="d-block img-fluid" alt="@subscriptionActive.I
 118                </div>
 119
 120                <div class="col-md-6" style="margin-left: -90px;">
 0121                    <h4 class="display-6 fw-bold lh-1 mb-3">@subscriptionActive.SubscriptionName Subscription</h4>
 122                    <div class="col-md-10">
 0123                        <p class="lead">Subscription Started: @subscriptionActive.DateStart.ToString("dd/MM/yyyy HH:mm t
 124                    </div>
 125                    <div class="col-md-10">
 0126                        <p class="lead">Subscription Period End: @subscriptionActive.CurrentPeriodEnd.ToString("dd/MM/yy
 127                    </div>
 128                </div>
 129
 130                <div class="col-md-3" style="margin-left: 50px;">
 131                    <div class="border-0">
 0132                        <button class="btn btn-danger btn-lg" @onclick="(async () => { await CancelMembership(subscripti
 133                            Cancel
 134                        </button>
 135                        <a href="@subscriptionActive.HostedInvoiceUrl" target="_blank" class="btn btn-primary btn-lg" ro
 136                            View Receipt
 137                        </a>
 138                    </div>
 139                </div>
 140            </div>
 141        </div>
 0142    }
 143    else
 0144    {
 145        <div class="container col-xxl-12 shadow-lg p-3 bg-white rounded mb-3">
 146            <div class="row flex-lg-row align-items-center">
 147                <div class="text-center">
 148                    <h4 class="display-6 fw-bold lh-1 mb-3">Currently, No Subscription is Activated</h4>
 149                </div>
 150            </div>
 151        </div>
 0152    }
 153
 154    <div class="row mt-4 mb-5">
 155        <div class="input-group col shadow-lg p-3 bg-white rounded">
 156            <MudTextField InputType="InputType.Text" class="form-control"
 157                Immediate="true" Variant="Variant.Outlined" Placeholder="Search subscription by name"
 158                @bind-Value="SearchString" OnKeyUp="FilterSubscriptions" />
 159            <div class="input-group-append" style="margin-left: 15px;">
 160                <button class="btn btn-primary btn-lg" @onclick="ResetSearch">
 161                    <i class="fas fa-times"></i>
 162                    Reset Filter
 163                </button>
 164            </div>
 165        </div>
 166    </div>
 167
 168    <h4 class="display-6 fw-bold lh-1 mb-3 d-flex justify-content-start">Inactive Subscriptions</h4>
 0169    @if (subscriptionsInactive.Count > 0)
 0170    {
 0171        @foreach (var subscription in subscriptionsInactive)
 0172        {
 173            <div class="container col-xxl-12 shadow-lg p-3 bg-white rounded mb-3">
 174                <div class="row flex-lg-row align-items-center">
 175                    <div class="col-md-3">
 176                        <img src="images/@subscription.ImagePath" class="d-block img-fluid" alt="@subscription.ImageName
 177                    </div>
 178
 179                    <div class="col-md-6" style="margin-left: -90px;">
 0180                        <h4 class="display-6 fw-bold lh-1 mb-3">@subscription.SubscriptionName Subscription</h4>
 181                        <div class="col-md-10">
 0182                            <p class="lead">Subscription Started: @subscription.DateStart.ToString("dd/MM/yyyy HH:mm tt"
 183                        </div>
 184                        <div class="col-md-10">
 0185                            <p class="lead">Subscription Period End: @subscription.CurrentPeriodEnd.ToString("dd/MM/yyyy
 186                        </div>
 187                    </div>
 188
 189                    <div class="col-md-3">
 190                        <div class="border-0 d-flex flex-row-reverse">
 191                            <a href="@subscription.HostedInvoiceUrl" target="_blank" class="btn btn-primary btn-lg" role
 192                                View Receipt
 193                            </a>
 194                        </div>
 195                    </div>
 196                </div>
 197            </div>
 0198        }
 0199    }
 200    else
 0201    {
 202        <div class="container col-xxl-12 shadow-lg p-3 bg-white rounded mb-3">
 203            <div class="row flex-lg-row align-items-center">
 204                <div class="text-center">
 205                    <h4 class="display-6 fw-bold lh-1 mb-3">The user does not have any past subscription.</h4>
 206                </div>
 207            </div>
 208        </div>
 0209    }
 210</main>
 211
 212@code {
 0213    bool showModal = false;
 214
 0215    void ModalShow() => showModal = true;
 0216    void ModalCancel() => showModal = false;
 0217    void ModalOk() => showModal = false;
 218
 0219    private int MembershipAccess = 0;
 0220    private string Title = "Activate";
 221
 0222    private int UserId { get; set; }
 0223    private string? UserEmail { get; set; }
 224
 0225    private List<SubscriptionResponse> subscriptions = new();
 226
 0227    protected string? SearchString { get; set; } = string.Empty;
 0228    private SubscriberResponse subscriptionActive = new();
 229
 0230    private List<SubscriberResponse> subscriptionsInactive = new();
 0231    protected List<SubscriberResponse> searchSubscriptionsInactive = new();
 232
 0233    public void Dispose() => Interceptor.DisposeEvent();
 234
 235    /// <summary>
 236    /// Initialize the component on load.
 237    /// </summary>
 238    protected override async Task OnInitializedAsync()
 0239    {
 0240        Interceptor.RegisterEvent();
 0241        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 0242        var user = authstate.User;
 243
 0244        if (!user.Identity.IsAuthenticated) return;
 0245        UserEmail = user?.Claims.FirstOrDefault(x => x.Type == StringRoleResources.EmailClaim).Value;
 0246        UserId = int.Parse(user?.Claims.FirstOrDefault(x => x.Type == StringRoleResources.UserIdClaim).Value);
 247
 0248        await GetUserSubscriptions(UserId);
 0249        await GetActveSubscription(UserId);
 0250        await GetSubscriptions();
 0251    }
 252
 253    /// <summary>
 254    /// Getting the subscriptions.
 255    /// </summary>
 256    protected async Task GetSubscriptions()
 0257    {
 0258        subscriptions = await SubscriptionService.GetSubscriptions();
 0259    }
 260
 261    /// <summary>
 262    /// Get the active subscription.
 263    /// </summary>
 264    public async Task GetActveSubscription(int userId)
 0265    {
 0266        subscriptionActive = await SubscriberService.GetUserSubscriber(userId);
 0267        if (DateTime.Now <= subscriptionActive.CurrentPeriodEnd && subscriptionActive.Id > 0)
 0268        {
 0269            MembershipAccess = subscriptionActive.SubscriptionId;
 0270            Title = "Update";
 0271        }
 0272    }
 273
 274    /// <summary>
 275    /// Cancel the membership.
 276    /// </summary>
 277    public async Task CancelMembership(string stripeSubscriptionCreationId)
 0278    {
 0279        await StripeService.CancelMembership(stripeSubscriptionCreationId);
 0280        await GetUserSubscriptions(UserId);
 0281        await GetActveSubscription(UserId);
 0282        MembershipAccess = 0;
 0283        Title = "Activate";
 0284    }
 285
 286    /// <summary>
 287    /// Get the user subscriptions.
 288    /// </summary>
 289    public async Task GetUserSubscriptions(int userId)
 0290    {
 0291        subscriptionsInactive = await SubscriberService.GetUserAllSubscribers(userId);
 0292        searchSubscriptionsInactive = subscriptionsInactive;
 0293    }
 294
 295    /// <summary>
 296    /// Activate the membership.
 297    /// </summary>
 298    private async Task ActivateMembership(SubscriptionResponse subscription)
 0299    {
 0300        var subscriberObj = new SubscriberResponse
 0301        {
 0302            DateStart = DateTime.Now,
 0303            CurrentPeriodEnd = DateTime.Now.AddDays(30),
 0304            CustomerId = UserId,
 0305            SubscriptionId = subscription.Id,
 0306            StripeSubscriptionId = subscription.StripeSubscriptionId
 0307        };
 0308        await SubscriberService.AddSubscriber(subscriberObj);
 309
 0310        if (MembershipAccess == 0)
 0311        {
 0312            var response = await HttpClient.PostAsJsonAsync("Payments/create-subscription", subscriberObj);
 0313            var subscriptionCheckoutUrl = await response.Content.ReadAsStringAsync();
 0314            NavManager.NavigateTo(subscriptionCheckoutUrl, forceLoad: true);
 0315        }
 316        else
 0317        {
 0318            subscriberObj.Id = 1;
 0319            subscriberObj.StripeSubscriberSubscriptionId = subscriptionActive.StripeSubscriberSubscriptionId;
 320
 0321            var response = await HttpClient.PostAsJsonAsync("Payments/update-subscription", subscriberObj);
 0322            var subscriptionCheckoutUrl = await response.Content.ReadAsStringAsync();
 0323            NavManager.NavigateTo(subscriptionCheckoutUrl, forceLoad: true);
 0324        }
 0325    }
 326
 327    /// <summary>
 328    /// Filter the subscriptions.
 329    /// </summary>
 330    protected void FilterSubscriptions()
 0331    {
 0332        if (!string.IsNullOrEmpty(SearchString))
 0333        {
 0334            subscriptionsInactive = searchSubscriptionsInactive.Where(x => x.SubscriptionName.IndexOf(SearchString, Stri
 0335        }
 336        else
 0337        {
 0338            subscriptionsInactive = searchSubscriptionsInactive;
 0339        }
 0340    }
 341
 342    /// <summary>
 343    /// Reset the search filter.
 344    /// </summary>
 345    public void ResetSearch()
 0346    {
 0347        SearchString = string.Empty;
 0348        subscriptionsInactive = searchSubscriptionsInactive;
 0349    }
 350}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_NavMenu.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_NavMenu.html deleted file mode 100644 index 63827920..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_NavMenu.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Shared.NavMenu - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Shared.NavMenu
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Shared\NavMenu.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:129
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:2
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
get_NavMenuCssClass()0%20%
ToggleNavMenu()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Shared\NavMenu.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="NavMenu.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7<div class="top-row ps-3 navbar navbar-dark">
 8    <div class="container-fluid">
 9        <a class="navbar-brand" href="">Blazor Shop</a>
 10        <button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
 11            <span class="navbar-toggler-icon"></span>
 12        </button>
 13    </div>
 14</div>
 15
 16<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
 17    <nav class="flex-column">
 18        <div class="nav-item px-3">
 19            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
 20                <span class="oi oi-home" aria-hidden="true"></span> Home
 21            </NavLink>
 22        </div>
 23
 24        <AuthorizeView>
 25            <Authorized>
 26                <div class="nav-item px-3">
 27                    <NavLink class="nav-link" href="profile">
 28                        <span class="oi oi-list-rich" aria-hidden="true"></span> User Profile
 29                    </NavLink>
 30                </div>
 31            </Authorized>
 32        </AuthorizeView>
 33
 34        <AuthorizeView Policy="Customer">
 35            <Authorized>
 36                <div class="nav-item px-3">
 37                    <NavLink class="nav-link" href="musics">
 38                        <span class="oi oi-list-rich" aria-hidden="true"></span> Musics
 39                    </NavLink>
 40                    <NavLink class="nav-link" href="clothes">
 41                        <span class="oi oi-list-rich" aria-hidden="true"></span> Clothes Shop
 42                    </NavLink>
 43                    <NavLink class="nav-link" href="orders">
 44                        <span class="oi oi-list-rich" aria-hidden="true"></span> My Orders
 45                    </NavLink>
 46                    <NavLink class="nav-link" href="receipts">
 47                        <span class="oi oi-list-rich" aria-hidden="true"></span> My Receipts
 48                    </NavLink>
 49                    <NavLink class="nav-link" href="subscriptions">
 50                        <span class="oi oi-list-rich" aria-hidden="true"></span> My Subscriptions
 51                    </NavLink>
 52                </div>
 53            </Authorized>
 54        </AuthorizeView>
 55
 56        <AuthorizeView Policy="Default">
 57            <Authorized>
 58                <div class="nav-item px-3">
 59                    <NavLink class="nav-link" href="counter">
 60                        <span class="oi oi-list-rich" aria-hidden="true"></span> Counter
 61                    </NavLink>
 62                </div>
 63            </Authorized>
 64        </AuthorizeView>
 65
 66        <AuthorizeView Policy="Admin">
 67            <Authorized>
 68                <div class="nav-item px-3">
 69                    <NavLink class="nav-link" href="admin/users">
 70                        <span class="oi oi-list-rich" aria-hidden="true"></span> Users
 71                    </NavLink>
 72                </div>
 73                <div class="nav-item px-3">
 74                    <NavLink class="nav-link" href="admin/roles">
 75                        <span class="oi oi-list-rich" aria-hidden="true"></span> Roles
 76                    </NavLink>
 77                </div>
 78                <div class="nav-item px-3">
 79                    <NavLink class="nav-link" href="admin/clothes">
 80                        <span class="oi oi-list-rich" aria-hidden="true"></span> Clothes
 81                    </NavLink>
 82                </div>
 83                <div class="nav-item px-3">
 84                    <NavLink class="nav-link" href="admin/musics">
 85                        <span class="oi oi-list-rich" aria-hidden="true"></span> Musics
 86                    </NavLink>
 87                </div>
 88                <div class="nav-item px-3">
 89                    <NavLink class="nav-link" href="admin/subscribers">
 90                        <span class="oi oi-list-rich" aria-hidden="true"></span> Subscribers
 91                    </NavLink>
 92                </div>
 93                <div class="nav-item px-3">
 94                    <NavLink class="nav-link" href="admin/subscriptions">
 95                        <span class="oi oi-list-rich" aria-hidden="true"></span> Subscriptions
 96                    </NavLink>
 97                </div>
 98                <div class="nav-item px-3">
 99                    <NavLink class="nav-link" href="admin/todo">
 100                        <span class="oi oi-list-rich" aria-hidden="true"></span> Todos
 101                    </NavLink>
 102                </div>
 103            </Authorized>
 104        </AuthorizeView>
 105
 106        <AuthorizeView>
 107            <Authorized>
 108                <div class="col-md-2 nav-item px-3" style=" position: fixed; bottom: 0;">
 109                    <NavLink class="nav-link" href="logout">
 110                        <span class="oi oi-account-logout" aria-hidden="true"></span> Logout
 111                    </NavLink>
 112                </div>
 113            </Authorized>
 114        </AuthorizeView>
 115    </nav>
 116</div>
 117
 118@code {
 0119    private bool collapseNavMenu = true;
 0120    private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
 121
 122    /// <summary>
 123    /// .
 124    /// </summary>
 125    private void ToggleNavMenu()
 0126    {
 0127        collapseNavMenu = !collapseNavMenu;
 0128    }
 129}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Not_found.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Not_found.html deleted file mode 100644 index 68ed45fe..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Not_found.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Internal.Not_found - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Internal.Not_found
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Internal\Not-found.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:3
Coverable lines:3
Total lines:28
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
OnInitializedAsync()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Internal\Not-found.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="not-found.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/not-found"
 8
 9@inject AuthenticationStateProvider AuthStateProvider
 10@inject IAuthenticationService AuthService
 11@inject NavigationManager NavManager
 12
 13<h3 class="mb-3">Not Found</h3>
 14
 15<div class="d-flex justify-content-center" style="margin-top: 100px;">
 16    <h4 style="font-size: 45px;"><em>The requested resource was not found....</em></h4>
 17</div>
 18
 19@code {
 20
 21    /// <summary>
 22    /// Initialize the component on load.
 23    /// </summary>
 24    protected override async Task OnInitializedAsync()
 025    {
 026        await this.AuthService.Logout();
 027    }
 28}
-
-
-
-
-

Methods/Properties

-OnInitializedAsync()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderService.html deleted file mode 100644 index eaa94050..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderService.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.OrderService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.OrderService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\OrderService.cs
-
-
-
-
-
-
-
Line coverage
-
-
7%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:71
Coverable lines:77
Total lines:135
Line coverage:7.7%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:14
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
GetOrders()0%40%
GetOrder()0%40%
AddOrder()0%20%
UpdateOrder()0%20%
DeleteOrder()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\OrderService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="OrderService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IOrderService"/>.
 9    /// </summary>
 10    public class OrderService : IOrderService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="OrderService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 517        public OrderService(HttpClient httpClient, ISnackbar snackBar)
 518        {
 519            this.HttpClient = httpClient;
 520            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 521            this.SnackBar = snackBar;
 522        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<List<OrderResponse>> GetOrders(string userEmail)
 041        {
 042            var response = await this.HttpClient.GetAsync($"Orders/orders/{userEmail}");
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<Result<OrderResponse>>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51
 052            return !response.IsSuccessStatusCode
 053                ? null
 054                : result.Items;
 055        }
 56
 57        /// <inheritdoc/>
 58        public async Task<OrderResponse> GetOrder(int id, string userEmail)
 059        {
 060            var response = await this.HttpClient.GetAsync($"Orders/order/{id}/{userEmail}");
 061            var responseResult = await response.Content.ReadAsStringAsync();
 062            var result = JsonSerializer.Deserialize<Result<OrderResponse>>(
 063                responseResult, this.Options);
 64
 065            if (response.IsSuccessStatusCode == false)
 066            {
 067                this.SnackBar.Add(result.Error, Severity.Error);
 068            }
 69
 070            return !response.IsSuccessStatusCode
 071                ? null
 072                : result.Item;
 073        }
 74
 75        /// <inheritdoc/>
 76        public async Task<RequestResponse> AddOrder(OrderResponse order)
 077        {
 078            var response = await this.HttpClient.PostAsJsonAsync("Orders/order", order);
 079            var responseResult = await response.Content.ReadAsStringAsync();
 080            var result = JsonSerializer.Deserialize<RequestResponse>(
 081                responseResult, this.Options);
 82
 083            if (response.IsSuccessStatusCode == false)
 084            {
 085                this.SnackBar.Add(result.Error, Severity.Error);
 086            }
 87            else
 088            {
 089                this.SnackBar.Add("The Order was added.", Severity.Success);
 090            }
 91
 092            return result;
 093        }
 94
 95        /// <inheritdoc/>
 96        public async Task<RequestResponse> UpdateOrder(OrderResponse order)
 097        {
 098            var response = await this.HttpClient.PutAsJsonAsync("Orders/order", order);
 099            var responseResult = await response.Content.ReadAsStringAsync();
 0100            var result = JsonSerializer.Deserialize<RequestResponse>(
 0101                responseResult, this.Options);
 102
 0103            if (response.IsSuccessStatusCode == false)
 0104            {
 0105                this.SnackBar.Add(result.Error, Severity.Error);
 0106            }
 107            else
 0108            {
 0109                this.SnackBar.Add("The Order was updated.", Severity.Success);
 0110            }
 111
 0112            return result;
 0113        }
 114
 115        /// <inheritdoc/>
 116        public async Task<RequestResponse> DeleteOrder(int id)
 0117        {
 0118            var response = await this.HttpClient.DeleteAsync($"Orders/order/{id}");
 0119            var responseResult = await response.Content.ReadAsStringAsync();
 0120            var result = JsonSerializer.Deserialize<RequestResponse>(
 0121                responseResult, this.Options);
 122
 0123            if (response.IsSuccessStatusCode == false)
 0124            {
 0125                this.SnackBar.Add(result.Error, Severity.Error);
 0126            }
 127            else
 0128            {
 0129                this.SnackBar.Add("The Order was deleted.", Severity.Success);
 0130            }
 131
 0132            return result;
 0133        }
 134    }
 135}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderSuccess.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderSuccess.html deleted file mode 100644 index 001691d3..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderSuccess.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Orders.OrderSuccess - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Orders.OrderSuccess
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Orders\OrderSuccess.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:88
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:2
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Message()100%10%
Dispose()100%10%
OnInitialized()100%10%
OnParametersSet()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Orders\OrderSuccess.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="OrderSuccess.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/order-success/{Message}"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject NavigationManager NavManager
 12@inject HttpInterceptorService Interceptor
 13
 14<h3 class="text-center" style="margin-top: 30px;">Order Successful Made</h3>
 15
 16<div class="container-card mt-3">
 17    <div class="card">
 18        <div style="border-radius:200px; height:200px; width:200px; background: #F8FAF5; margin:0 auto;">
 19            <i class="i checkmark">✓</i>
 20        </div>
 21        <h1 class="h1-custom">Success</h1>
 22        <p class="p">We thank you for your purchase!</p>
 23    </div>
 24</div>
 25
 26@code {
 27    [Parameter]
 028    public string Message { get; set; }
 29
 030    public void Dispose() => Interceptor.DisposeEvent();
 31
 32    /// <summary>
 33    /// Initialize the component on load.
 34    /// </summary>
 35    protected override void OnInitialized()
 036    {
 037        Interceptor.RegisterEvent();
 038    }
 39
 40    /// <summary>
 41    /// Initialize the component using the parameter.
 42    /// </summary>
 43    protected override void OnParametersSet()
 044    {
 045        if (!Message.Equals("success-made"))
 046        {
 047            NavManager.NavigateTo("orders");
 048        }
 049    }
 50}
 51
 52<style>
 53    .container-card {
 54        text-align: center;
 55        padding: 40px 0;
 56    }
 57
 58    .h1-custom {
 59        color: #88B04B;
 60        font-family: "Nunito Sans", "Helvetica Neue", sans-serif;
 61        font-weight: 900;
 62        font-size: 40px;
 63        margin-bottom: 10px;
 64    }
 65
 66    .p {
 67        color: #404F5E;
 68        font-family: "Nunito Sans", "Helvetica Neue", sans-serif;
 69        font-size:20px;
 70        margin: 0;
 71    }
 72
 73    .i {
 74        color: #9ABC66;
 75        font-size: 100px;
 76        line-height: 200px;
 77        margin-left:-15px;
 78    }
 79
 80    .card {
 81        background: white;
 82        padding: 60px;
 83        border-radius: 4px;
 84        box-shadow: 0 2px 3px #C8D0D8;
 85        display: inline-block;
 86        margin: 0 auto;
 87    }
 88</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderView.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderView.html deleted file mode 100644 index 2ecd84b4..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_OrderView.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Orders.OrderView - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Orders.OrderView
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Orders\OrderView.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:44
Coverable lines:44
Total lines:141
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
get_Id()100%10%
get_UserEmail()100%10%
.ctor()100%10%
Dispose()100%10%
OnInitializedAsync()0%20%
OnParametersSetAsync()0%20%
GoBack()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Orders\OrderView.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="OrderView.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/orders/view/{Id:int}"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject IOrderService OrderService
 13@inject NavigationManager NavManager
 14@inject HttpInterceptorService Interceptor
 15
 016@if (order.Id > 0)
 017{
 18    <section>
 19        <div class="container py-5">
 20            <div class="row d-flex justify-content-center align-items-center">
 21                <div class="w-75 col-lg-8 col-xl-6">
 22                    <div class="card border-top border-bottom border-3" style="border-color: #f37a27 !important;">
 23                        <div class="card-body p-5">
 24                            <p class="lead fw-bold mb-5" style="color: #f37a27;">View Order Details</p>
 25                            <div class="row">
 26                                <div class="col mb-3">
 027                                    <p class="small text-muted mb-1">@order.OrderDate</p>
 28                                </div>
 29                                <div class="col mb-3">
 030                                    <p class="small text-muted mb-1">@order.OrderName</p>
 31                                </div>
 32                            </div>
 33
 34                            <div class="px-5" style="background-color: #f2f2f2;">
 35                                <div class="row">
 36                                    <div class="mt-2 text-primary col-md-4 col-lg-6">
 37                                        <p>Name</p>
 38                                    </div>
 39                                    <div class="mt-2 text-primary col-md-4 col-lg-3">
 40                                        <p>AmountTotal</p>
 41                                    </div>
 42                                    <div class="mt-2 text-primary col-md-4 col-lg-3">
 43                                        <p>Quantity</p>
 44                                    </div>
 45                                </div>
 46                            </div>
 47
 048                            @if (orderItems.Count > 0)
 049                            {
 050                                @foreach (var item in orderItems)
 051                                {
 52                                    <div class="px-5" style="background-color: #f2f2f2;">
 53                                        <div class="row">
 54                                            <div class="col-md-4 col-lg-6">
 055                                                <p>@item.Name</p>
 56                                            </div>
 57                                            <div class="col-md-4 col-lg-3">
 058                                                <p>@item.AmountTotal</p>
 59                                            </div>
 60                                            <div class="col-md-4 col-lg-3">
 061                                                <p>@item.Quantity</p>
 62                                            </div>
 63                                        </div>
 64                                    </div>
 065                                }
 066                            }
 67                            else
 068                            {
 69                                <div class="px-5" style="background-color: #f2f2f2;">
 70                                    <div class="row">
 71                                        <div class="col-md-4 col-lg-6">
 72                                            <p>No order items found</p>
 73                                        </div>
 74                                    </div>
 75                                </div>
 076                            }
 77
 78                            <div class="row my-4">
 79                                <div class="col-md-8 offset-lg-4">
 080                                    <p class="col-md-6lead fw-bold mb-0 mr-2" style="color: #f37a27;">Total Amount Paid:
 81                                </div>
 82                            </div>
 83                        </div>
 84                    </div>
 85                </div>
 86            </div>
 87        </div>
 88    </section>
 089}
 90else
 091{
 92    <div class="d-flex justify-content-center" style="margin-top: 150px;">
 93        <h4 style="font-size: 45px;">No record found</h4>
 94    </div>
 095}
 96
 97@code {
 98    [Parameter]
 099    public int Id { get; set; }
 100
 0101    protected string UserEmail { get; set; }
 0102    protected OrderResponse order = new();
 0103    protected List<InvoiceResponse> orderItems = new();
 104
 0105    public void Dispose() => Interceptor.DisposeEvent();
 106
 107    /// <summary>
 108    /// Initialize the component on load.
 109    /// </summary>
 110    protected override async Task OnInitializedAsync()
 0111    {
 0112        Interceptor.RegisterEvent();
 0113        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 0114        var user = authstate.User;
 0115        if (!user.Identity.IsAuthenticated) return;
 0116        UserEmail = user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.EmailClaim).Value;
 0117    }
 118
 119    /// <summary>
 120    /// Initialize the component using the parameter.
 121    /// </summary>
 122    protected override async Task OnParametersSetAsync()
 0123    {
 0124        if (Id != 0)
 0125        {
 0126            order = await OrderService.GetOrder(Id, UserEmail);
 0127            orderItems = JsonSerializer.Deserialize<List<InvoiceResponse>>(
 0128                order.LineItems,
 0129                new JsonSerializerOptions { PropertyNameCaseInsensitive = true }
 0130            );
 0131        }
 0132    }
 133
 134    /// <summary>
 135    /// Going to previous page.
 136    /// </summary>
 137    private void GoBack()
 0138    {
 0139        NavManager.NavigateTo("/orders");
 0140    }
 141}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Profile.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Profile.html deleted file mode 100644 index 1d8f245e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Profile.html +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.User.Profile - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.User.Profile
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\User\Profile.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:60
Coverable lines:60
Total lines:272
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:32
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%20%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
Dispose()100%10%
OnInitializedAsync()0%20%
UpdateUserEmail()0%20%
UpdateUser()0%20%
ChangePassword()0%60%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\User\Profile.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Profile.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/profile"
 8
 9@attribute [Authorize]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject IUserService UserService
 13@inject IAccountService AccountService
 14@inject HttpInterceptorService Interceptor
 15
 16<h1>User Profile</h1>
 17
 18<div class="container rounded bg-white">
 19    <div class="row">
 20        <div class="col-md-2 border-right ml-2 mt-3">
 21            <div class="d-flex flex-column align-items-center text-center p-3 p-5">
 22                <img class="rounded-circle" width="150px" src="images/user-profile.png">
 023                <span class="font-weight-bold" style="margin-top: 10px;">@userData.Username</span>
 24            </div>
 25        </div>
 26        <div class="col-md-3 border-right">
 27            <div class="d-flex flex-column p-3 py-5" style="margin-top: 55px; margin-left: 50px;">
 028                <p class="font-weight-bold">FirstName : @userData.FirstName</p>
 029                <p class="font-weight-bold">LastName : @userData.LastName</p>
 030                <p class="font-weight-bold">Email : @userData.Email</p>
 31                <span></span>
 32            </div>
 33        </div>
 34        <div class="col-md-3 border-right" style="margin-left: 50px; border: 5px dashed red;">
 35             <h4 class="text-right text-danger">DANGER ZONE</h4>
 36            <div class="d-flex flex-column p-3 py-5" style="margin-top: 55px; margin-left: 50px;">
 37                <div class="d-flex justify-content-between align-items-center mb-3">
 038                    <button class="btn btn-danger" @onclick="(() => { ModalShow(); })">
 39                        Change Email
 40                    </button>
 41                </div>
 42            </div>
 43        </div>
 44    </div>
 45
 46    <div class="row">
 47        <div class="col-md-5 border-right">
 48            <div class="p-3 py-5">
 49                <div class="d-flex justify-content-between align-items-center mb-3">
 50                    <h4 class="text-right">Profile Settings</h4>
 51                </div>
 52                <EditForm Model="@userData" OnValidSubmit="UpdateUser">
 53                    <FluentValidationValidator />
 54
 55                    <div class="row mt-3">
 56                        <div class="mb-3">
 57                            <label for="FirstName" class="form-label">FirstName</label>
 58                            <div class="col-md-12">
 59                                <InputText class="form-control form-control-lg" type="text" placeholder="First Name" @bi
 60                            </div>
 061                            @if (context.GetValidationMessages().Any(x => x.ToLower().Contains("firstname")))
 62                            {
 63                                <div class="mt-1 alert alert-danger" role="alert">
 64                                    <ValidationMessage For="@(() => userData.FirstName)" />
 65                                </div>
 66                            }
 67                        </div>
 68                        <div class="mb-3">
 69                            <label for="LastName" class="form-label">LastName</label>
 70                            <div class="col-md-12">
 71                                <InputText class="form-control form-control-lg" type="text" placeholder="Last Name" @bin
 72                            </div>
 073                            @if (context.GetValidationMessages().Any(x => x.ToLower().Contains("lastname")))
 74                            {
 75                                <div class="mt-1 alert alert-danger" role="alert">
 76                                    <ValidationMessage For="@(() => userData.LastName)" />
 77                                </div>
 78                            }
 79                        </div>
 80                        <div class="mb-3">
 81                            <label for="Email" class="form-label">Email</label>
 82                            <div class="col-md-12">
 83                                <InputText class="form-control form-control-lg" type="email" placeholder="Email" Disable
 84                            </div>
 085                            @if (context.GetValidationMessages().Any(x => x.ToLower().Contains("email")))
 86                            {
 87                                <div class="mt-1 alert alert-danger" role="alert">
 88                                    <ValidationMessage For="@(() => userData.Email)" />
 89                                </div>
 90                            }
 91                        </div>
 92                    </div>
 93                    <div class="text-center">
 94                        <button class="btn btn-primary profile-button" type="submit">Save Changes</button>
 95                    </div>
 96                </EditForm>
 97            </div>
 98        </div>
 99
 100        <div class="col-md-4" style="margin-left: 35px; margin-top: -10px;">
 101            <div class="p-3 py-5">
 102                <div class="d-flex justify-content-between align-items-center">
 103                    <h4 class="text-right">Change Password</h4>
 104                </div>
 105                <br/>
 106                <EditForm Model="@changePassword" OnValidSubmit="ChangePassword">
 107                    <FluentValidationValidator />
 108
 109                    <div class="mb-3">
 110                        <label for="OldPassword" class="form-label">Old Password</label>
 111                        <div class="col-md-12">
 112                            <InputText class="form-control form-control-lg" type="password" placeholder="Password" @bind
 113                        </div>
 0114                        @if (context.GetValidationMessages().Any(x => x.ToLower().Contains("oldpassword")))
 115                        {
 116                            <div class="mt-1 alert alert-danger" role="alert">
 117                                <ValidationMessage For="@(() => changePassword.OldPassword)" />
 118                            </div>
 119                        }
 120                    </div>
 121                    <div class="mb-3">
 122                        <label for="NewPassword" class="form-label">New Password</label>
 123                        <div class="col-md-12">
 124                            <InputText class="form-control form-control-lg" type="password" placeholder="Password" @bind
 125                        </div>
 0126                        @if (context.GetValidationMessages().Any(x => x.ToLower().Contains("newpassword") && !x.ToLower(
 127                        {
 128                            <div class="mt-1 alert alert-danger" role="alert">
 129                                <ValidationMessage For="@(() => changePassword.NewPassword)" />
 130                            </div>
 131                        }
 132                    </div>
 133                    <div class="mb-3">
 134                        <label for="ConfirmNewPassword" class="form-label">Confirm New Password</label>
 135                        <div class="col-md-12">
 136                            <InputText class="form-control form-control-lg" type="password" placeholder="Confirm Passwor
 137                        </div>
 0138                        @if (context.GetValidationMessages().Any(x => x.ToLower().Contains("confirmnewpassword")))
 139                        {
 140                            <div class="mt-1 alert alert-danger" role="alert">
 141                                <ValidationMessage For="@(() => changePassword.ConfirmNewPassword)" />
 142                            </div>
 143                        }
 144                    </div>
 145                    <div class="text-center">
 146                        <button class="btn btn-primary profile-button" type="submit">Change Password</button>
 147                    </div>
 148                </EditForm>
 149            </div>
 150        </div>
 151    </div>
 152</div>
 153
 0154@if (showModal)
 0155{
 156    <div class="modal fade show" id="myModal" style="display:block; margin-top: 150px;" aria-modal="true" role="dialog">
 157        <div class="modal-dialog">
 158            <div class="modal-content">
 159                <div class="modal-header">
 160                    <h3 class="modal-title">Update Email</h3>
 161                </div>
 162                <EditForm Model="@updateEmail" OnValidSubmit="UpdateUserEmail">
 163                    <FluentValidationValidator />
 164
 165                    <div class="mb-3" style="margin-left: 15px;">
 166                        <label for="Email" class="form-label">Old Email</label>
 167                        <div class="col-md-10">
 168                            <InputText class="form-control form-control-lg" type="email" placeholder="Email" @bind-Value
 169                        </div>
 0170                        @if (context.GetValidationMessages().Any(x => x.ToLower().Contains("email") && !x.ToLower().Cont
 171                        {
 172                            <div class="mt-1 alert alert-danger" role="alert">
 173                                <ValidationMessage For="@(() => updateEmail.Email)" />
 174                            </div>
 175                        }
 176                   </div>
 177                    <div class="mb-3" style="margin-left: 15px;">
 178                        <label for="NewEmail" class="form-label">New Email</label>
 179                        <div class="col-md-10">
 180                            <InputText class="form-control form-control-lg" type="email" placeholder="New Email" @bind-V
 181                        </div>
 0182                        @if (context.GetValidationMessages().Any(x => x.ToLower().Contains("newemail")))
 183                        {
 184                            <div class="mt-1 alert alert-danger" role="alert">
 185                                <ValidationMessage For="@(() => updateEmail.NewEmail)" />
 186                            </div>
 187                        }
 188                    </div>
 189                </EditForm>
 190                <div class="modal-footer">
 191                    <button type="submit" class="btn btn-primary">
 192                        Update Email
 193                    </button>
 194                    <button type="button" class="btn btn-light" @onclick="@ModalCancel">Cancel</button>
 195                </div>
 196            </div>
 197        </div>
 198    </div>
 0199}
 200
 201@code {
 0202    bool showModal = false;
 0203    private int UserId = 0;
 204
 0205    void ModalShow() => showModal = true;
 0206    void ModalCancel() => showModal = false;
 207
 0208    protected UserResponse userData = new();
 0209    protected ChangePasswordCommand changePassword = new();
 0210    protected UpdateUserEmailCommand updateEmail = new();
 211
 0212    public void Dispose() => Interceptor.DisposeEvent();
 213
 214    /// <summary>
 215    /// Initialize the component on load.
 216    /// </summary>
 217    protected override async Task OnInitializedAsync()
 0218    {
 0219        Interceptor.RegisterEvent();
 0220        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 0221        var user = authstate.User;
 222
 0223        if (!user.Identity.IsAuthenticated) return;
 0224        UserId = int.Parse(user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.UserIdClaim).Value);
 225
 0226        userData = await UserService.GetUser(UserId);
 0227    }
 228
 229    /// <summary>
 230    /// Updating the user email.
 231    /// </summary>
 232    private async Task UpdateUserEmail()
 0233    {
 0234        showModal = true;
 235
 0236        updateEmail.UserId = UserId;
 0237        var result = await UserService.UpdateUserEmail(updateEmail);
 0238        if (result.Successful)
 0239        {
 0240            updateEmail = new();
 0241            showModal = false;
 0242        }
 0243    }
 244
 245    /// <summary>
 246    /// Updating the user.
 247    /// </summary>
 248    private async Task UpdateUser()
 0249    {
 0250        if (userData.Id != 0)
 0251        {
 0252            await UserService.UpdateUser(userData);
 0253        }
 0254    }
 255
 256    /// <summary>
 257    /// Changing the user password.
 258    /// </summary>
 259    private async Task ChangePassword()
 0260    {
 0261        if (
 0262            changePassword.OldPassword.Length > 6 &&
 0263            changePassword.NewPassword.Length > 6 &&
 0264            changePassword.NewPassword.Equals(changePassword.ConfirmNewPassword)
 0265            )
 0266        {
 0267            changePassword.UserId = UserId;
 0268            await AccountService.ChangePassword(changePassword);
 0269            changePassword = new();
 0270        }
 0271    }
 272}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Program.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Program.html deleted file mode 100644 index e170d6d8..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Program.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - -Program - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:Program
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Program.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:55
Coverable lines:55
Total lines:72
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
<Main>$()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Program.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Program.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5// The configurations for the blazor client web application.
 6try
 07{
 08    var builder = WebAssemblyHostBuilder.CreateDefault(args);
 9
 010    builder.RootComponents.Add<App>("#app");
 011    builder.RootComponents.Add<HeadOutlet>("head::after");
 12
 013    builder.Services.AddHttpClientInterceptor();
 014    builder.Services.AddScoped(sp =>
 015        new HttpClient
 016        {
 017            BaseAddress = new Uri("https://localhost:44351/api/"),
 018        }.EnableIntercept(sp));
 19
 020    builder.Services.AddBlazoredLocalStorage();
 021    builder.Services.AddBlazoredToast();
 022    builder.Services.AddOptions();
 023    builder.Services.AddMatBlazor();
 024    builder.Services.AddLoadingBar();
 025    builder.Services.AddMudServices();
 26
 027    builder.Services.AddSingleton<IJSInProcessRuntime>(services =>
 028        (IJSInProcessRuntime)services.GetRequiredService<IJSRuntime>());
 29
 030    builder.Services.AddScoped<SessionStorageService>();
 031    builder.Services.AddAuthorizationCore(config =>
 032    {
 033        config.AddPolicy(StringRoleResources.Customer, policy => policy.Requirements.Add(new CustomerRoleRequirement()))
 034
 035        config.AddPolicy(StringRoleResources.Admin, policy => policy.Requirements.Add(new AdminRoleRequirement(StringRol
 036        config.AddPolicy(StringRoleResources.User, policy => policy.Requirements.Add(new UserRoleRequirement(StringRoleR
 037        config.AddPolicy(StringRoleResources.Default, policy => policy.Requirements.Add(new DefaultRoleRequirement(Strin
 038    });
 39
 040    builder.Services.AddSingleton<IConfiguration>(builder.Configuration);
 41
 042    builder.Services.AddScoped<IAuthenticationService, AuthenticationService>();
 043    builder.Services.AddScoped<AuthenticationStateProvider, AuthStateProvider>();
 044    builder.Services.AddScoped<HttpInterceptorService>();
 45
 046    builder.Services.AddSingleton<IAuthorizationHandler, AdminRoleHandler>();
 047    builder.Services.AddSingleton<IAuthorizationHandler, UserRoleHandler>();
 048    builder.Services.AddSingleton<IAuthorizationHandler, DefaultRoleHandler>();
 049    builder.Services.AddSingleton<IAuthorizationHandler, CustomerRoleHandler>();
 50
 51    // Inject Services
 052    builder.Services.AddTransient<IClotheService, ClotheService>();
 053    builder.Services.AddTransient<ICartService, CartService>();
 054    builder.Services.AddTransient<IRoleService, RoleService>();
 055    builder.Services.AddTransient<IUserService, UserService>();
 056    builder.Services.AddTransient<IAccountService, AccountService>();
 057    builder.Services.AddTransient<IOrderService, OrderService>();
 058    builder.Services.AddTransient<IMusicService, MusicService>();
 059    builder.Services.AddTransient<IReceiptService, ReceiptService>();
 060    builder.Services.AddTransient<ISubscriptionService, SubscriptionService>();
 061    builder.Services.AddTransient<ISubscriberService, SubscriberService>();
 062    builder.Services.AddTransient<IStripeService, StripeService>();
 063    builder.Services.AddTransient<ITodoListService, TodoListService>();
 064    builder.Services.AddTransient<ITodoItemService, TodoItemService>();
 65
 066    builder.UseLoadingBar();
 067    await builder.Build().RunAsync();
 068}
 069catch (Exception ex)
 070{
 071    Log.Logger.Error(ex.Message);
 072}
-
-
-
-
-

Methods/Properties

-<Main>$()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ReceiptService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ReceiptService.html deleted file mode 100644 index 45a88cc9..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ReceiptService.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.ReceiptService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.ReceiptService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\ReceiptService.cs
-
-
-
-
-
-
-
Line coverage
-
-
7%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:71
Coverable lines:77
Total lines:135
Line coverage:7.7%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:14
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
GetReceipts()0%40%
GetReceipt()0%40%
AddReceipt()0%20%
UpdateReceipt()0%20%
DeleteReceipt()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\ReceiptService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="ReceiptService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IReceiptService"/>.
 9    /// </summary>
 10    public class ReceiptService : IReceiptService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="ReceiptService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 517        public ReceiptService(HttpClient httpClient, ISnackbar snackBar)
 518        {
 519            this.HttpClient = httpClient;
 520            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 521            this.SnackBar = snackBar;
 522        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<List<ReceiptResponse>> GetReceipts(string userEmail)
 041        {
 042            var response = await this.HttpClient.GetAsync($"Receipts/receipts/{userEmail}");
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<Result<ReceiptResponse>>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51
 052            return !response.IsSuccessStatusCode
 053                ? null
 054                : result.Items;
 055        }
 56
 57        /// <inheritdoc/>
 58        public async Task<ReceiptResponse> GetReceipt(int id, string userEmail)
 059        {
 060            var response = await this.HttpClient.GetAsync($"Receipts/receipt/{id}/{userEmail}");
 061            var responseResult = await response.Content.ReadAsStringAsync();
 062            var result = JsonSerializer.Deserialize<Result<ReceiptResponse>>(
 063                responseResult, this.Options);
 64
 065            if (response.IsSuccessStatusCode == false)
 066            {
 067                this.SnackBar.Add(result.Error, Severity.Error);
 068            }
 69
 070            return !response.IsSuccessStatusCode
 071                ? null
 072                : result.Item;
 073        }
 74
 75        /// <inheritdoc/>
 76        public async Task<RequestResponse> AddReceipt(ReceiptResponse receipt)
 077        {
 078            var response = await this.HttpClient.PostAsJsonAsync("Receipts/receipt", receipt);
 079            var responseResult = await response.Content.ReadAsStringAsync();
 080            var result = JsonSerializer.Deserialize<RequestResponse>(
 081                responseResult, this.Options);
 82
 083            if (response.IsSuccessStatusCode == false)
 084            {
 085                this.SnackBar.Add(result.Error, Severity.Error);
 086            }
 87            else
 088            {
 089                this.SnackBar.Add("The Receipt was added.", Severity.Success);
 090            }
 91
 092            return result;
 093        }
 94
 95        /// <inheritdoc/>
 96        public async Task<RequestResponse> UpdateReceipt(ReceiptResponse receipt)
 097        {
 098            var response = await this.HttpClient.PutAsJsonAsync("Receipts/receipt", receipt);
 099            var responseResult = await response.Content.ReadAsStringAsync();
 0100            var result = JsonSerializer.Deserialize<RequestResponse>(
 0101                responseResult, this.Options);
 102
 0103            if (response.IsSuccessStatusCode == false)
 0104            {
 0105                this.SnackBar.Add(result.Error, Severity.Error);
 0106            }
 107            else
 0108            {
 0109                this.SnackBar.Add("The Receipt was updated.", Severity.Success);
 0110            }
 111
 0112            return result;
 0113        }
 114
 115        /// <inheritdoc/>
 116        public async Task<RequestResponse> DeleteReceipt(int id)
 0117        {
 0118            var response = await this.HttpClient.DeleteAsync($"Receipts/receipt/{id}");
 0119            var responseResult = await response.Content.ReadAsStringAsync();
 0120            var result = JsonSerializer.Deserialize<RequestResponse>(
 0121                responseResult, this.Options);
 122
 0123            if (response.IsSuccessStatusCode == false)
 0124            {
 0125                this.SnackBar.Add(result.Error, Severity.Error);
 0126            }
 127            else
 0128            {
 0129                this.SnackBar.Add("The Receipt was deleted.", Severity.Success);
 0130            }
 131
 0132            return result;
 0133        }
 134    }
 135}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Receipts.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Receipts.html deleted file mode 100644 index db398592..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Receipts.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Receipts.Receipts - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Receipts.Receipts
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Receipts\Receipts.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:45
Coverable lines:45
Total lines:142
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
get_receiptsList()100%10%
get_searchReceiptsData()100%10%
get_SearchString()100%10%
get_userEmail()100%10%
Dispose()100%10%
OnInitializedAsync()0%20%
GetReceipts()100%10%
FilterReceipts()0%20%
ResetSearch()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Receipts\Receipts.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Receipts.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/receipts"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject AuthenticationStateProvider AuthStateProvider
 12@inject IReceiptService ReceiptService
 13@inject HttpInterceptorService Interceptor
 14
 15<main class="container">
 16    <div class="d-flex align-items-center p-3 my-3 text-white bg-purple shadow-lg p-3 bg-white rounded">
 17        <img class="me-3" src="images/receipts.png" alt="Receipts" width="100" height="100">
 18        <div class="lh-1">
 19            <h1 class="display-3 font-weight-bold mb-0 text-primary" style="margin-left: 30px;">My Receipts</h1>
 20        </div>
 21    </div>
 22
 23    <div class="row">
 24        <div class="input-group col shadow-lg p-3 bg-white rounded mb-5">
 25            <MudTextField InputType="InputType.Text" class="form-control"
 26                Immediate="true" Variant="Variant.Outlined" Placeholder="Search receipt by name"
 27                @bind-Value="SearchString" OnKeyUp="FilterReceipts" />
 28            <div class="input-group-append" style="margin-left: 15px;">
 29                <button class="btn btn-primary btn-lg" @onclick="ResetSearch">
 30                    <i class="fas fa-times"></i>
 31                    Reset Filter
 32                </button>
 33            </div>
 34        </div>
 35    </div>
 36
 037    @if (receiptsList is null)
 038    {
 39        <div class="d-flex justify-content-center" style="margin-top: 100px;">
 40            <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 41        </div>
 042    }
 43    else
 044    {
 045        @if (receiptsList.Count > 0)
 046        {
 047            @foreach (var receipt in receiptsList)
 048            {
 49                <div class="container col-xxl-12 shadow-lg p-3 bg-white rounded mb-3">
 50                    <div class="row flex-lg-row align-items-center">
 51                        <div class="col-md-3">
 52                            <img src="images/receipt.png" class="d-block img-fluid" alt="Receipt Image" width="80" heigh
 53                        </div>
 54
 55                        <div class="col-md-6" style="margin-left: -90px;">
 056                            <h5 class="display-8 fw-bold lh-1 mb-3">@receipt.ReceiptName</h5>
 57                            <div class="col-md-10">
 058                                <p class="lead">@receipt.ReceiptDate.ToString("dd/MM/yyyy HH:mm tt")</p>
 59                            </div>
 60                        </div>
 61
 62                        <div class="col-md-3">
 63                            <div class="border-0 d-flex flex-row-reverse mt-3">
 64                                <a href="@receipt.ReceiptUrl" target="_blank" class="btn btn-primary btn-lg" role="butto
 65                                    View Receipt
 66                                </a>
 67                            </div>
 68                        </div>
 69                    </div>
 70                </div>
 071            }
 072        }
 73        else
 074        {
 75            <div class="container col-xxl-12 shadow-lg p-3 bg-white rounded mb-3">
 76                <div class="row flex-lg-row align-items-center">
 77                    <div class="text-center">
 78                        <h4 class="display-6 fw-bold lh-1 mb-3">No record found...</h4>
 79                    </div>
 80                </div>
 81            </div>
 082        }
 083    }
 84</main>
 85
 86@code {
 087    private List<ReceiptResponse> receiptsList { get; set; }
 088    protected List<ReceiptResponse> searchReceiptsData { get; set; }
 89
 090    protected string SearchString { get; set; } = string.Empty;
 091    private string userEmail { get; set; }
 92
 093    public void Dispose() => Interceptor.DisposeEvent();
 94
 95    /// <summary>
 96    /// Initialize the component on load.
 97    /// </summary>
 98    protected override async Task OnInitializedAsync()
 099    {
 0100        Interceptor.RegisterEvent();
 0101        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 0102        var user = authstate.User;
 103
 0104        if (!user.Identity.IsAuthenticated) return;
 0105        userEmail = user.Claims.FirstOrDefault(x => x.Type == StringRoleResources.EmailClaim).Value;
 106
 0107        await GetReceipts(userEmail);
 0108    }
 109
 110    /// <summary>
 111    /// Get the receipts.
 112    /// </summary>
 113    public async Task GetReceipts(string userEmail)
 0114    {
 0115        receiptsList = await ReceiptService.GetReceipts(userEmail);
 0116        searchReceiptsData = receiptsList;
 0117    }
 118
 119    /// <summary>
 120    /// Filter the receipts.
 121    /// </summary>
 122    protected void FilterReceipts()
 0123    {
 0124        if (!string.IsNullOrEmpty(SearchString))
 0125        {
 0126            receiptsList = searchReceiptsData.Where(x => x.ReceiptName.IndexOf(SearchString, StringComparison.OrdinalIgn
 0127        }
 128        else
 0129        {
 0130            receiptsList = searchReceiptsData;
 0131        }
 0132    }
 133
 134    /// <summary>
 135    /// Reset the search filter.
 136    /// </summary>
 137    public void ResetSearch()
 0138    {
 0139        SearchString = string.Empty;
 0140        receiptsList = searchReceiptsData;
 0141    }
 142}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Register.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Register.html deleted file mode 100644 index e92bc18a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Register.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Account.Register - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Account.Register
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\Register.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:101
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
OnInitializedAsync()0%20%
ExecuteRegister()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\Register.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Register.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/register"
 8
 9@inject NavigationManager NavManager
 10@inject IAuthenticationService AuthenticationService
 11@inject IRoleService RoleService
 12@inject AuthenticationStateProvider AuthStateProvider
 13
 14<div class="auth-page">
 15    <div class="container page">
 16        <div class="row">
 17            <div class="col-md-6 offset-md-3 col-xs-12">
 18                <h1 class="mb-3 text-xs-center">Sign up</h1>
 19
 20                <EditForm Model="@registerCommand" OnValidSubmit="ExecuteRegister">
 21                    <FluentValidationValidator />
 22
 23                    <fieldset class="mt-3 form-group">
 24                        <div>
 25                            <MudTextField class="form-control form-control-lg" InputType="InputType.Text"
 26                                @bind-Value="registerCommand.FirstName" Label="FirstName"
 27                                For="@(() => registerCommand.FirstName)"
 28                                Variant="Variant.Outlined"></MudTextField>
 29                        </div>
 30                    </fieldset>
 31                    <fieldset class="mt-3 form-group">
 32                        <div>
 33                            <MudTextField class="form-control form-control-lg" InputType="InputType.Text"
 34                                @bind-Value="registerCommand.LastName" Label="LastName"
 35                                For="@(() => registerCommand.LastName)"
 36                                Variant="Variant.Outlined"></MudTextField>
 37                        </div>
 38                    </fieldset>
 39                    <fieldset class="mt-3 form-group">
 40                        <div>
 41                            <MudTextField class="form-control form-control-lg" InputType="InputType.Email"
 42                                @bind-Value="registerCommand.Email" Label="Email"
 43                                For="@(() => registerCommand.Email)"
 44                                Variant="Variant.Outlined"></MudTextField>
 45                        </div>
 46                    </fieldset>
 47                    <fieldset class="mt-3 form-group">
 48                        <div>
 49                            <MudTextField class="form-control form-control-lg" InputType="InputType.Password"
 50                                @bind-Value="registerCommand.Password" Label="Password"
 51                                For="@(() => registerCommand.Password)"
 52                                Variant="Variant.Outlined"></MudTextField>
 53                        </div>
 54                    </fieldset>
 55                    <fieldset class="mt-3 form-group">
 56                        <div>
 57                            <MudTextField class="form-control form-control-lg" InputType="InputType.Password"
 58                                @bind-Value="registerCommand.ConfirmPassword" Label="ConfirmPassword"
 59                                For="@(() => registerCommand.ConfirmPassword)"
 60                                Variant="Variant.Outlined"></MudTextField>
 61                        </div>
 62                    </fieldset>
 63                    <MudButton class="mt-3 btn btn-lg btn-primary pull-xs-right"
 64                        Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.AppRegistration"
 65                        Color="Color.Primary" ButtonType="MudBlazor.ButtonType.Submit">
 66                            Register
 67                    </MudButton>
 68                </EditForm>
 69            </div>
 70        </div>
 71    </div>
 72</div>
 73
 74@code {
 075    private RegisterCommand registerCommand = new();
 76
 77    /// <summary>
 78    /// Initialize the component on load.
 79    /// </summary>
 80    protected override async Task OnInitializedAsync()
 081    {
 082        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 083        var user = authstate.User;
 084        if (user.Identity.IsAuthenticated)
 085        {
 086            NavManager.NavigateTo("/");
 087        }
 088    }
 89
 90    /// <summary>
 91    /// Register the user.
 92    /// </summary>
 93    private async Task ExecuteRegister()
 094    {
 095        var result = await AuthenticationService.Register(registerCommand);
 096        if (result is not null)
 097        {
 098            NavManager.NavigateTo("/");
 099        }
 0100    }
 101}
-
-
-
- -
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ResetPassword.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ResetPassword.html deleted file mode 100644 index 0b0143e5..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_ResetPassword.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Account.ResetPassword - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Account.ResetPassword
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\ResetPassword.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:84
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:4
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor()100%10%
OnInitializedAsync()0%20%
ExecuteResetPassword()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\ResetPassword.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="ResetPassword.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/reset-password"
 8
 9@inject IAccountService AccountService
 10@inject AuthenticationStateProvider AuthStateProvider
 11@inject NavigationManager NavManager
 12
 13<div>
 14    <div class="container page">
 15        <div class="row">
 16            <div class="col-md-6 offset-md-3 col-xs-12">
 17                <h1 class="mb-3 text-xs-center">Reset Password</h1>
 18
 19                <EditForm Model="@resetCommand" OnValidSubmit="ExecuteResetPassword">
 20                    <FluentValidationValidator />
 21
 22                    <fieldset class="mt-3 form-group">
 23                        <div>
 24                            <MudTextField class="form-control form-control-lg" InputType="InputType.Email"
 25                                @bind-Value="resetCommand.Email" Label="Email"
 26                                For="@(() => resetCommand.Email)"
 27                                Variant="Variant.Outlined"></MudTextField>
 28                        </div>
 29                    </fieldset>
 30                    <fieldset class="mt-3 form-group">
 31                        <div>
 32                            <MudTextField class="form-control form-control-lg" InputType="InputType.Password"
 33                                @bind-Value="resetCommand.NewPassword" Label="NewPassword"
 34                                For="@(() => resetCommand.NewPassword)"
 35                                Variant="Variant.Outlined"></MudTextField>
 36                        </div>
 37                    </fieldset>
 38                    <fieldset class="mt-3 form-group">
 39                        <div>
 40                            <MudTextField class="form-control form-control-lg" InputType="InputType.Password"
 41                                @bind-Value="resetCommand.NewConfirmPassword" Label="NewConfirmPassword"
 42                                For="@(() => resetCommand.NewConfirmPassword)"
 43                                Variant="Variant.Outlined"></MudTextField>
 44                        </div>
 45                    </fieldset>
 46                    <MudButton class="mt-3 btn btn-lg btn-primary pull-xs-right"
 47                        Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Send"
 48                        Color="Color.Primary" ButtonType="MudBlazor.ButtonType.Submit">
 49                            Reset Password
 50                    </MudButton>
 51                </EditForm>
 52            </div>
 53        </div>
 54    </div>
 55</div>
 56
 57@code {
 058    private ResetPasswordCommand resetCommand = new();
 59
 60    /// <summary>
 61    /// Initialize the component on load.
 62    /// </summary>
 63    protected override async Task OnInitializedAsync()
 064    {
 065        var authstate = await AuthStateProvider.GetAuthenticationStateAsync();
 066        var user = authstate.User;
 067        if (user.Identity.IsAuthenticated)
 068        {
 069            NavManager.NavigateTo("/");
 070        }
 071    }
 72
 73    /// <summary>
 74    /// Reset the password.
 75    /// </summary>
 76    private async Task ExecuteResetPassword()
 077    {
 078        var result = await AccountService.ResetPassword(resetCommand);
 079        if (result is not null)
 080        {
 081            NavManager.NavigateTo("/login");
 082        }
 083    }
 84}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_RoleService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_RoleService.html deleted file mode 100644 index 5691cbfd..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_RoleService.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.RoleService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.RoleService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\RoleService.cs
-
-
-
-
-
-
-
Line coverage
-
-
6%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:89
Coverable lines:95
Total lines:158
Line coverage:6.3%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:18
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
AddRole()0%20%
DeleteRole()0%20%
GetRole()0%40%
GetRoles()0%40%
GetRolesForAdmin()0%40%
UpdateRole()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\RoleService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="RoleService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IRoleService"/>.
 9    /// </summary>
 10    public class RoleService : IRoleService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="RoleService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 617        public RoleService(HttpClient httpClient, ISnackbar snackBar)
 618        {
 619            this.HttpClient = httpClient;
 620            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 621            this.SnackBar = snackBar;
 622        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<RequestResponse> AddRole(RoleResponse role)
 041        {
 042            var response = await this.HttpClient.PostAsJsonAsync($"Roles/role", role);
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<RequestResponse>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51            else
 052            {
 053                this.SnackBar.Add("The role was added.", Severity.Success);
 054            }
 55
 056            return result;
 057        }
 58
 59        /// <inheritdoc/>
 60        public async Task<RequestResponse> DeleteRole(int id)
 061        {
 062            var response = await this.HttpClient.DeleteAsync($"Roles/role/{id}");
 063            var responseResult = await response.Content.ReadAsStringAsync();
 064            var result = JsonSerializer.Deserialize<RequestResponse>(
 065                responseResult, this.Options);
 66
 067            if (response.IsSuccessStatusCode == false)
 068            {
 069                this.SnackBar.Add(result.Error, Severity.Error);
 070            }
 71            else
 072            {
 073                this.SnackBar.Add("The role was deleted.", Severity.Success);
 074            }
 75
 076            return result;
 077        }
 78
 79        /// <inheritdoc/>
 80        public async Task<RoleResponse> GetRole(int id)
 081        {
 082            var response = await this.HttpClient.GetAsync($"Roles/role/{id}");
 083            var responseResult = await response.Content.ReadAsStringAsync();
 084            var result = JsonSerializer.Deserialize<Result<RoleResponse>>(
 085                responseResult, this.Options);
 86
 087            if (response.IsSuccessStatusCode == false)
 088            {
 089                this.SnackBar.Add(result.Error, Severity.Error);
 090            }
 91
 092            return !response.IsSuccessStatusCode
 093                ? null
 094                : result.Item;
 095        }
 96
 97        /// <inheritdoc/>
 98        public async Task<List<RoleResponse>> GetRoles()
 099        {
 0100            var response = await this.HttpClient.GetAsync("Roles/roles");
 0101            var responseResult = await response.Content.ReadAsStringAsync();
 0102            var result = JsonSerializer.Deserialize<Result<RoleResponse>>(
 0103                responseResult, this.Options);
 104
 0105            if (response.IsSuccessStatusCode == false)
 0106            {
 0107                this.SnackBar.Add(result.Error, Severity.Error);
 0108            }
 109
 0110            return !response.IsSuccessStatusCode
 0111                ? null
 0112                : result.Items;
 0113        }
 114
 115        /// <inheritdoc/>
 116        public async Task<List<RoleResponse>> GetRolesForAdmin()
 0117        {
 0118            var response = await this.HttpClient.GetAsync("Roles/rolesAdmin");
 0119            var responseResult = await response.Content.ReadAsStringAsync();
 0120            var result = JsonSerializer.Deserialize<Result<RoleResponse>>(
 0121                responseResult, this.Options);
 122
 0123            if (response.IsSuccessStatusCode == false)
 0124            {
 0125                this.SnackBar.Add(result.Error, Severity.Error);
 0126            }
 127
 0128            return !response.IsSuccessStatusCode
 0129                ? null
 0130                : result.Items;
 0131        }
 132
 133        /// <inheritdoc/>
 134        public async Task<RequestResponse> UpdateRole(RoleResponse role)
 0135        {
 0136            var data = new UpdateRoleCommand
 0137            {
 0138                Id = role.Id,
 0139                Name = role.Name,
 0140            };
 0141            var response = await this.HttpClient.PutAsJsonAsync($"Roles/role", data);
 0142            var responseResult = await response.Content.ReadAsStringAsync();
 0143            var result = JsonSerializer.Deserialize<RequestResponse>(
 0144                responseResult, this.Options);
 145
 0146            if (response.IsSuccessStatusCode == false)
 0147            {
 0148                this.SnackBar.Add(result.Error, Severity.Error);
 0149            }
 150            else
 0151            {
 0152                this.SnackBar.Add("The role was updated.", Severity.Success);
 0153            }
 154
 0155            return result;
 0156        }
 157    }
 158}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Roles.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Roles.html deleted file mode 100644 index ed642e9b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Roles.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Roles.Roles - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Roles.Roles
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Roles\Roles.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:60
Coverable lines:60
Total lines:189
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
<BuildRenderTree()100%10%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
ModalOk()100%10%
get_SearchString()100%10%
get_rolesList()100%10%
get_searchRolesData()100%10%
Dispose()100%10%
OnInitializedAsync()100%10%
GetRolesForAdmin()100%10%
FilterRoles()0%20%
DeleteConfirm(...)100%10%
DeleteRole()100%10%
ResetSearch()100%10%
NavigateToPage(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Roles\Roles.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Roles.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/roles"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Admin)]
 10
 11@inject IRoleService RoleService
 12@inject NavigationManager NavManager
 13@inject HttpInterceptorService Interceptor
 14
 15<h1 class="display-3 font-weight-bold mb-0 text-primary mb-3">Roles List</h1>
 16
 17<div class="row mb-4">
 18    <div class="col">
 19        <MatButtonLink Href="admin/roles/add" Raised="true">Add Role</MatButtonLink>
 20    </div>
 21</div>
 22
 023@if (rolesList is null)
 024{
 25    <div class="d-flex justify-content-center" style="margin-top: 100px;">
 26        <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 27    </div>
 028}
 29else
 030{
 031    @if (rolesList.Count > 0)
 032    {
 33        <MatTable Items="@rolesList" LoadInitialData="true" Striped="true" AllowSelection="true"
 34            RowClass="tester" FilterByColumnName="Name" DebounceMilliseconds="150" class="mat-elevation-z5">
 35            <MatTableHeader>
 36                <th>Id</th>
 37                <th class="col-md-3">Name</th>
 38                <th class="col-md-3">NormalizedName</th>
 39                <th class="col-md-6">Actions</th>
 40            </MatTableHeader>
 41
 42            <MatTableRow>
 043                <td>@String.Format("{0:d}", @context.Id)</td>
 044                <td class="col-md-3">@context.Name</td>
 045                <td class="col-md-3">@context.NormalizedName</td>
 46                <td class="col-md-6">
 47                    <a href='admin/roles/edit/@context.Id' class="btn btn-outline-dark" role="button">Edit</a>
 048                    <button class="btn btn-danger" @onclick="(() => { DeleteConfirm(context.Id); ModalShow(); })">
 49                        Delete
 50                    </button>
 51                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Edit"
 052                        Color="Color.Success" @onclick="() => NavigateToPage(context.Id)">
 53                        Edit
 54                    </MudButton>
 55                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 056                        Color="Color.Error" @onclick="(() => { DeleteConfirm(context.Id); ModalShow(); })">
 57                        Delete
 58                    </MudButton>
 59                </td>
 60            </MatTableRow>
 61        </MatTable>
 62
 063        @if (showModal)
 064        {
 65            <div class="modal fade show" id="myModal" style="display:block; margin-top: 150px;" aria-modal="true" role="
 66                <div class="modal-dialog">
 67                    <div class="modal-content">
 68                        <div class="modal-header">
 69                            <h3 class="modal-title">Delete role</h3>
 70                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Close"
 71                                Color="Color.Warning" @onclick="@ModalCancel"
 72                                data-bs-dismiss="modal" aria-label="Close">
 73                                Close
 74                            </MudButton>
 75                        </div>
 76                        <div class="modal-body">
 77                            <h4>Do you want to delete this role?</h4>
 78                        </div>
 79                        <div class="modal-footer">
 80                            <MudButton class="mr-2" Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 081                                Color="Color.Error" @onclick="(async () => { await DeleteRole(role.Id); ModalOk(); })">
 82                                Delete
 83                            </MudButton>
 84                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel"
 85                                Color="Color.Warning" @onclick="@ModalCancel">
 86                                Cancel
 87                            </MudButton>
 88                        </div>
 89                    </div>
 90                </div>
 91            </div>
 092        }
 093    }
 94    else
 095    {
 96        <div class="d-flex justify-content-center" style="margin-top: 150px;">
 97            <h4 style="font-size: 45px;">No record found</h4>
 98        </div>
 099    }
 0100}
 101
 102@code {
 0103    bool showModal = false;
 104
 0105    void ModalShow() => showModal = true;
 0106    void ModalCancel() => showModal = false;
 0107    void ModalOk() => showModal = false;
 108
 0109    protected RoleResponse role = new();
 0110    protected string SearchString { get; set; } = string.Empty;
 111
 0112    protected List<RoleResponse> rolesList { get; set; }
 0113    protected List<RoleResponse> searchRolesData { get; set; }
 114
 0115    public void Dispose() => Interceptor.DisposeEvent();
 116
 117    /// <summary>
 118    /// Initialize the component on load.
 119    /// </summary>
 120    protected override async Task OnInitializedAsync()
 0121    {
 0122        Interceptor.RegisterEvent();
 0123        await GetRolesForAdmin();
 0124    }
 125
 126    /// <summary>
 127    /// Get the admin roles.
 128    /// </summary>
 129    protected async Task GetRolesForAdmin()
 0130    {
 0131        rolesList = await RoleService.GetRolesForAdmin();
 0132        searchRolesData = rolesList;
 0133    }
 134
 135    /// <summary>
 136    /// Filter the roles.
 137    /// </summary>
 138    protected void FilterRoles()
 0139    {
 0140        if (!string.IsNullOrEmpty(SearchString))
 0141        {
 0142            rolesList = searchRolesData.Where(x => x.Name.IndexOf(SearchString, StringComparison.OrdinalIgnoreCase) != -
 0143        }
 144        else
 0145        {
 0146            rolesList = searchRolesData;
 0147        }
 0148    }
 149
 150    /// <summary>
 151    /// Confirm the delete operation.
 152    /// </summary>
 153    protected void DeleteConfirm(int Id)
 0154    {
 0155        role = rolesList.FirstOrDefault(x => x.Id == Id);
 0156    }
 157
 158    /// <summary>
 159    /// Delete the role.
 160    /// </summary>
 161    protected async Task DeleteRole(int Id)
 0162    {
 0163        await RoleService.DeleteRole(Id);
 0164        await GetRolesForAdmin();
 0165    }
 166
 167    /// <summary>
 168    /// Reset the search filter.
 169    /// </summary>
 170    public void ResetSearch()
 0171    {
 0172        SearchString = string.Empty;
 0173        rolesList = searchRolesData;
 0174    }
 175
 176    /// <summary>
 177    /// Navigate.
 178    /// </summary>
 179    private void NavigateToPage(int id)
 0180    {
 0181        NavManager.NavigateTo($"admin/roles/edit/{id}");
 0182    }
 183}
 184
 185<style>
 186    label {
 187        width: 70%;
 188    }
 189</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Server_error.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Server_error.html deleted file mode 100644 index 01532eac..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Server_error.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Internal.Server_error - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Internal.Server_error
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Internal\Server-error.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:3
Coverable lines:3
Total lines:28
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
OnInitializedAsync()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Internal\Server-error.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="server-error.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/server-error"
 8
 9@inject AuthenticationStateProvider AuthStateProvider
 10@inject IAuthenticationService AuthService
 11@inject NavigationManager NavManager
 12
 13<h3 class="mb-3">Server Error</h3>
 14
 15<div class="d-flex justify-content-center" style="margin-top: 100px;">
 16    <h4 style="font-size: 45px;"><em>Something went wrong, please contact Administrator or try again later...</em></h4>
 17</div>
 18
 19@code {
 20
 21    /// <summary>
 22    /// Initialize the component on load.
 23    /// </summary>
 24    protected override async Task OnInitializedAsync()
 025    {
 026        await this.AuthService.Logout();
 027    }
 28}
-
-
-
-
-

Methods/Properties

-OnInitializedAsync()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SessionStorageService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SessionStorageService.html deleted file mode 100644 index 594a85e2..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SessionStorageService.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.SessionStorageService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.SessionStorageService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\SessionStorageService.cs
-
-
-
-
-
-
-
Line coverage
-
-
22%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:21
Coverable lines:27
Total lines:78
Line coverage:22.2%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:2
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_Js()100%1100%
get_JsInProcess()100%10%
GetItemAsync()0%20%
SetItemAsync()100%10%
SetItem(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\SessionStorageService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SessionStorageService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="SessionStorageService"/>.
 9    /// </summary>
 10    public class SessionStorageService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="SessionStorageService"/> class.
 14        /// </summary>
 15        /// <param name="js">The instance of the <see cref="IJSRuntime"/> to use.</param>
 316        public SessionStorageService(IJSRuntime js)
 317        {
 318            this.Js = js;
 319            this.JsInProcess = (IJSInProcessRuntime)this.Js;
 320        }
 21
 22        /// <summary>
 23        /// Gets the instance of the <see cref="IJSRuntime"/> to use..
 24        /// </summary>
 325        private IJSRuntime Js { get; }
 26
 27        /// <summary>
 28        /// Gets the instance of the <see cref="IJSInProcessRuntime"/> to use..
 29        /// </summary>
 030        private IJSInProcessRuntime JsInProcess { get; }
 31
 32        /// <summary>
 33        /// Get an item from session storage.
 34        /// </summary>
 35        /// <typeparam name="T">The generic type of the object.</typeparam>
 36        /// <param name="key">The key to be added.</param>
 37        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 38        public async Task<T> GetItemAsync<T>(string key)
 039        {
 040            var json = await this.Js.InvokeAsync<string>(
 041                "BlazorShop.getSessionStorage",
 042                key);
 43
 044            return string.IsNullOrEmpty(json)
 045                    ? default
 046                    : JsonSerializer.Deserialize<T>(json);
 047        }
 48
 49        /// <summary>
 50        /// Set an item to session storage - async.
 51        /// </summary>
 52        /// <typeparam name="T">The generic type of the object.</typeparam>
 53        /// <param name="key">The key to be added.</param>
 54        /// <param name="item">The item of type T.</param>
 55        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 56        public async Task SetItemAsync<T>(string key, T item)
 057        {
 058            await this.Js.InvokeVoidAsync(
 059                "BlazorShop.setSessionStorage",
 060                key,
 061                JsonSerializer.Serialize(item));
 062        }
 63
 64        /// <summary>
 65        /// Set an item to session storage.
 66        /// </summary>
 67        /// <typeparam name="T">The generic type of the object.</typeparam>
 68        /// <param name="key">The key to be added.</param>
 69        /// <param name="item">The item of type T.</param>
 70        public void SetItem<T>(string key, T item)
 071        {
 072            this.JsInProcess.InvokeVoid(
 073                "BlazorShop.setSessionStorage",
 074                key,
 075                JsonSerializer.Serialize(item));
 076        }
 77    }
 78}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_StripeService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_StripeService.html deleted file mode 100644 index 116805d4..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_StripeService.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.StripeService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.StripeService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\StripeService.cs
-
-
-
-
-
-
-
Line coverage
-
-
27%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:16
Coverable lines:22
Total lines:57
Line coverage:27.2%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:2
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
CancelMembership()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\StripeService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="StripeService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IStripeService"/>.
 9    /// </summary>
 10    public class StripeService : IStripeService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="StripeService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 117        public StripeService(HttpClient httpClient, ISnackbar snackBar)
 118        {
 119            this.HttpClient = httpClient;
 120            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 121            this.SnackBar = snackBar;
 122        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task CancelMembership(string stripeSubscriptionCreationId)
 041        {
 042            var response = await this.HttpClient.DeleteAsync($"Payments/cancel-subscription/{stripeSubscriptionCreationI
 043            if (response.IsSuccessStatusCode == false)
 044            {
 045                var responseResult = await response.Content.ReadAsStringAsync();
 046                var result = JsonSerializer.Deserialize<RequestResponse>(
 047                    responseResult, this.Options);
 48
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51            else
 052            {
 053                this.SnackBar.Add("Subscription was cancelled.", Severity.Success);
 054            }
 055        }
 56    }
 57}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriberService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriberService.html deleted file mode 100644 index 9b7a0de5..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriberService.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.SubscriberService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.SubscriberService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\SubscriberService.cs
-
-
-
-
-
-
-
Line coverage
-
-
6%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:84
Coverable lines:90
Total lines:153
Line coverage:6.6%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:18
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
GetSubscribers()0%40%
GetUserAllSubscribers()0%40%
GetUserSubscriber()0%40%
AddSubscriber()0%20%
UpdateSubscriber()0%20%
DeleteSubscriber()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\SubscriberService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SubscriberService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="ISubscriberService"/>.
 9    /// </summary>
 10    public class SubscriberService : ISubscriberService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="SubscriberService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 617        public SubscriberService(HttpClient httpClient, ISnackbar snackBar)
 618        {
 619            this.HttpClient = httpClient;
 620            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 621            this.SnackBar = snackBar;
 622        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<List<SubscriberResponse>> GetSubscribers()
 041        {
 042            var response = await this.HttpClient.GetAsync("Subscribers/subscribers");
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<Result<SubscriberResponse>>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51
 052            return !response.IsSuccessStatusCode
 053                ? null
 054                : result.Items;
 055        }
 56
 57        /// <inheritdoc/>
 58        public async Task<List<SubscriberResponse>> GetUserAllSubscribers(int userId)
 059        {
 060            var response = await this.HttpClient.GetAsync($"Subscribers/subscribers/{userId}");
 061            var responseResult = await response.Content.ReadAsStringAsync();
 062            var result = JsonSerializer.Deserialize<Result<SubscriberResponse>>(
 063                responseResult, this.Options);
 64
 065            if (response.IsSuccessStatusCode == false)
 066            {
 067                this.SnackBar.Add(result.Error, Severity.Error);
 068            }
 69
 070            return !response.IsSuccessStatusCode
 071                ? null
 072                : result.Items;
 073        }
 74
 75        /// <inheritdoc/>
 76        public async Task<SubscriberResponse> GetUserSubscriber(int userId)
 077        {
 078            var response = await this.HttpClient.GetAsync($"Subscribers/subscriber/{userId}");
 079            var responseResult = await response.Content.ReadAsStringAsync();
 080            var result = JsonSerializer.Deserialize<Result<SubscriberResponse>>(
 081                responseResult, this.Options);
 82
 083            if (response.IsSuccessStatusCode == false)
 084            {
 085                this.SnackBar.Add(result.Error, Severity.Error);
 086            }
 87
 088            return !response.IsSuccessStatusCode
 089                ? null
 090                : result.Item;
 091        }
 92
 93        /// <inheritdoc/>
 94        public async Task<RequestResponse> AddSubscriber(SubscriberResponse subscriber)
 095        {
 096            var response = await this.HttpClient.PostAsJsonAsync("Subscribers/subscriber", subscriber);
 097            var responseResult = await response.Content.ReadAsStringAsync();
 098            var result = JsonSerializer.Deserialize<RequestResponse>(
 099                responseResult, this.Options);
 100
 0101            if (response.IsSuccessStatusCode == false)
 0102            {
 0103                this.SnackBar.Add(result.Error, Severity.Error);
 0104            }
 105            else
 0106            {
 0107                this.SnackBar.Add("The Subscriber was added.", Severity.Success);
 0108            }
 109
 0110            return result;
 0111        }
 112
 113        /// <inheritdoc/>
 114        public async Task<RequestResponse> UpdateSubscriber(SubscriberResponse subscriber)
 0115        {
 0116            var response = await this.HttpClient.PutAsJsonAsync("Subscribers/subscriber", subscriber);
 0117            var responseResult = await response.Content.ReadAsStringAsync();
 0118            var result = JsonSerializer.Deserialize<RequestResponse>(
 0119                responseResult, this.Options);
 120
 0121            if (response.IsSuccessStatusCode == false)
 0122            {
 0123                this.SnackBar.Add(result.Error, Severity.Error);
 0124            }
 125            else
 0126            {
 0127                this.SnackBar.Add("The Subscriber was updated.", Severity.Success);
 0128            }
 129
 0130            return result;
 0131        }
 132
 133        /// <inheritdoc/>
 134        public async Task<RequestResponse> DeleteSubscriber(int id)
 0135        {
 0136            var response = await this.HttpClient.DeleteAsync($"Subscribers/subscriber/{id}");
 0137            var responseResult = await response.Content.ReadAsStringAsync();
 0138            var result = JsonSerializer.Deserialize<RequestResponse>(
 0139                responseResult, this.Options);
 140
 0141            if (response.IsSuccessStatusCode == false)
 0142            {
 0143                this.SnackBar.Add(result.Error, Severity.Error);
 0144            }
 145            else
 0146            {
 0147                this.SnackBar.Add("The Subscriber was deleted.", Severity.Success);
 0148            }
 149
 0150            return result;
 0151        }
 152    }
 153}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Subscribers.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Subscribers.html deleted file mode 100644 index e13c336c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Subscribers.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Subscribers.Subscribers - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Subscribers.Subscribers
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Subscribers\Subscribers.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:42
Coverable lines:42
Total lines:145
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
<BuildRenderTree()100%10%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
ModalOk()100%10%
get_subscribersList()100%10%
Dispose()100%10%
OnInitializedAsync()100%10%
GetSubscribers()100%10%
DeleteConfirm(...)100%10%
DeleteSubscriber()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Subscribers\Subscribers.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Subscribers.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/subscribers"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Admin)]
 10
 11@inject ISubscriberService SubscriberService
 12@inject NavigationManager NavManager
 13@inject HttpInterceptorService Interceptor
 14
 15<h3>Subscribers</h3>
 16
 017@if (subscribersList is null)
 018{
 19    <div class="d-flex justify-content-center" style="margin-top: 100px;">
 20        <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 21    </div>
 022}
 23else
 024{
 025    @if (subscribersList.Count > 0)
 026    {
 27        <MatTable Items="@subscribersList" LoadInitialData="true" Striped="true" AllowSelection="true"
 28            RowClass="tester" FilterByColumnName="CustomerName" DebounceMilliseconds="150" class="mat-elevation-z5">
 29            <MatTableHeader>
 30                <th class="col-md-1">Id</th>
 31                <th class="col-md-3">Status</th>
 32                <th class="col-md-3">DateStart</th>
 33                <th class="col-md-3">CurrentPeriodEnd</th>
 34                <th class="col-md-3">Customer</th>
 35                <th class="col-md-3">Subscription</th>
 36                <th class="col-md-4">Actions</th>
 37            </MatTableHeader>
 38
 39            <MatTableRow>
 040                <td class="col-md-1">@String.Format("{0:d}", @context.Id)</td>
 041                <td class="col-md-3">@context.Status</td>
 042                <td class="col-md-3">@context.DateStart</td>
 043                <td class="col-md-3">@context.CurrentPeriodEnd</td>
 044                <td class="col-md-3">@context.CustomerName</td>
 045                <td class="col-md-3">@context.SubscriptionName</td>
 46                <td class="col-md-4">
 47                    <MudButton Disabled Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 048                        Color="Color.Error" @onclick="(() => { DeleteConfirm(context.Id); ModalShow(); })">
 49                        Delete
 50                    </MudButton>
 51                </td>
 52            </MatTableRow>
 53        </MatTable>
 54
 055        @if (showModal)
 056        {
 57            <div class="modal fade show" id="myModal" style="display:block; margin-top: 150px;" aria-modal="true" role="
 58                <div class="modal-dialog">
 59                    <div class="modal-content">
 60                        <div class="modal-header">
 61                            <h3 class="modal-title">Delete Subscriber</h3>
 62                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Close"
 63                                Color="Color.Warning" @onclick="@ModalCancel"
 64                                data-bs-dismiss="modal" aria-label="Close">
 65                                Close
 66                            </MudButton>
 67                        </div>
 68                        <div class="modal-body">
 69                            <h4>Do you want to delete this subscriber?</h4>
 70                        </div>
 71                        <div class="modal-footer">
 72                            <MudButton class="mr-2" Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 073                                Color="Color.Error" @onclick="(async () => { await DeleteSubscriber(subscriber.Id); Moda
 74                                Delete
 75                            </MudButton>
 76                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel"
 77                                Color="Color.Warning" @onclick="@ModalCancel">
 78                                Cancel
 79                            </MudButton>
 80                        </div>
 81                    </div>
 82                </div>
 83            </div>
 084        }
 085    }
 86    else
 087    {
 88        <div class="d-flex justify-content-center" style="margin-top: 150px;">
 89            <h4 style="font-size: 45px;">No record found</h4>
 90        </div>
 091    }
 092}
 93
 94@code {
 095    bool showModal = false;
 96
 097    void ModalShow() => showModal = true;
 098    void ModalCancel() => showModal = false;
 099    void ModalOk() => showModal = false;
 100
 0101    protected SubscriberResponse subscriber = new();
 0102    protected List<SubscriberResponse> subscribersList { get; set; }
 103
 0104    public void Dispose() => Interceptor.DisposeEvent();
 105
 106    /// <summary>
 107    /// Initialize the component on load.
 108    /// </summary>
 109    protected override async Task OnInitializedAsync()
 0110    {
 0111        Interceptor.RegisterEvent();
 0112        await GetSubscribers();
 0113    }
 114
 115    /// <summary>
 116    /// Get the subscribers.
 117    /// </summary>
 118    protected async Task GetSubscribers()
 0119    {
 0120        subscribersList = await SubscriberService.GetSubscribers();
 0121    }
 122
 123    /// <summary>
 124    /// Confirm the delete operation.
 125    /// </summary>
 126    protected void DeleteConfirm(int Id)
 0127    {
 0128        subscriber = subscribersList.FirstOrDefault(x => x.Id == Id);
 0129    }
 130
 131    /// <summary>
 132    /// Delete the subscribers.
 133    /// </summary>
 134    protected async Task DeleteSubscriber(int Id)
 0135    {
 0136        await SubscriberService.DeleteSubscriber(Id);
 0137        await GetSubscribers();
 0138    }
 139}
 140
 141<style>
 142    label {
 143        width: 70%;
 144    }
 145</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriptionService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriptionService.html deleted file mode 100644 index 7128b4ba..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriptionService.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.SubscriptionService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.SubscriptionService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\SubscriptionService.cs
-
-
-
-
-
-
-
Line coverage
-
-
7%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:71
Coverable lines:77
Total lines:135
Line coverage:7.7%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:14
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
GetSubscriptions()0%40%
GetSubscription()0%40%
AddSubscription()0%20%
UpdateSubscription()0%20%
DeleteSubscription()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\SubscriptionService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="SubscriptionService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="ISubscriptionService"/>.
 9    /// </summary>
 10    public class SubscriptionService : ISubscriptionService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="SubscriptionService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 517        public SubscriptionService(HttpClient httpClient, ISnackbar snackBar)
 518        {
 519            this.HttpClient = httpClient;
 520            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 521            this.SnackBar = snackBar;
 522        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<List<SubscriptionResponse>> GetSubscriptions()
 041        {
 042            var response = await this.HttpClient.GetAsync("Subscriptions/subscriptions");
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<Result<SubscriptionResponse>>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51
 052            return !response.IsSuccessStatusCode
 053                ? null
 054                : result.Items;
 055        }
 56
 57        /// <inheritdoc/>
 58        public async Task<SubscriptionResponse> GetSubscription(int id)
 059        {
 060            var response = await this.HttpClient.GetAsync($"Subscriptions/subscription/{id}");
 061            var responseResult = await response.Content.ReadAsStringAsync();
 062            var result = JsonSerializer.Deserialize<Result<SubscriptionResponse>>(
 063                responseResult, this.Options);
 64
 065            if (response.IsSuccessStatusCode == false)
 066            {
 067                this.SnackBar.Add(result.Error, Severity.Error);
 068            }
 69
 070            return !response.IsSuccessStatusCode
 071                ? null
 072                : result.Item;
 073        }
 74
 75        /// <inheritdoc/>
 76        public async Task<RequestResponse> AddSubscription(SubscriptionResponse subscription)
 077        {
 078            var response = await this.HttpClient.PostAsJsonAsync("Subscriptions/subscription", subscription);
 079            var responseResult = await response.Content.ReadAsStringAsync();
 080            var result = JsonSerializer.Deserialize<RequestResponse>(
 081                responseResult, this.Options);
 82
 083            if (response.IsSuccessStatusCode == false)
 084            {
 085                this.SnackBar.Add(result.Error, Severity.Error);
 086            }
 87            else
 088            {
 089                this.SnackBar.Add("The Subscription was added.", Severity.Success);
 090            }
 91
 092            return result;
 093        }
 94
 95        /// <inheritdoc/>
 96        public async Task<RequestResponse> UpdateSubscription(SubscriptionResponse subscription)
 097        {
 098            var response = await this.HttpClient.PutAsJsonAsync("Subscriptions/subscription", subscription);
 099            var responseResult = await response.Content.ReadAsStringAsync();
 0100            var result = JsonSerializer.Deserialize<RequestResponse>(
 0101                responseResult, this.Options);
 102
 0103            if (response.IsSuccessStatusCode == false)
 0104            {
 0105                this.SnackBar.Add(result.Error, Severity.Error);
 0106            }
 107            else
 0108            {
 0109                this.SnackBar.Add("The Subscription was updated.", Severity.Success);
 0110            }
 111
 0112            return result;
 0113        }
 114
 115        /// <inheritdoc/>
 116        public async Task<RequestResponse> DeleteSubscription(int id)
 0117        {
 0118            var response = await this.HttpClient.DeleteAsync($"Subscriptions/subscription/{id}");
 0119            var responseResult = await response.Content.ReadAsStringAsync();
 0120            var result = JsonSerializer.Deserialize<RequestResponse>(
 0121                responseResult, this.Options);
 122
 0123            if (response.IsSuccessStatusCode == false)
 0124            {
 0125                this.SnackBar.Add(result.Error, Severity.Error);
 0126            }
 127            else
 0128            {
 0129                this.SnackBar.Add("The Subscription was deleted.", Severity.Success);
 0130            }
 131
 0132            return result;
 0133        }
 134    }
 135}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriptionSuccess.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriptionSuccess.html deleted file mode 100644 index 95e8f75e..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_SubscriptionSuccess.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Subscriptions.SubscriptionSuccess - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Subscriptions.SubscriptionSuccess
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Subscriptions\SubscriptionSuccess.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:88
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:2
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Message()100%10%
Dispose()100%10%
OnInitialized()100%10%
OnParametersSet()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Subscriptions\SubscriptionSuccess.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="SubscriptionSuccess.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/subscription-success/{Message}"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject NavigationManager NavManager
 12@inject HttpInterceptorService Interceptor
 13
 14<h3 class="text-center" style="margin-top: 30px;">Subscription Successful Activated</h3>
 15
 16<div class="container-card mt-3">
 17    <div class="card">
 18        <div style="border-radius:200px; height:200px; width:200px; background: #F8FAF5; margin:0 auto;">
 19            <i class="i checkmark">✓</i>
 20        </div>
 21        <h1 class="h1-custom">Success</h1>
 22        <p class="p">The subscription plan was activated!</p>
 23    </div>
 24</div>
 25
 26@code {
 27    [Parameter]
 028    public string Message { get; set; }
 29
 030    public void Dispose() => Interceptor.DisposeEvent();
 31
 32    /// <summary>
 33    /// Initialize the component on load.
 34    /// </summary>
 35    protected override void OnInitialized()
 036    {
 037        Interceptor.RegisterEvent();
 038    }
 39
 40    /// <summary>
 41    /// Initialize the component using the parameter.
 42    /// </summary>
 43    protected override void OnParametersSet()
 044    {
 045        if (!Message.Equals("subscription-made"))
 046        {
 047            NavManager.NavigateTo("musics");
 048        }
 049    }
 50}
 51
 52<style>
 53    .container-card {
 54        text-align: center;
 55        padding: 40px 0;
 56    }
 57
 58    .h1-custom {
 59        color: #88B04B;
 60        font-family: "Nunito Sans", "Helvetica Neue", sans-serif;
 61        font-weight: 900;
 62        font-size: 40px;
 63        margin-bottom: 10px;
 64    }
 65
 66    .p {
 67        color: #404F5E;
 68        font-family: "Nunito Sans", "Helvetica Neue", sans-serif;
 69        font-size:20px;
 70        margin: 0;
 71    }
 72
 73    .i {
 74        color: #9ABC66;
 75        font-size: 100px;
 76        line-height: 200px;
 77        margin-left:-15px;
 78    }
 79
 80    .card {
 81        background: white;
 82        padding: 60px;
 83        border-radius: 4px;
 84        box-shadow: 0 2px 3px #C8D0D8;
 85        display: inline-block;
 86        margin: 0 auto;
 87    }
 88</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Subscriptions.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Subscriptions.html deleted file mode 100644 index 0c540b0b..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Subscriptions.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Subscriptions.Subscriptions - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Subscriptions.Subscriptions
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Subscriptions\Subscriptions.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:47
Coverable lines:47
Total lines:165
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:6
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%60%
<BuildRenderTree()100%10%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
ModalOk()100%10%
get_subscriptionsList()100%10%
Dispose()100%10%
OnInitializedAsync()100%10%
GetSubscriptions()100%10%
DeleteConfirm(...)100%10%
DeleteSubscription()100%10%
NavigateToPage(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Subscriptions\Subscriptions.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Subscriptions.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/subscriptions"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Admin)]
 10
 11@inject ISubscriptionService SubscriptionService
 12@inject NavigationManager NavManager
 13@inject HttpInterceptorService Interceptor
 14
 15<h1 class="display-3 font-weight-bold mb-0 text-primary mb-3">Subscriptions</h1>
 16
 17<div class="row mb-4">
 18    <div class="col">
 19        <MatButtonLink Href="admin/subscriptions/add" Raised="true">Add Subscription</MatButtonLink>
 20    </div>
 21</div>
 22
 023@if (subscriptionsList is null)
 024{
 25    <div class="d-flex justify-content-center" style="margin-top: 100px;">
 26        <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 27    </div>
 028}
 29else
 030{
 031    @if (subscriptionsList.Count > 0)
 032    {
 33        <MatTable Items="@subscriptionsList" LoadInitialData="true" Striped="true" AllowSelection="true"
 34            RowClass="tester" FilterByColumnName="Name" DebounceMilliseconds="150" class="mat-elevation-z5">
 35            <MatTableHeader>
 36                <th>Id</th>
 37                <th>Name</th>
 38                <th>Price</th>
 39                <th>Currency</th>
 40                <th>CurrencySymbol</th>
 41                <th>ChargeType</th>
 42                <th>Options</th>
 43                <th class="col-md-4">Actions</th>
 44            </MatTableHeader>
 45
 46            <MatTableRow>
 047                <td>@String.Format("{0:d}", @context.Id)</td>
 048                <td class="col-md-2">@context.Name</td>
 049                <td class="col-md-2">@context.Price</td>
 050                <td>@context.Currency</td>
 051                <td>@context.CurrencySymbol</td>
 052                <td>@context.ChargeType</td>
 053                <td class="col-md-6">@context.Options</td>
 54                <td class="col-md-4">
 55                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Edit"
 056                        Color="Color.Success" @onclick="() => NavigateToPage(context.Id)">
 57                        Edit
 58                    </MudButton>
 59                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 060                        Color="Color.Error" @onclick="(() => { DeleteConfirm(context.Id); ModalShow(); })">
 61                        Delete
 62                    </MudButton>
 63                </td>
 64            </MatTableRow>
 65        </MatTable>
 66
 067        @if (showModal)
 068        {
 69            <div class="modal fade show" id="myModal" style="display:block; margin-top: 150px;" aria-modal="true" role="
 70                <div class="modal-dialog">
 71                    <div class="modal-content">
 72                        <div class="modal-header">
 73                            <h3 class="modal-title">Delete Subscription</h3>
 74                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Close"
 75                                Color="Color.Warning" @onclick="@ModalCancel"
 76                                data-bs-dismiss="modal" aria-label="Close">
 77                                Close
 78                            </MudButton>
 79                        </div>
 80                        <div class="modal-body">
 81                            <h4>Do you want to delete this subscription?</h4>
 82                        </div>
 83                        <div class="modal-footer">
 84                            <MudButton class="mr-2" Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 085                                Color="Color.Error" @onclick="(async () => { await DeleteSubscription(subscription.Id); 
 86                                Delete
 87                            </MudButton>
 88                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel"
 89                                Color="Color.Warning" @onclick="@ModalCancel">
 90                                Cancel
 91                            </MudButton>
 92                        </div>
 93                    </div>
 94                </div>
 95            </div>
 096        }
 097    }
 98    else
 099    {
 100        <div class="d-flex justify-content-center" style="margin-top: 150px;">
 101            <h4 style="font-size: 45px;">No record found</h4>
 102        </div>
 0103    }
 0104}
 105
 106@code {
 0107    bool showModal = false;
 108
 0109    void ModalShow() => showModal = true;
 0110    void ModalCancel() => showModal = false;
 0111    void ModalOk() => showModal = false;
 112
 0113    protected SubscriptionResponse subscription = new();
 0114    protected List<SubscriptionResponse> subscriptionsList { get; set; }
 115
 0116    public void Dispose() => Interceptor.DisposeEvent();
 117
 118    /// <summary>
 119    /// Initialize the component on load.
 120    /// </summary>
 121    protected override async Task OnInitializedAsync()
 0122    {
 0123        Interceptor.RegisterEvent();
 0124        await GetSubscriptions();
 0125    }
 126
 127    /// <summary>
 128    /// Get the subscriptions.
 129    /// </summary>
 130    protected async Task GetSubscriptions()
 0131    {
 0132        subscriptionsList = await SubscriptionService.GetSubscriptions();
 0133    }
 134
 135    /// <summary>
 136    /// Confirm the delete operation.
 137    /// </summary>
 138    protected void DeleteConfirm(int Id)
 0139    {
 0140        subscription = subscriptionsList.FirstOrDefault(x => x.Id == Id);
 0141    }
 142
 143    /// <summary>
 144    /// Delete the subscription.
 145    /// </summary>
 146    protected async Task DeleteSubscription(int Id)
 0147    {
 0148        await SubscriptionService.DeleteSubscription(Id);
 0149        await GetSubscriptions();
 0150    }
 151
 152    /// <summary>
 153    /// Navigation.
 154    /// </summary>
 155    private void NavigateToPage(int id)
 0156    {
 0157        NavManager.NavigateTo($"admin/subscriptions/edit/{id}");
 0158    }
 159}
 160
 161<style>
 162    label {
 163        width: 70%;
 164    }
 165</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoItemService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoItemService.html deleted file mode 100644 index e590de01..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoItemService.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.TodoItemService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.TodoItemService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\TodoItemService.cs
-
-
-
-
-
-
-
Line coverage
-
-
9%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:60
Coverable lines:66
Total lines:119
Line coverage:9%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:12
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
GetTodoItemAsync()0%40%
PutTodoItemAsync()0%20%
DeleteTodoItemAsync()0%20%
PostTodoItemAsync()0%40%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\TodoItemService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoItemService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="ITodoItemService"/>.
 9    /// </summary>
 10    public class TodoItemService : ITodoItemService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="TodoItemService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 417        public TodoItemService(HttpClient httpClient, ISnackbar snackBar)
 418        {
 419            this.HttpClient = httpClient;
 420            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 421            this.SnackBar = snackBar;
 422        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<TodoItemResponse> GetTodoItemAsync(int id)
 041        {
 042            var response = await this.HttpClient.GetAsync($"TodoItems/item/{id}");
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<Result<TodoItemResponse>>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050            }
 51
 052            return !response.IsSuccessStatusCode
 053                ? null
 054                : result.Item;
 055        }
 56
 57        /// <inheritdoc/>
 58        public async Task<RequestResponse> PutTodoItemAsync(TodoItemResponse todoItem)
 059        {
 060            var response = await this.HttpClient.PutAsJsonAsync("TodoItems/item", todoItem);
 061            var responseResult = await response.Content.ReadAsStringAsync();
 062            var result = JsonSerializer.Deserialize<RequestResponse>(
 063                responseResult, this.Options);
 64
 065            if (response.IsSuccessStatusCode == false)
 066            {
 067                this.SnackBar.Add(result.Error, Severity.Error);
 068            }
 69            else
 070            {
 071                this.SnackBar.Add("The todo item was updated.", Severity.Success);
 072            }
 73
 074            return result;
 075        }
 76
 77        /// <inheritdoc/>
 78        public async Task<RequestResponse> DeleteTodoItemAsync(int id)
 079        {
 080            var response = await this.HttpClient.DeleteAsync($"TodoItems/item/{id}");
 081            var responseResult = await response.Content.ReadAsStringAsync();
 082            var result = JsonSerializer.Deserialize<RequestResponse>(
 083                responseResult, this.Options);
 84
 085            if (response.IsSuccessStatusCode == false)
 086            {
 087                this.SnackBar.Add(result.Error, Severity.Error);
 088            }
 89            else
 090            {
 091                this.SnackBar.Add("The todo item was deleted.", Severity.Success);
 092            }
 93
 094            return result;
 095        }
 96
 97        /// <inheritdoc/>
 98        public async Task<TodoItemResponse> PostTodoItemAsync(TodoItemResponse todoItem)
 099        {
 0100            var response = await this.HttpClient.PostAsJsonAsync("TodoItems/item", todoItem);
 0101            var responseResult = await response.Content.ReadAsStringAsync();
 0102            var result = JsonSerializer.Deserialize<Result<TodoItemResponse>>(
 0103                responseResult, this.Options);
 104
 0105            if (response.IsSuccessStatusCode == false)
 0106            {
 0107                this.SnackBar.Add(result.Error, Severity.Error);
 0108            }
 109            else
 0110            {
 0111                this.SnackBar.Add("The todo item was added.", Severity.Success);
 0112            }
 113
 0114            return !response.IsSuccessStatusCode
 0115                ? null
 0116                : result.Item;
 0117        }
 118    }
 119}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoItems.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoItems.html deleted file mode 100644 index 79fbef0d..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoItems.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Todos.TodoItems - Coverage Report - -
-

< Summary

-
-
-
Information
- -
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:78
Coverable lines:78
Total lines:222
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:22
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

- -

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Todos\TodoItems.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="TodoItems.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 07@if (State.Initialised)
 08{
 9  <div class="clearfix">
 010    <h2 class="float-start">@State.SelectedList.Title</h2>
 11    <button id="listOptions" class="btn btn-default float-end" title="List Options..." data-bs-toggle="modal" data-bs-ta
 12      <span class="oi oi-ellipses"></span>
 13    </button>
 14  </div>
 15
 16  <ul id="todo-items" class="list-group mb-2">
 017    @foreach (var item in State.SelectedList.Items)
 018    {
 19      <li class="list-group-item">
 20        <div class="d-flex">
 21          <div class="todo-item-checkbox">
 022            <input type="checkbox" checked="@item.Done" @onchange="@((e) => ToggleDone(item, e))" />
 23          </div>
 24          <div class="flex-fill">
 025            @if (!IsSelectedItem(item))
 026            {
 027              <div class="todo-item-title form-control item-input-control @(item.Done ? "done-todo" : "")" @onclick="@((
 028                <span>@item.Title</span>
 29              </div>
 030            }
 31            else
 032            {
 033              <input @ref="TitleInput" type="text" class="form-control item-input-control" @bind="item.Title" @onblur="S
 034            }
 35          </div>
 36        </div>
 37      </li>
 038    }
 39    <li class="list-group-item" @onclick="AddItem">
 40      <button class="btn btn-default">Add Item...</button>
 41    </li>
 42  </ul>
 43
 044  <div @ref="ListOptionsModal" class="modal fade" id="listOptionsModal" tabindex="-1" aria-labelledby="listOptionsModalL
 45    <div class="modal-dialog">
 46      <div class="modal-content">
 47        <div class="modal-header">
 48          <h5 class="modal-title" id="listOptionsModalLabel">List Options</h5>
 49          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
 50        </div>
 51        <EditForm Model="@State.SelectedList" OnValidSubmit="@SaveList">
 52          <div class="modal-body">
 53
 54            <FluentValidationValidator DisableAssemblyScanning="true" />
 55
 56            <div class="row g-3 align-items-center">
 57              <div class="col-auto">
 58                <label for="titleInput">Title</label>
 59              </div>
 60              <div class="col-auto">
 061                <input id="titleInput" @ref="TitleInput" @bind-value="@State.SelectedList.Title" type="text" class="form
 62              </div>
 63              <div class="col-auto">
 64                <ValidationMessage For="@(() => State.SelectedList.Title)" />
 65              </div>
 66            </div>
 67
 68          </div>
 69          <div class="modal-footer justify-content-between">
 70            <button type="button" class="btn btn-default text-danger" @onclick="DeleteList">Delete</button>
 71            <span>
 72              <button type="submit" class="btn btn-primary">Update</button>
 73              <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
 74            </span>
 75          </div>
 76        </EditForm>
 77      </div>
 78    </div>
 79  </div>
 080}
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Todos\TodoItems.razor.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoItems.razor.cs" company="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Pages.Admin.Todos
 6{
 7    /// <summary>
 8    /// The todo item model.
 9    /// </summary>
 10    public partial class TodoItems
 11    {
 12        /// <summary>
 13        /// Gets or Sets the instance of the <see cref="TodoState"/> to use.
 14        /// </summary>
 15        [CascadingParameter]
 016        public TodoState State { get; set; }
 17
 18        /// <summary>
 19        /// Gets or Sets the instance of the <see cref="TodoItemResponse"/> to use.
 20        /// </summary>
 021        public TodoItemResponse SelectedItem { get; set; }
 22
 23        /// <summary>
 24        /// Gets or Sets the instance of the <see cref="ElementReference"/> to use.
 25        /// </summary>
 026        private ElementReference TitleInput { get; set; }
 27
 28        /// <summary>
 29        /// Gets or Sets the instance of the <see cref="ElementReference"/> to use.
 30        /// </summary>
 031        private ElementReference ListOptionsModal { get; set; }
 32
 33        /// <summary>
 34        /// Check if an item is seelcted or not.
 35        /// </summary>
 36        /// <param name="item">The todo item.</param>
 37        /// <returns>A boolean value.</returns>
 38        public bool IsSelectedItem(TodoItemResponse item)
 039        {
 040            return this.SelectedItem == item;
 041        }
 42
 43        /// <summary>
 44        /// Adding an item.
 45        /// </summary>
 46        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 47        private async Task AddItem()
 048        {
 049            var newItem = new TodoItemResponse { ListId = this.State.SelectedList.Id };
 50
 051            this.State.SelectedList.Items.Add(newItem);
 052            await this.EditItem(newItem);
 053        }
 54
 55        /// <summary>
 56        /// Mark the todo item as completed.
 57        /// </summary>
 58        /// <param name="item">The item.</param>
 59        /// <param name="args">The event.</param>
 60        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 61        private async Task ToggleDone(TodoItemResponse item, ChangeEventArgs args)
 062        {
 063            if (args != null && args.Value is bool value)
 064            {
 065                item.Done = value;
 066                await this.State.TodoItemService.PutTodoItemAsync(item);
 067            }
 068        }
 69
 70        /// <summary>
 71        /// Edit an item.
 72        /// </summary>
 73        /// <param name="item">The item.</param>
 74        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 75        private async Task EditItem(TodoItemResponse item)
 076        {
 077            this.SelectedItem = item;
 78
 079            await Task.Delay(50);
 080            if (this.TitleInput.Context != null)
 081            {
 082                await this.TitleInput.FocusAsync();
 083            }
 084        }
 85
 86        /// <summary>
 87        /// Saving an item.
 88        /// </summary>
 89        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 90        private async Task SaveItem()
 091        {
 092            if (this.SelectedItem.Id == 0)
 093            {
 094                if (string.IsNullOrWhiteSpace(this.SelectedItem.Title))
 095                {
 096                    this.State.SelectedList.Items.Remove(this.SelectedItem);
 097                }
 98                else
 099                {
 0100                    var item = await this.State.TodoItemService.PostTodoItemAsync(this.SelectedItem);
 0101                    this.SelectedItem.Id = item.Id;
 0102                }
 0103            }
 104            else
 0105            {
 0106                if (string.IsNullOrWhiteSpace(this.SelectedItem.Title))
 0107                {
 0108                    await this.State.TodoItemService.DeleteTodoItemAsync(this.SelectedItem.Id);
 0109                    this.State.SelectedList.Items.Remove(this.SelectedItem);
 0110                }
 111                else
 0112                {
 0113                    await this.State.TodoItemService.PutTodoItemAsync(this.SelectedItem);
 0114                }
 0115            }
 0116        }
 117
 118        /// <summary>
 119        /// Save a list.
 120        /// </summary>
 121        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 122        private async Task SaveList()
 0123        {
 0124            await this.State.TodoListService.PutTodoListAsync(this.State.SelectedList);
 125
 0126            this.State.JS.InvokeVoid(JsInteropConstants.HideModal, this.ListOptionsModal);
 0127            this.State.SyncList();
 0128        }
 129
 130        /// <summary>
 131        /// Delete a list.
 132        /// </summary>
 133        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 134        private async Task DeleteList()
 0135        {
 0136            await this.State.TodoListService.DeleteTodoListAsync(this.State.SelectedList.Id);
 137
 0138            this.State.JS.InvokeVoid(JsInteropConstants.HideModal, this.ListOptionsModal);
 0139            await this.State.DeleteList();
 0140        }
 141    }
 142}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoListService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoListService.html deleted file mode 100644 index 52230ab6..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoListService.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.TodoListService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.TodoListService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\TodoListService.cs
-
-
-
-
-
-
-
Line coverage
-
-
7%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:73
Coverable lines:79
Total lines:138
Line coverage:7.5%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:16
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
GetTodoListsAsync()0%40%
GetTodoListAsync()0%40%
PostTodoListAsync()0%40%
PutTodoListAsync()0%20%
DeleteTodoListAsync()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\TodoListService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoListService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="ITodoListService"/>.
 9    /// </summary>
 10    public partial class TodoListService : ITodoListService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="TodoListService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 517        public TodoListService(HttpClient httpClient, ISnackbar snackBar)
 518        {
 519            this.HttpClient = httpClient;
 520            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 521            this.SnackBar = snackBar;
 522        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<List<TodoListResponse>> GetTodoListsAsync()
 041        {
 042            var response = await this.HttpClient.GetAsync("TodoLists/lists");
 043            var responseResult = await response.Content.ReadAsStringAsync();
 044            var result = JsonSerializer.Deserialize<Result<TodoListResponse>>(
 045                responseResult, this.Options);
 46
 047            if (response.IsSuccessStatusCode == false)
 048            {
 049                this.SnackBar.Add(result.Error, Severity.Error);
 050                return null;
 51            }
 52
 053            return !response.IsSuccessStatusCode
 054                ? null
 055                : result.Items;
 056        }
 57
 58        /// <inheritdoc/>
 59        public async Task<TodoListResponse> GetTodoListAsync(int id)
 060        {
 061            var response = await this.HttpClient.GetAsync($"TodoLists/list/{id}");
 062            var responseResult = await response.Content.ReadAsStringAsync();
 063            var result = JsonSerializer.Deserialize<Result<TodoListResponse>>(
 064                responseResult, this.Options);
 65
 066            if (response.IsSuccessStatusCode == false)
 067            {
 068                this.SnackBar.Add(result.Error, Severity.Error);
 069            }
 70
 071            return !response.IsSuccessStatusCode
 072                ? null
 073                : result.Item;
 074        }
 75
 76        /// <inheritdoc/>
 77        public async Task<TodoListResponse> PostTodoListAsync(TodoListResponse todoList)
 078        {
 079            var response = await this.HttpClient.PostAsJsonAsync($"TodoLists/list", todoList);
 080            var responseResult = await response.Content.ReadAsStringAsync();
 081            var result = JsonSerializer.Deserialize<Result<TodoListResponse>>(
 082                responseResult, this.Options);
 83
 084            if (response.IsSuccessStatusCode == false)
 085            {
 086                this.SnackBar.Add(result.Error, Severity.Error);
 087            }
 88            else
 089            {
 090                this.SnackBar.Add("The todo list was created.", Severity.Success);
 091            }
 92
 093            return !response.IsSuccessStatusCode
 094                ? null
 095                : result.Item;
 096        }
 97
 98        /// <inheritdoc/>
 99        public async Task<RequestResponse> PutTodoListAsync(TodoListResponse todoList)
 0100        {
 0101            var response = await this.HttpClient.PutAsJsonAsync("TodoLists/list", todoList);
 0102            var responseResult = await response.Content.ReadAsStringAsync();
 0103            var result = JsonSerializer.Deserialize<RequestResponse>(
 0104                responseResult, this.Options);
 105
 0106            if (response.IsSuccessStatusCode == false)
 0107            {
 0108                this.SnackBar.Add(result.Error, Severity.Error);
 0109            }
 110            else
 0111            {
 0112                this.SnackBar.Add("The todo list was updated.", Severity.Success);
 0113            }
 114
 0115            return result;
 0116        }
 117
 118        /// <inheritdoc/>
 119        public async Task<RequestResponse> DeleteTodoListAsync(int id)
 0120        {
 0121            var response = await this.HttpClient.DeleteAsync($"TodoLists/list/{id}");
 0122            var responseResult = await response.Content.ReadAsStringAsync();
 0123            var result = JsonSerializer.Deserialize<RequestResponse>(
 0124                responseResult, this.Options);
 125
 0126            if (response.IsSuccessStatusCode == false)
 0127            {
 0128                this.SnackBar.Add(result.Error, Severity.Error);
 0129            }
 130            else
 0131            {
 0132                this.SnackBar.Add("The todo list was deleted.", Severity.Success);
 0133            }
 134
 0135            return result;
 0136        }
 137    }
 138}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoLists.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoLists.html deleted file mode 100644 index a5702075..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoLists.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Todos.TodoLists - Coverage Report - -
-

< Summary

-
-
-
Information
- -
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:37
Coverable lines:37
Total lines:142
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:10
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
File 1: BuildRenderTree(...)0%60%
File 2: .ctor()100%10%
File 2: get_State()100%10%
File 2: get_TitleInput()100%10%
File 2: get_NewListModal()100%10%
File 2: NewList()0%20%
File 2: CreateNewList()100%10%
File 2: IsSelected(...)100%10%
File 2: SelectList()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Todos\TodoLists.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="TodoLists.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 07@if (State.Initialised)
 08{
 9  <div class="clearfix">
 10    <h2 class="float-start">Lists</h2>
 11    <button class="btn btn-default float-end" title="Add List..." data-bs-toggle="modal" data-bs-target="#newListModal" 
 12      <span class="oi oi-plus"></span>
 13    </button>
 14  </div>
 15  <ul class="list-group">
 016    @foreach (var list in State.TodoLists)
 017    {
 018      <li class="list-group-item @(IsSelected(list) ? "active" : "")" @onclick="@(() => SelectList(list))">
 019        @list.Title
 20      </li>
 021    }
 22  </ul>
 023}
 24
 025<div @ref="NewListModal" class="modal fade" id="newListModal" tabindex="-1" aria-labelledby="newListModalLabel" aria-hid
 26  <div class="modal-dialog">
 27    <div class="modal-content">
 28      <div class="modal-header">
 29        <h5 class="modal-title" id="newListModalLabel">New List</h5>
 30        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
 31      </div>
 32      <EditForm Model="@newTodoList" OnValidSubmit="@CreateNewList">
 33        <div class="modal-body">
 34          <FluentValidationValidator DisableAssemblyScanning="true" />
 35
 36          <div class="row g-3 align-items-center">
 37            <div class="col-auto">
 38              <label for="titleInput">Title</label>
 39            </div>
 40            <div class="col-auto">
 041              <input id="titleInput" @ref="TitleInput" @bind-value="@newTodoList.Title" type="text" class="form-control"
 42            </div>
 43            <div class="col-auto">
 44              <ValidationMessage For="@(() => newTodoList.Title)" />
 45            </div>
 46          </div>
 47
 48        </div>
 49        <div class="modal-footer">
 50          <button type="submit" class="btn btn-primary">Create</button>
 51          <button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>
 52        </div>
 53      </EditForm>
 54    </div>
 55  </div>
 56</div>
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Todos\TodoLists.razor.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoLists.razor.cs" company="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Pages.Admin.Todos
 6{
 7    /// <summary>
 8    /// The todo list model.
 9    /// </summary>
 10    public partial class TodoLists
 11    {
 12        /// <summary>
 13        /// The instance of the <see cref="TodoListResponse"/> to use.
 14        /// </summary>
 015        private TodoListResponse newTodoList = new ();
 16
 17        /// <summary>
 18        /// Gets or Sets the instance of the <see cref="TodoState"/> to use.
 19        /// </summary>
 20        [CascadingParameter]
 021        public TodoState State { get; set; }
 22
 23        /// <summary>
 24        /// Gets or Sets the instance of the <see cref="ElementReference"/> to use.
 25        /// </summary>
 026        private ElementReference TitleInput { get; set; }
 27
 28        /// <summary>
 29        /// Gets or Sets the instance of the <see cref="ElementReference"/> to use.
 30        /// </summary>
 031        private ElementReference NewListModal { get; set; }
 32
 33        /// <summary>
 34        /// Creating a new list.
 35        /// </summary>
 36        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 37        private async Task NewList()
 038        {
 039            this.newTodoList = new TodoListResponse();
 40
 041            await Task.Delay(500);
 042            if (this.TitleInput.Context != null)
 043            {
 044                await this.TitleInput.FocusAsync();
 045            }
 046        }
 47
 48        /// <summary>
 49        /// Adding item to list.
 50        /// </summary>
 51        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 52        private async Task CreateNewList()
 053        {
 054            var list = await this.State.TodoListService.PostTodoListAsync(this.newTodoList);
 055            this.State.TodoLists.Add(list);
 56
 057            await this.SelectList(list);
 058            this.State.JS.InvokeVoid(JsInteropConstants.HideModal, this.NewListModal);
 059        }
 60
 61        /// <summary>
 62        /// Check if a list is selected.
 63        /// </summary>
 64        /// <param name="list">The todo list.</param>
 65        /// <returns>A boolean value.</returns>
 66        private bool IsSelected(TodoListResponse list)
 067        {
 068            return this.State.SelectedList.Id == list.Id;
 069        }
 70
 71        /// <summary>
 72        /// Select a list.
 73        /// </summary>
 74        /// <param name="list">The todo list.</param>
 75        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 76        private async Task SelectList(TodoListResponse list)
 077        {
 078            if (this.IsSelected(list))
 079            {
 080                return;
 81            }
 82
 083            this.State.SelectedList = await this.State.TodoListService.GetTodoListAsync(list.Id);
 084        }
 85    }
 86}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoState.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoState.html deleted file mode 100644 index e3083762..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_TodoState.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Todos.TodoState - Coverage Report - -
-

< Summary

-
-
-
Information
- -
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:31
Coverable lines:31
Total lines:112
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

- -

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Todos\TodoState.razor

-
- - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="TodoState.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7<CascadingValue Value=this>
 08  @ChildContent
 9</CascadingValue>
-
-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Todos\TodoState.razor.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="TodoState.razor.cs" company="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Pages.Admin.Todos
 6{
 7    /// <summary>
 8    /// The todos state model.
 9    /// </summary>
 10    public partial class TodoState
 11    {
 12        /// <summary>
 13        /// Gets or Sets the instance of the <see cref="RenderFragment"/> to use.
 14        /// </summary>
 15        [Parameter]
 016        public RenderFragment ChildContent { get; set; }
 17
 18        /// <summary>
 19        /// Gets or Sets the instance of the <see cref="ITodoListService"/> to use.
 20        /// </summary>
 21        [Inject]
 022        public ITodoListService TodoListService { get; set; }
 23
 24        /// <summary>
 25        /// Gets or Sets the instance of the <see cref="ITodoItemService"/> to use.
 26        /// </summary>
 27        [Inject]
 028        public ITodoItemService TodoItemService { get; set; }
 29
 30        /// <summary>
 31        /// Gets or Sets the instance of the <see cref="IJSInProcessRuntime"/> to use.
 32        /// </summary>
 33        [Inject]
 034        public IJSInProcessRuntime JS { get; set; }
 35
 36        /// <summary>
 37        /// Gets or Sets the instance of the <see cref="ICollection{TodoListResponse}"/> to use.
 38        /// </summary>
 039        public ICollection<TodoListResponse> TodoLists { get; set; }
 40
 41        /// <summary>
 42        /// Gets or Sets the instance of the <see cref="TodoListResponse"/> to use.
 43        /// </summary>
 44        public TodoListResponse SelectedList
 45        {
 46            get
 047            {
 048                return this.SelectedListPriv;
 049            }
 50
 51            set
 052            {
 053                this.SelectedListPriv = value;
 054                this.StateHasChanged();
 055            }
 56        }
 57
 58        /// <summary>
 59        /// Gets or sets a value indicating whether the todo is initialised or not.
 60        /// </summary>
 061        public bool Initialised { get; set; }
 62
 63        /// <summary>
 64        /// Gets or Sets the instance of the <see cref="TodoListResponse"/> to use.
 65        /// </summary>
 066        private TodoListResponse SelectedListPriv { get; set; }
 67
 68        /// <summary>
 69        /// Synch the list.
 70        /// </summary>
 71        public void SyncList()
 072        {
 073            var list = this.TodoLists.First(l => l.Id == this.SelectedList.Id);
 74
 075            list.Title = this.SelectedList.Title;
 076            this.StateHasChanged();
 077        }
 78
 79        /// <summary>
 80        /// Delete a todo list.
 81        /// </summary>
 82        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 83        public async Task DeleteList()
 084        {
 085            var list = this.TodoLists.First(l => l.Id == this.SelectedList.Id);
 086            this.TodoLists.Remove(list);
 87
 088            this.SelectedList = await this.TodoListService.GetTodoListAsync(this.TodoLists.First().Id);
 089            this.StateHasChanged();
 090        }
 91
 92        /// <summary>
 93        /// Initialize the component on load.
 94        /// </summary>
 95        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 96        protected override async Task OnInitializedAsync()
 097        {
 098            this.TodoLists = await this.TodoListService.GetTodoListsAsync();
 099            this.SelectedList = await this.TodoListService.GetTodoListAsync(this.TodoLists.First().Id);
 0100            this.Initialised = true;
 0101        }
 102    }
 103}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Unauthorized.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Unauthorized.html deleted file mode 100644 index f654569a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Unauthorized.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Internal.Unauthorized - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Internal.Unauthorized
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Internal\Unauthorized.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:3
Coverable lines:3
Total lines:28
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
OnInitializedAsync()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Internal\Unauthorized.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="unauthorized.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/unauthorized"
 8
 9@inject AuthenticationStateProvider AuthStateProvider
 10@inject IAuthenticationService AuthService
 11@inject NavigationManager NavManager
 12
 13<h3 class="mb-3">Unauthorized Request</h3>
 14
 15<div class="d-flex justify-content-center" style="margin-top: 100px;">
 16    <h4 style="font-size: 45px;"><em>User is not authorized...</em></h4>
 17</div>
 18
 19@code {
 20
 21    /// <summary>
 22    /// Initialize the component on load.
 23    /// </summary>
 24    protected override async Task OnInitializedAsync()
 025    {
 026        await this.AuthService.Logout();
 027    }
 28}
-
-
-
-
-

Methods/Properties

-OnInitializedAsync()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UpdateSubscriptionSuccess.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UpdateSubscriptionSuccess.html deleted file mode 100644 index c5b848f3..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UpdateSubscriptionSuccess.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Subscriptions.UpdateSubscriptionSuccess - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Subscriptions.UpdateSubscriptionSuccess
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Subscriptions\UpdateSubscriptionSuccess.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:88
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:2
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
get_Message()100%10%
Dispose()100%10%
OnInitialized()100%10%
OnParametersSet()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Subscriptions\UpdateSubscriptionSuccess.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="UpdateSubscriptionSuccess.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/update-subscription-success/{Message}"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Customer)]
 10
 11@inject NavigationManager NavManager
 12@inject HttpInterceptorService Interceptor
 13
 14<h3 class="text-center" style="margin-top: 30px;">Subscription Successful Updated</h3>
 15
 16<div class="container-card mt-3">
 17    <div class="card">
 18        <div style="border-radius:200px; height:200px; width:200px; background: #F8FAF5; margin:0 auto;">
 19            <i class="i checkmark">✓</i>
 20        </div>
 21        <h1 class="h1-custom">Success</h1>
 22        <p class="p">The subscription plan was updated!</p>
 23    </div>
 24</div>
 25
 26@code {
 27    [Parameter]
 028    public string Message { get; set; }
 29
 030    public void Dispose() => Interceptor.DisposeEvent();
 31
 32    /// <summary>
 33    /// Initialize the component on load.
 34    /// </summary>
 35    protected override void OnInitialized()
 036    {
 037        Interceptor.RegisterEvent();
 038    }
 39
 40    /// <summary>
 41    /// Initialize the component using the parameter.
 42    /// </summary>
 43    protected override void OnParametersSet()
 044    {
 045        if (!Message.Equals("subscription-made"))
 046        {
 047            NavManager.NavigateTo("musics");
 048        }
 049    }
 50}
 51
 52<style>
 53    .container-card {
 54        text-align: center;
 55        padding: 40px 0;
 56    }
 57
 58    .h1-custom {
 59        color: #88B04B;
 60        font-family: "Nunito Sans", "Helvetica Neue", sans-serif;
 61        font-weight: 900;
 62        font-size: 40px;
 63        margin-bottom: 10px;
 64    }
 65
 66    .p {
 67        color: #404F5E;
 68        font-family: "Nunito Sans", "Helvetica Neue", sans-serif;
 69        font-size:20px;
 70        margin: 0;
 71    }
 72
 73    .i {
 74        color: #9ABC66;
 75        font-size: 100px;
 76        line-height: 200px;
 77        margin-left:-15px;
 78    }
 79
 80    .card {
 81        background: white;
 82        padding: 60px;
 83        border-radius: 4px;
 84        box-shadow: 0 2px 3px #C8D0D8;
 85        display: inline-block;
 86        margin: 0 auto;
 87    }
 88</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserRoleHandler.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserRoleHandler.html deleted file mode 100644 index 036b8902..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserRoleHandler.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - -BlazorShop.WebClient.AuthPolicies.UserRoleHandler - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.AuthPolicies.UserRoleHandler
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\UserRoleHandler.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:33
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
HandleRequirementAsync(...)0%80%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\UserRoleHandler.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserRoleHandler.cs" company="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.AuthPolicies
 6{
 7    /// <summary>
 8    /// Handle the requirement of user role.
 9    /// </summary>
 10    public class UserRoleHandler : AuthorizationHandler<UserRoleRequirement>
 11    {
 12        /// <summary>
 13        /// Search for the user role.
 14        /// </summary>
 15        /// <param name="context">The instance of the <see cref="AuthorizationHandlerContext"/>.</param>
 16        /// <param name="requirement">The instance of the <see cref="UserRoleRequirement"/>.</param>
 17        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 18        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, UserRoleRequirement requirem
 019        {
 020            if (context.User.Identity.IsAuthenticated)
 021            {
 022                var userRole = context.User.Claims.FirstOrDefault(c => c.Type == StringRoleResources.RoleClaim && c.Valu
 23
 024                if (userRole != null && userRole.Value.Equals(requirement.Role))
 025                {
 026                    context.Succeed(requirement);
 027                }
 028            }
 29
 030            return Task.CompletedTask;
 031        }
 32    }
 33}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserRoleRequirement.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserRoleRequirement.html deleted file mode 100644 index 7b66318a..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserRoleRequirement.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -BlazorShop.WebClient.AuthPolicies.UserRoleRequirement - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.AuthPolicies.UserRoleRequirement
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\UserRoleRequirement.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:26
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Role()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\AuthPolicies\UserRoleRequirement.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserRoleRequirement.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.AuthPolicies
 6{
 7    /// <summary>
 8    /// A custom policy to check for the User role.
 9    /// </summary>
 10    public class UserRoleRequirement : IAuthorizationRequirement
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UserRoleRequirement"/> class.
 14        /// </summary>
 15        /// <param name="role">The role name.</param>
 016        public UserRoleRequirement(string role)
 017        {
 018            this.Role = role;
 019        }
 20
 21        /// <summary>
 22        /// Gets the role name.
 23        /// </summary>
 024        public string Role { get; }
 25    }
 26}
-
-
-
-
-

Methods/Properties

-.ctor(System.String)
-get_Role()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserService.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserService.html deleted file mode 100644 index ba83983c..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_UserService.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Services.UserService - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Services.UserService
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\UserService.cs
-
-
-
-
-
-
-
Line coverage
-
-
4%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:130
Coverable lines:136
Total lines:214
Line coverage:4.4%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:22
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_HttpClient()100%10%
get_SnackBar()100%10%
get_Options()100%10%
AddUser()0%20%
ActivateUser()0%20%
DeleteUser()0%20%
GetUser()0%40%
GetUsers()0%40%
GetUsersInactive()0%40%
UpdateUser()0%20%
UpdateUserEmail()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Services\UserService.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="UserService.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WebClient.Services
 6{
 7    /// <summary>
 8    /// An implementation of <see cref="IUserService"/>.
 9    /// </summary>
 10    public class UserService : IUserService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="UserService"/> class.
 14        /// </summary>
 15        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 16        /// <param name="snackBar">The instance of the <see cref="ISnackbar"/> to use.</param>
 817        public UserService(HttpClient httpClient, ISnackbar snackBar)
 818        {
 819            this.HttpClient = httpClient;
 820            this.Options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
 821            this.SnackBar = snackBar;
 822        }
 23
 24        /// <summary>
 25        /// Gets the instance of the <see cref="HttpClient"/> to use.
 26        /// </summary>
 027        private HttpClient HttpClient { get; }
 28
 29        /// <summary>
 30        /// Gets the instance of the <see cref="ISnackbar"/> to use.
 31        /// </summary>
 032        private ISnackbar SnackBar { get; }
 33
 34        /// <summary>
 35        /// Gets the instance of the <see cref="JsonSerializerOptions"/> to use.
 36        /// </summary>
 037        private JsonSerializerOptions Options { get; }
 38
 39        /// <inheritdoc/>
 40        public async Task<RequestResponse> AddUser(UserResponse user)
 041        {
 042            var data = new CreateUserCommand
 043            {
 044                Email = user.Email,
 045                FirstName = user.FirstName,
 046                LastName = user.LastName,
 047                Role = user.RoleName,
 048            };
 49
 050            var response = await this.HttpClient.PostAsJsonAsync($"Users/user", data);
 051            var responseResult = await response.Content.ReadAsStringAsync();
 052            var result = JsonSerializer.Deserialize<RequestResponse>(
 053                responseResult, this.Options);
 54
 055            if (response.IsSuccessStatusCode == false)
 056            {
 057                this.SnackBar.Add(result.Error, Severity.Error);
 058            }
 59            else
 060            {
 061                this.SnackBar.Add("The user was added.", Severity.Success);
 062            }
 63
 064            return result;
 065        }
 66
 67        /// <inheritdoc/>
 68        public async Task<RequestResponse> ActivateUser(int userId)
 069        {
 070            var data = new ActivateUserCommand
 071            {
 072                Id = userId,
 073            };
 74
 075            var response = await this.HttpClient.PostAsJsonAsync($"Users/userActivate", data);
 076            var responseResult = await response.Content.ReadAsStringAsync();
 077            var result = JsonSerializer.Deserialize<RequestResponse>(
 078                responseResult, this.Options);
 79
 080            if (response.IsSuccessStatusCode == false)
 081            {
 082                this.SnackBar.Add(result.Error, Severity.Error);
 083            }
 84            else
 085            {
 086                this.SnackBar.Add("The user was activated.", Severity.Success);
 087            }
 88
 089            return result;
 090        }
 91
 92        /// <inheritdoc/>
 93        public async Task<RequestResponse> DeleteUser(int id)
 094        {
 095            var response = await this.HttpClient.DeleteAsync($"Users/user/{id}");
 096            var responseResult = await response.Content.ReadAsStringAsync();
 097            var result = JsonSerializer.Deserialize<RequestResponse>(
 098                responseResult, this.Options);
 99
 0100            if (response.IsSuccessStatusCode == false)
 0101            {
 0102                this.SnackBar.Add(result.Error, Severity.Error);
 0103            }
 104            else
 0105            {
 0106                this.SnackBar.Add("The user was deleted.", Severity.Success);
 0107            }
 108
 0109            return result;
 0110        }
 111
 112        /// <inheritdoc/>
 113        public async Task<UserResponse> GetUser(int id)
 0114        {
 0115            var response = await this.HttpClient.GetAsync($"Users/user/{id}");
 0116            var responseResult = await response.Content.ReadAsStringAsync();
 0117            var result = JsonSerializer.Deserialize<Result<UserResponse>>(
 0118                responseResult, this.Options);
 119
 0120            if (response.IsSuccessStatusCode == false)
 0121            {
 0122                this.SnackBar.Add(result.Error, Severity.Error);
 0123            }
 124
 0125            return !response.IsSuccessStatusCode
 0126                ? null
 0127                : result.Item;
 0128        }
 129
 130        /// <inheritdoc/>
 131        public async Task<List<UserResponse>> GetUsers()
 0132        {
 0133            var response = await this.HttpClient.GetAsync("Users/users");
 0134            var responseResult = await response.Content.ReadAsStringAsync();
 0135            var result = JsonSerializer.Deserialize<Result<UserResponse>>(
 0136                responseResult, this.Options);
 137
 0138            if (response.IsSuccessStatusCode == false)
 0139            {
 0140                this.SnackBar.Add(result.Error, Severity.Error);
 0141            }
 142
 0143            return !response.IsSuccessStatusCode
 0144                ? null
 0145                : result.Items;
 0146        }
 147
 148        /// <inheritdoc/>
 149        public async Task<List<UserResponse>> GetUsersInactive()
 0150        {
 0151            var response = await this.HttpClient.GetAsync("Users/usersInactive");
 0152            var responseResult = await response.Content.ReadAsStringAsync();
 0153            var result = JsonSerializer.Deserialize<Result<UserResponse>>(
 0154                responseResult, this.Options);
 155
 0156            if (response.IsSuccessStatusCode == false)
 0157            {
 0158                this.SnackBar.Add(result.Error, Severity.Error);
 0159            }
 160
 0161            return !response.IsSuccessStatusCode
 0162                ? null
 0163                : result.Items;
 0164        }
 165
 166        /// <inheritdoc/>
 167        public async Task<RequestResponse> UpdateUser(UserResponse user)
 0168        {
 0169            var data = new UpdateUserCommand
 0170            {
 0171                Id = user.Id,
 0172                FirstName = user.FirstName,
 0173                LastName = user.LastName,
 0174                Role = user.RoleName,
 0175            };
 176
 0177            var response = await this.HttpClient.PutAsJsonAsync($"Users/user", data);
 0178            var responseResult = await response.Content.ReadAsStringAsync();
 0179            var result = JsonSerializer.Deserialize<RequestResponse>(
 0180                responseResult, this.Options);
 181
 0182            if (response.IsSuccessStatusCode == false)
 0183            {
 0184                this.SnackBar.Add(result.Error, Severity.Error);
 0185            }
 186            else
 0187            {
 0188                this.SnackBar.Add("The user was updated.", Severity.Success);
 0189            }
 190
 0191            return result;
 0192        }
 193
 194        /// <inheritdoc/>
 195        public async Task<RequestResponse> UpdateUserEmail(UpdateUserEmailCommand user)
 0196        {
 0197            var response = await this.HttpClient.PutAsJsonAsync($"Users/userEmail", user);
 0198            var responseResult = await response.Content.ReadAsStringAsync();
 0199            var result = JsonSerializer.Deserialize<RequestResponse>(
 0200                responseResult, this.Options);
 201
 0202            if (response.IsSuccessStatusCode == false)
 0203            {
 0204                this.SnackBar.Add(result.Error, Severity.Error);
 0205            }
 206            else
 0207            {
 0208                this.SnackBar.Add("The user email address was updated.", Severity.Success);
 0209            }
 210
 0211            return result;
 0212        }
 213    }
 214}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Users.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Users.html deleted file mode 100644 index 0a787aca..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_Users.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Admin.Users.Users - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Admin.Users.Users
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Users\Users.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:82
Coverable lines:82
Total lines:265
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:12
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%120%
<BuildRenderTree()100%10%
<BuildRenderTree()100%10%
.ctor()100%10%
ModalShow()100%10%
ModalCancel()100%10%
ModalOk()100%10%
ModalActivateUserShow()100%10%
ModalActivateUserCancel()100%10%
ModalActivateUserOk()100%10%
get_usersList()100%10%
get_inactiveUsersList()100%10%
Dispose()100%10%
OnInitializedAsync()100%10%
GetUsers()100%10%
GetUsersInactive()100%10%
DeleteConfirm(...)100%10%
ActivateUserConfirm(...)100%10%
DeleteUser()100%10%
ActivateUser()100%10%
NavigateToPage(...)100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Admin\Users\Users.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="Users.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/admin/users"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Admin)]
 10
 11@inject IUserService UserService
 12@inject NavigationManager NavManager
 13@inject HttpInterceptorService Interceptor
 14
 15<h1 class="display-3 font-weight-bold mb-0 text-primary mb-3">Users List</h1>
 16
 17<div class="row mb-4">
 18    <div class="col">
 19        <MatButtonLink Href="admin/users/add" Raised="true">Add User</MatButtonLink>
 20    </div>
 21</div>
 22
 023@if (usersList is null)
 024{
 25    <div class="d-flex justify-content-center" style="margin-top: 100px;">
 26        <h4 style="font-size: 45px;"><em>Loading the data...</em></h4>
 27    </div>
 028}
 29else
 030{
 031    @if (usersList.Count > 0)
 032    {
 33        <MatTable Items="@usersList" LoadInitialData="true" Striped="true" AllowSelection="true"
 34            RowClass="tester" FilterByColumnName="Email" DebounceMilliseconds="150" class="mat-elevation-z5">
 35            <MatTableHeader>
 36                <th>Id</th>
 37                <th>FirstName</th>
 38                <th>LastName</th>
 39                <th class="col-md-3">UserName</th>
 40                <th class="col-md-3">Email</th>
 41                <th>IsActive</th>
 42                <th class="col-md-6">Actions</th>
 43            </MatTableHeader>
 44
 45            <MatTableRow>
 046                <td>@String.Format("{0:d}", @context.Id)</td>
 047                <td>@context.FirstName</td>
 048                <td>@context.LastName</td>
 049                <td class="col-md-3">@context.Username</td>
 050                <td class="col-md-3">@context.Email</td>
 051                <td>@context.IsActive</td>
 52                <td class="col-md-6">
 53                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Edit"
 054                        Color="Color.Success" @onclick="() => NavigateToPage(context.Id)">
 55                        Edit
 56                    </MudButton>
 57                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 058                        Color="Color.Error" @onclick="(() => { DeleteConfirm(context.Id); ModalShow(); })">
 59                        Delete
 60                    </MudButton>
 61                </td>
 62            </MatTableRow>
 63        </MatTable>
 64
 065        @if (showModal)
 066        {
 67            <div class="modal fade show" id="myModal" style="display:block; margin-top: 150px;" aria-modal="true" role="
 68                <div class="modal-dialog">
 69                    <div class="modal-content">
 70                        <div class="modal-header">
 71                            <h3 class="modal-title">Delete user</h3>
 72                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Close"
 73                                Color="Color.Warning" @onclick="@ModalCancel"
 74                                data-bs-dismiss="modal" aria-label="Close">
 75                                Close
 76                            </MudButton>
 77                        </div>
 78                        <div class="modal-body">
 79                            <h4>Do you want to de-activate this user's account?</h4>
 80                        </div>
 81                        <div class="modal-footer">
 82                            <MudButton class="mr-2" Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 083                                Color="Color.Error" @onclick="(async () => { await DeleteUser(user.Id); ModalOk(); })">
 84                                Delete
 85                            </MudButton>
 86                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel"
 87                                Color="Color.Warning" @onclick="@ModalCancel">
 88                                Cancel
 89                            </MudButton>
 90                        </div>
 91                    </div>
 92                </div>
 93            </div>
 094        }
 095    }
 96    else
 097    {
 98        <div class="d-flex justify-content-center" style="margin-top: 150px;">
 99            <h4 style="font-size: 45px;">No record found</h4>
 100        </div>
 0101    }
 0102}
 103
 0104@if (inactiveUsersList is not null)
 0105{
 0106    @if (inactiveUsersList.Count > 0)
 0107    {
 108        <h1 class="display-3 font-weight-bold mb-0 text-primary mb-3">Inactive Users List</h1>
 109
 110        <MatTable Items="@inactiveUsersList" LoadInitialData="true" Striped="true" AllowSelection="true"
 111            RowClass="tester" FilterByColumnName="Email" DebounceMilliseconds="150" class="mat-elevation-z5">
 112            <MatTableHeader>
 113                <th>Id</th>
 114                <th>FirstName</th>
 115                <th>LastName</th>
 116                <th class="col-md-3">UserName</th>
 117                <th class="col-md-3">Email</th>
 118                <th>IsActive</th>
 119                <th class="col-md-6">Actions</th>
 120            </MatTableHeader>
 121
 122            <MatTableRow>
 0123                <td>@String.Format("{0:d}", @context.Id)</td>
 0124                <td>@context.FirstName</td>
 0125                <td>@context.LastName</td>
 0126                <td class="col-md-3">@context.Username</td>
 0127                <td class="col-md-3">@context.Email</td>
 0128                <td>@context.IsActive</td>
 129                <td class="col-md-6">
 130                    <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 0131                        Color="Color.Error" @onclick="(() => { ActivateUserConfirm(context.Id); ModalActivateUserShow();
 132                        Activate User
 133                    </MudButton>
 134                </td>
 135            </MatTableRow>
 136        </MatTable>
 137
 0138        @if (showActivateUserModal)
 0139        {
 140            <div class="modal fade show" id="myModal" style="display:block; margin-top: 150px;" aria-modal="true" role="
 141                <div class="modal-dialog">
 142                    <div class="modal-content">
 143                        <div class="modal-header">
 144                            <h3 class="modal-title">Activate User</h3>
 145                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Close"
 146                                Color="Color.Warning" @onclick="@ModalCancel"
 147                                type="button" data-bs-dismiss="modal" aria-label="Close">
 148                                Close
 149                            </MudButton>
 150                        </div>
 151                        <div class="modal-body">
 152                            <h4>Do you want to activate this user account?</h4>
 153                        </div>
 154                        <div class="modal-footer">
 155                            <MudButton class="mr-2" Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Delete"
 0156                                Color="Color.Error" @onclick="(async () => { await ActivateUser(userInactive.Id); ModalA
 157                                Activate User
 158                            </MudButton>
 159                            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Cancel"
 160                                Color="Color.Warning" @onclick="@ModalActivateUserCancel">
 161                                Cancel
 162                            </MudButton>
 163                        </div>
 164                    </div>
 165                </div>
 166            </div>
 0167        }
 0168    }
 0169}
 170
 171@code {
 0172    bool showModal = false;
 0173    void ModalShow() => showModal = true;
 0174    void ModalCancel() => showModal = false;
 0175    void ModalOk() => showModal = false;
 176
 0177    bool showActivateUserModal = false;
 0178    void ModalActivateUserShow() => showActivateUserModal = true;
 0179    void ModalActivateUserCancel() => showActivateUserModal = false;
 0180    void ModalActivateUserOk() => showActivateUserModal = false;
 181
 0182    protected UserResponse user = new();
 0183    protected UserResponse userInactive = new();
 184
 0185    protected List<UserResponse> usersList { get; set; }
 0186    protected List<UserResponse> inactiveUsersList { get; set; }
 187
 0188    public void Dispose() => Interceptor.DisposeEvent();
 189
 190    /// <summary>
 191    /// Initialize the component on load.
 192    /// </summary>
 193    protected override async Task OnInitializedAsync()
 0194    {
 0195        Interceptor.RegisterEvent();
 0196        await GetUsers();
 0197        await GetUsersInactive();
 0198    }
 199
 200    /// <summary>
 201    /// Get the active users.
 202    /// </summary>
 203    protected async Task GetUsers()
 0204    {
 0205        usersList = await UserService.GetUsers();
 0206    }
 207
 208    /// <summary>
 209    /// Get the inactive users.
 210    /// </summary>
 211    protected async Task GetUsersInactive()
 0212    {
 0213        inactiveUsersList = await UserService.GetUsersInactive();
 0214    }
 215
 216    /// <summary>
 217    /// Confirm the delete operation.
 218    /// </summary>
 219    protected void DeleteConfirm(int Id)
 0220    {
 0221        user = usersList.FirstOrDefault(x => x.Id == Id);
 0222    }
 223
 224    /// <summary>
 225    /// Confirm the user activation.
 226    /// </summary>
 227    protected void ActivateUserConfirm(int Id)
 0228    {
 0229        userInactive = inactiveUsersList.FirstOrDefault(x => x.Id == Id);
 0230    }
 231
 232    /// <summary>
 233    /// Delete the user.
 234    /// </summary>
 235    protected async Task DeleteUser(int Id)
 0236    {
 0237        await UserService.DeleteUser(Id);
 0238        await GetUsers();
 0239        await GetUsersInactive();
 0240    }
 241
 242    /// <summary>
 243    /// Activate the user.
 244    /// </summary>
 245    protected async Task ActivateUser(int Id)
 0246    {
 0247        await UserService.ActivateUser(Id);
 0248        await GetUsersInactive();
 0249        await GetUsers();
 0250    }
 251
 252    /// <summary>
 253    /// Navigation page.
 254    /// </summary>
 255    private void NavigateToPage(int id)
 0256    {
 0257        NavManager.NavigateTo($"admin/users/edit/{id}");
 0258    }
 259}
 260
 261<style>
 262    label {
 263        width: 70%;
 264    }
 265</style>
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_VerifyAuth.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_VerifyAuth.html deleted file mode 100644 index cb65b169..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WebClient_VerifyAuth.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - -BlazorShop.WebClient.Pages.Account.VerifyAuth - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WebClient.Pages.Account.VerifyAuth
Assembly:BlazorShop.WebClient
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\VerifyAuth.razor
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:38
Coverable lines:38
Total lines:75
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:14
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
BuildRenderTree(...)0%20%
get_AuthState()100%10%
.ctor()100%10%
OnInitializedAsync()0%20%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WebClient\Pages\Account\VerifyAuth.razor

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1@*
 2  <copyright file="VerifyAuth.razor" company="Beniamin Jitca" author="Beniamin Jitca">
 3   Copyright (c) Beniamin Jitca. All rights reserved.
 4  </copyright>
 5*@
 6
 7@page "/verifyauth"
 8
 9@attribute [Authorize(Policy = StringRoleResources.Admin)]
 10
 11<h3>Verify Auth</h3>
 12
 013@if (isAuthenticated)
 014{
 015    <h4>@userName is authenticated</h4>
 16    <ul>
 017        <li>Access to Admin Role: @isAdminRole</li>
 018        <li>Access to Cashier Role: @isUserRole</li>
 019        <li>Access to Manager Role: @isDefaultRole</li>
 20
 21        <li></li>
 022        <li>Access to Admin Claim: @isAdminClaim</li>
 023        <li>Access to Default Claim: @isUserClaim</li>
 024        <li>Access to User Claim: @isDefaultClaim</li>
 25    </ul>
 026}
 27else
 028{
 29    <h4>The user is not authenticated</h4>
 030}
 31
 32@code {
 33    [CascadingParameter]
 034    public Task<AuthenticationState> AuthState { get; set; }
 35
 036    private bool isAuthenticated = false;
 37    private string userName;
 38
 039    private bool isAdminRole = false;
 040    private bool isUserRole = false;
 041    private bool isDefaultRole = false;
 42
 043    private bool isUser = false;
 44
 045    private bool isAdminClaim = false;
 046    private bool isUserClaim = false;
 047    private bool isDefaultClaim = false;
 48
 49    /// <summary>
 50    /// Initialize the component on load.
 51    /// </summary>
 52    protected override async Task OnInitializedAsync()
 053    {
 054        var authState = await AuthState;
 55
 056        if (authState.User.Identity.IsAuthenticated)
 057        {
 058            isAuthenticated = true;
 059            userName = authState.User.FindFirst(x => x.Type == StringRoleResources.NameClaim || x.Type == StringRoleReso
 60
 061            isAdminRole = authState.User.IsInRole(StringRoleResources.Admin);
 062            isUserRole = authState.User.IsInRole(StringRoleResources.User);
 063            isDefaultRole = authState.User.IsInRole(StringRoleResources.Default);
 64
 065            isUser = authState.User.HasClaim(x => x.Type == StringRoleResources.RoleClaim && x.Value == StringRoleResour
 66
 067            isAdminClaim = authState.User.HasClaim(x => x.Type == StringRoleResources.RoleClaim && x.Value == StringRole
 068            isUserClaim = authState.User.HasClaim(x => x.Type == StringRoleResources.RoleClaim && x.Value == StringRoleR
 069            isDefaultClaim = authState.User.HasClaim(x => x.Type == StringRoleResources.RoleClaim && x.Value == StringRo
 70
 071            var userClaims = authState.User.Claims;
 072            var username = authState.User.Identity.Name;
 073        }
 074    }
 75}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WorkerService_Program.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WorkerService_Program.html deleted file mode 100644 index f7331257..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WorkerService_Program.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -Program - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:Program
Assembly:BlazorShop.WorkerService
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WorkerService\Program.cs
-
-
-
-
-
-
-
Line coverage
-
-
0%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:28
Line coverage:0%
-
-
-
-
-
Branch coverage
-
-
N/A
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:0
Branch coverage:N/A
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
<Main>$()100%10%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WorkerService\Program.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Program.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5// The configurations for the background worker.
 6try
 07{
 08    IHost host = Host.CreateDefaultBuilder(args)
 09        .ConfigureServices((hostContext, services) =>
 010        {
 011            IConfiguration configuration = hostContext.Configuration;
 012
 013            services.AddHttpClient();
 014            services.AddDbContext<ApplicationDbContext>(opts =>
 015                  opts.UseSqlServer(
 016                    configuration["ConnectionStrings:WebApiConnection"],
 017                    b => b.MigrationsAssembly(typeof(ApplicationDbContext).Assembly.FullName)));
 018
 019            services.AddHostedService<Worker>();
 020        })
 021        .Build();
 22
 023    await host.RunAsync();
 024}
 025catch (Exception ex)
 026{
 027    Log.Fatal(ex, "Unhandled exception");
 028}
-
-
-
-
-

Methods/Properties

-<Main>$()
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/BlazorShop.WorkerService_Worker.html b/BlazorShop.UnitTests/codecoverage/BlazorShop.WorkerService_Worker.html deleted file mode 100644 index ae004482..00000000 --- a/BlazorShop.UnitTests/codecoverage/BlazorShop.WorkerService_Worker.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -BlazorShop.WorkerService.Worker - Coverage Report - -
-

< Summary

-
-
-
Information
-
-
- - - - - - - - - - - - - -
Class:BlazorShop.WorkerService.Worker
Assembly:BlazorShop.WorkerService
File(s):C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WorkerService\Worker.cs
-
-
-
-
-
-
-
Line coverage
-
-
17%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:6
Uncovered lines:29
Coverable lines:35
Total lines:77
Line coverage:17.1%
-
-
-
-
-
Branch coverage
-
-
0%
-
- - - - - - - - - - - - - -
Covered branches:0
Total branches:8
Branch coverage:0%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Metrics

-
- - - - - - - - - -
MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_Logger()100%10%
get_ServiceScopeFactory()100%10%
get_HttpClient()100%10%
ExecuteAsync()0%80%
-
-

File(s)

-

C:\Users\Beni\source\repos\BlazorShop\BlazorShop.WorkerService\Worker.cs

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#LineLine coverage
 1// <copyright file="Worker.cs" company="Beniamin Jitca" author="Beniamin Jitca">
 2// Copyright (c) Beniamin Jitca. All rights reserved.
 3// </copyright>
 4
 5namespace BlazorShop.WorkerService
 6{
 7    /// <summary>
 8    /// A service for the background worker.
 9    /// </summary>
 10    public class Worker : BackgroundService
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="Worker"/> class.
 14        /// </summary>
 15        /// <param name="logger">The instance of the <see cref="ILogger{Worker}"/> to use.</param>
 16        /// <param name="serviceScopeFactory">The instance of the <see cref="IServiceScopeFactory"/> to use.</param>
 17        /// <param name="httpClient">The instance of the <see cref="HttpClient"/> to use.</param>
 418        public Worker(ILogger<Worker> logger, IServiceScopeFactory serviceScopeFactory, HttpClient httpClient)
 419        {
 420            this.Logger = logger;
 421            this.ServiceScopeFactory = serviceScopeFactory;
 422            this.HttpClient = httpClient;
 423        }
 24
 25        /// <summary>
 26        /// Gets the instance of the <see cref="ILogger{Worker}"/> to use.
 27        /// </summary>
 028        private ILogger<Worker> Logger { get; }
 29
 30        /// <summary>
 31        /// Gets the instance of the <see cref="IServiceScopeFactory"/> to use.
 32        /// </summary>
 033        private IServiceScopeFactory ServiceScopeFactory { get; }
 34
 35        /// <summary>
 36        /// Gets the instance of the <see cref="HttpClient"/> to use.
 37        /// </summary>
 038        private HttpClient HttpClient { get; }
 39
 40        /// <summary>
 41        /// The background task to execute the instructions.
 42        /// </summary>
 43        /// <param name="stoppingToken">The cancellation token.</param>
 44        /// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
 45        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
 046        {
 47            try
 048            {
 049                while (!stoppingToken.IsCancellationRequested)
 050                {
 051                    using var scope = this.ServiceScopeFactory.CreateScope();
 052                    var dbContext = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
 53
 054                    var subscriptions = dbContext.Subscribers.Where(x => x.Status == SubscriptionStatus.Active).ToList()
 055                    foreach (var subscription in subscriptions)
 056                    {
 057                        if (subscription.Status == SubscriptionStatus.Active && subscription.CurrentPeriodEnd > DateTime
 058                        {
 059                            await this.HttpClient.DeleteAsync($"https://localhost:44351/api/Payments/cancel-subscription
 60
 061                            subscription.Status = SubscriptionStatus.Inactive;
 062                            dbContext.Subscribers.Update(subscription);
 063                            await dbContext.SaveChangesAsync(stoppingToken);
 064                        }
 065                    }
 66
 067                    this.Logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
 068                    await Task.Delay(1000, stoppingToken);
 069                }
 070            }
 071            catch (Exception ex)
 072            {
 073                Log.Error(ex, "Error");
 074            }
 075        }
 76    }
 77}
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/class.js b/BlazorShop.UnitTests/codecoverage/class.js deleted file mode 100644 index b7a43b26..00000000 --- a/BlazorShop.UnitTests/codecoverage/class.js +++ /dev/null @@ -1,218 +0,0 @@ -/* Chartist.js 0.11.4 - * Copyright © 2019 Gion Kunz - * Free to use under either the WTFPL license or the MIT license. - * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL - * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT - */ - -!function (a, b) { "function" == typeof define && define.amd ? define("Chartist", [], function () { return a.Chartist = b() }) : "object" == typeof module && module.exports ? module.exports = b() : a.Chartist = b() }(this, function () { - var a = { version: "0.11.4" }; return function (a, b) { "use strict"; var c = a.window, d = a.document; b.namespaces = { svg: "http://www.w3.org/2000/svg", xmlns: "http://www.w3.org/2000/xmlns/", xhtml: "http://www.w3.org/1999/xhtml", xlink: "http://www.w3.org/1999/xlink", ct: "http://gionkunz.github.com/chartist-js/ct" }, b.noop = function (a) { return a }, b.alphaNumerate = function (a) { return String.fromCharCode(97 + a % 26) }, b.extend = function (a) { var c, d, e; for (a = a || {}, c = 1; c < arguments.length; c++) { d = arguments[c]; for (var f in d) e = d[f], "object" != typeof e || null === e || e instanceof Array ? a[f] = e : a[f] = b.extend(a[f], e) } return a }, b.replaceAll = function (a, b, c) { return a.replace(new RegExp(b, "g"), c) }, b.ensureUnit = function (a, b) { return "number" == typeof a && (a += b), a }, b.quantity = function (a) { if ("string" == typeof a) { var b = /^(\d+)\s*(.*)$/g.exec(a); return { value: +b[1], unit: b[2] || void 0 } } return { value: a } }, b.querySelector = function (a) { return a instanceof Node ? a : d.querySelector(a) }, b.times = function (a) { return Array.apply(null, new Array(a)) }, b.sum = function (a, b) { return a + (b ? b : 0) }, b.mapMultiply = function (a) { return function (b) { return b * a } }, b.mapAdd = function (a) { return function (b) { return b + a } }, b.serialMap = function (a, c) { var d = [], e = Math.max.apply(null, a.map(function (a) { return a.length })); return b.times(e).forEach(function (b, e) { var f = a.map(function (a) { return a[e] }); d[e] = c.apply(null, f) }), d }, b.roundWithPrecision = function (a, c) { var d = Math.pow(10, c || b.precision); return Math.round(a * d) / d }, b.precision = 8, b.escapingMap = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, b.serialize = function (a) { return null === a || void 0 === a ? a : ("number" == typeof a ? a = "" + a : "object" == typeof a && (a = JSON.stringify({ data: a })), Object.keys(b.escapingMap).reduce(function (a, c) { return b.replaceAll(a, c, b.escapingMap[c]) }, a)) }, b.deserialize = function (a) { if ("string" != typeof a) return a; a = Object.keys(b.escapingMap).reduce(function (a, c) { return b.replaceAll(a, b.escapingMap[c], c) }, a); try { a = JSON.parse(a), a = void 0 !== a.data ? a.data : a } catch (c) { } return a }, b.createSvg = function (a, c, d, e) { var f; return c = c || "100%", d = d || "100%", Array.prototype.slice.call(a.querySelectorAll("svg")).filter(function (a) { return a.getAttributeNS(b.namespaces.xmlns, "ct") }).forEach(function (b) { a.removeChild(b) }), f = new b.Svg("svg").attr({ width: c, height: d }).addClass(e), f._node.style.width = c, f._node.style.height = d, a.appendChild(f._node), f }, b.normalizeData = function (a, c, d) { var e, f = { raw: a, normalized: {} }; return f.normalized.series = b.getDataArray({ series: a.series || [] }, c, d), e = f.normalized.series.every(function (a) { return a instanceof Array }) ? Math.max.apply(null, f.normalized.series.map(function (a) { return a.length })) : f.normalized.series.length, f.normalized.labels = (a.labels || []).slice(), Array.prototype.push.apply(f.normalized.labels, b.times(Math.max(0, e - f.normalized.labels.length)).map(function () { return "" })), c && b.reverseData(f.normalized), f }, b.safeHasProperty = function (a, b) { return null !== a && "object" == typeof a && a.hasOwnProperty(b) }, b.isDataHoleValue = function (a) { return null === a || void 0 === a || "number" == typeof a && isNaN(a) }, b.reverseData = function (a) { a.labels.reverse(), a.series.reverse(); for (var b = 0; b < a.series.length; b++)"object" == typeof a.series[b] && void 0 !== a.series[b].data ? a.series[b].data.reverse() : a.series[b] instanceof Array && a.series[b].reverse() }, b.getDataArray = function (a, c, d) { function e(a) { if (b.safeHasProperty(a, "value")) return e(a.value); if (b.safeHasProperty(a, "data")) return e(a.data); if (a instanceof Array) return a.map(e); if (!b.isDataHoleValue(a)) { if (d) { var c = {}; return "string" == typeof d ? c[d] = b.getNumberOrUndefined(a) : c.y = b.getNumberOrUndefined(a), c.x = a.hasOwnProperty("x") ? b.getNumberOrUndefined(a.x) : c.x, c.y = a.hasOwnProperty("y") ? b.getNumberOrUndefined(a.y) : c.y, c } return b.getNumberOrUndefined(a) } } return a.series.map(e) }, b.normalizePadding = function (a, b) { return b = b || 0, "number" == typeof a ? { top: a, right: a, bottom: a, left: a } : { top: "number" == typeof a.top ? a.top : b, right: "number" == typeof a.right ? a.right : b, bottom: "number" == typeof a.bottom ? a.bottom : b, left: "number" == typeof a.left ? a.left : b } }, b.getMetaData = function (a, b) { var c = a.data ? a.data[b] : a[b]; return c ? c.meta : void 0 }, b.orderOfMagnitude = function (a) { return Math.floor(Math.log(Math.abs(a)) / Math.LN10) }, b.projectLength = function (a, b, c) { return b / c.range * a }, b.getAvailableHeight = function (a, c) { return Math.max((b.quantity(c.height).value || a.height()) - (c.chartPadding.top + c.chartPadding.bottom) - c.axisX.offset, 0) }, b.getHighLow = function (a, c, d) { function e(a) { if (void 0 !== a) if (a instanceof Array) for (var b = 0; b < a.length; b++)e(a[b]); else { var c = d ? +a[d] : +a; g && c > f.high && (f.high = c), h && c < f.low && (f.low = c) } } c = b.extend({}, c, d ? c["axis" + d.toUpperCase()] : {}); var f = { high: void 0 === c.high ? -Number.MAX_VALUE : +c.high, low: void 0 === c.low ? Number.MAX_VALUE : +c.low }, g = void 0 === c.high, h = void 0 === c.low; return (g || h) && e(a), (c.referenceValue || 0 === c.referenceValue) && (f.high = Math.max(c.referenceValue, f.high), f.low = Math.min(c.referenceValue, f.low)), f.high <= f.low && (0 === f.low ? f.high = 1 : f.low < 0 ? f.high = 0 : f.high > 0 ? f.low = 0 : (f.high = 1, f.low = 0)), f }, b.isNumeric = function (a) { return null !== a && isFinite(a) }, b.isFalseyButZero = function (a) { return !a && 0 !== a }, b.getNumberOrUndefined = function (a) { return b.isNumeric(a) ? +a : void 0 }, b.isMultiValue = function (a) { return "object" == typeof a && ("x" in a || "y" in a) }, b.getMultiValue = function (a, c) { return b.isMultiValue(a) ? b.getNumberOrUndefined(a[c || "y"]) : b.getNumberOrUndefined(a) }, b.rho = function (a) { function b(a, c) { return a % c === 0 ? c : b(c, a % c) } function c(a) { return a * a + 1 } if (1 === a) return a; var d, e = 2, f = 2; if (a % 2 === 0) return 2; do e = c(e) % a, f = c(c(f)) % a, d = b(Math.abs(e - f), a); while (1 === d); return d }, b.getBounds = function (a, c, d, e) { function f(a, b) { return a === (a += b) && (a *= 1 + (b > 0 ? o : -o)), a } var g, h, i, j = 0, k = { high: c.high, low: c.low }; k.valueRange = k.high - k.low, k.oom = b.orderOfMagnitude(k.valueRange), k.step = Math.pow(10, k.oom), k.min = Math.floor(k.low / k.step) * k.step, k.max = Math.ceil(k.high / k.step) * k.step, k.range = k.max - k.min, k.numberOfSteps = Math.round(k.range / k.step); var l = b.projectLength(a, k.step, k), m = l < d, n = e ? b.rho(k.range) : 0; if (e && b.projectLength(a, 1, k) >= d) k.step = 1; else if (e && n < k.step && b.projectLength(a, n, k) >= d) k.step = n; else for (; ;) { if (m && b.projectLength(a, k.step, k) <= d) k.step *= 2; else { if (m || !(b.projectLength(a, k.step / 2, k) >= d)) break; if (k.step /= 2, e && k.step % 1 !== 0) { k.step *= 2; break } } if (j++ > 1e3) throw new Error("Exceeded maximum number of iterations while optimizing scale step!") } var o = 2.221e-16; for (k.step = Math.max(k.step, o), h = k.min, i = k.max; h + k.step <= k.low;)h = f(h, k.step); for (; i - k.step >= k.high;)i = f(i, -k.step); k.min = h, k.max = i, k.range = k.max - k.min; var p = []; for (g = k.min; g <= k.max; g = f(g, k.step)) { var q = b.roundWithPrecision(g); q !== p[p.length - 1] && p.push(q) } return k.values = p, k }, b.polarToCartesian = function (a, b, c, d) { var e = (d - 90) * Math.PI / 180; return { x: a + c * Math.cos(e), y: b + c * Math.sin(e) } }, b.createChartRect = function (a, c, d) { var e = !(!c.axisX && !c.axisY), f = e ? c.axisY.offset : 0, g = e ? c.axisX.offset : 0, h = a.width() || b.quantity(c.width).value || 0, i = a.height() || b.quantity(c.height).value || 0, j = b.normalizePadding(c.chartPadding, d); h = Math.max(h, f + j.left + j.right), i = Math.max(i, g + j.top + j.bottom); var k = { padding: j, width: function () { return this.x2 - this.x1 }, height: function () { return this.y1 - this.y2 } }; return e ? ("start" === c.axisX.position ? (k.y2 = j.top + g, k.y1 = Math.max(i - j.bottom, k.y2 + 1)) : (k.y2 = j.top, k.y1 = Math.max(i - j.bottom - g, k.y2 + 1)), "start" === c.axisY.position ? (k.x1 = j.left + f, k.x2 = Math.max(h - j.right, k.x1 + 1)) : (k.x1 = j.left, k.x2 = Math.max(h - j.right - f, k.x1 + 1))) : (k.x1 = j.left, k.x2 = Math.max(h - j.right, k.x1 + 1), k.y2 = j.top, k.y1 = Math.max(i - j.bottom, k.y2 + 1)), k }, b.createGrid = function (a, c, d, e, f, g, h, i) { var j = {}; j[d.units.pos + "1"] = a, j[d.units.pos + "2"] = a, j[d.counterUnits.pos + "1"] = e, j[d.counterUnits.pos + "2"] = e + f; var k = g.elem("line", j, h.join(" ")); i.emit("draw", b.extend({ type: "grid", axis: d, index: c, group: g, element: k }, j)) }, b.createGridBackground = function (a, b, c, d) { var e = a.elem("rect", { x: b.x1, y: b.y2, width: b.width(), height: b.height() }, c, !0); d.emit("draw", { type: "gridBackground", group: a, element: e }) }, b.createLabel = function (a, c, e, f, g, h, i, j, k, l, m) { var n, o = {}; if (o[g.units.pos] = a + i[g.units.pos], o[g.counterUnits.pos] = i[g.counterUnits.pos], o[g.units.len] = c, o[g.counterUnits.len] = Math.max(0, h - 10), l) { var p = d.createElement("span"); p.className = k.join(" "), p.setAttribute("xmlns", b.namespaces.xhtml), p.innerText = f[e], p.style[g.units.len] = Math.round(o[g.units.len]) + "px", p.style[g.counterUnits.len] = Math.round(o[g.counterUnits.len]) + "px", n = j.foreignObject(p, b.extend({ style: "overflow: visible;" }, o)) } else n = j.elem("text", o, k.join(" ")).text(f[e]); m.emit("draw", b.extend({ type: "label", axis: g, index: e, group: j, element: n, text: f[e] }, o)) }, b.getSeriesOption = function (a, b, c) { if (a.name && b.series && b.series[a.name]) { var d = b.series[a.name]; return d.hasOwnProperty(c) ? d[c] : b[c] } return b[c] }, b.optionsProvider = function (a, d, e) { function f(a) { var f = h; if (h = b.extend({}, j), d) for (i = 0; i < d.length; i++) { var g = c.matchMedia(d[i][0]); g.matches && (h = b.extend(h, d[i][1])) } e && a && e.emit("optionsChanged", { previousOptions: f, currentOptions: h }) } function g() { k.forEach(function (a) { a.removeListener(f) }) } var h, i, j = b.extend({}, a), k = []; if (!c.matchMedia) throw "window.matchMedia not found! Make sure you're using a polyfill."; if (d) for (i = 0; i < d.length; i++) { var l = c.matchMedia(d[i][0]); l.addListener(f), k.push(l) } return f(), { removeMediaQueryListeners: g, getCurrentOptions: function () { return b.extend({}, h) } } }, b.splitIntoSegments = function (a, c, d) { var e = { increasingX: !1, fillHoles: !1 }; d = b.extend({}, e, d); for (var f = [], g = !0, h = 0; h < a.length; h += 2)void 0 === b.getMultiValue(c[h / 2].value) ? d.fillHoles || (g = !0) : (d.increasingX && h >= 2 && a[h] <= a[h - 2] && (g = !0), g && (f.push({ pathCoordinates: [], valueData: [] }), g = !1), f[f.length - 1].pathCoordinates.push(a[h], a[h + 1]), f[f.length - 1].valueData.push(c[h / 2])); return f } }(this || global, a), function (a, b) { "use strict"; b.Interpolation = {}, b.Interpolation.none = function (a) { var c = { fillHoles: !1 }; return a = b.extend({}, c, a), function (c, d) { for (var e = new b.Svg.Path, f = !0, g = 0; g < c.length; g += 2) { var h = c[g], i = c[g + 1], j = d[g / 2]; void 0 !== b.getMultiValue(j.value) ? (f ? e.move(h, i, !1, j) : e.line(h, i, !1, j), f = !1) : a.fillHoles || (f = !0) } return e } }, b.Interpolation.simple = function (a) { var c = { divisor: 2, fillHoles: !1 }; a = b.extend({}, c, a); var d = 1 / Math.max(1, a.divisor); return function (c, e) { for (var f, g, h, i = new b.Svg.Path, j = 0; j < c.length; j += 2) { var k = c[j], l = c[j + 1], m = (k - f) * d, n = e[j / 2]; void 0 !== n.value ? (void 0 === h ? i.move(k, l, !1, n) : i.curve(f + m, g, k - m, l, k, l, !1, n), f = k, g = l, h = n) : a.fillHoles || (f = k = h = void 0) } return i } }, b.Interpolation.cardinal = function (a) { var c = { tension: 1, fillHoles: !1 }; a = b.extend({}, c, a); var d = Math.min(1, Math.max(0, a.tension)), e = 1 - d; return function f(c, g) { var h = b.splitIntoSegments(c, g, { fillHoles: a.fillHoles }); if (h.length) { if (h.length > 1) { var i = []; return h.forEach(function (a) { i.push(f(a.pathCoordinates, a.valueData)) }), b.Svg.Path.join(i) } if (c = h[0].pathCoordinates, g = h[0].valueData, c.length <= 4) return b.Interpolation.none()(c, g); for (var j, k = (new b.Svg.Path).move(c[0], c[1], !1, g[0]), l = 0, m = c.length; m - 2 * !j > l; l += 2) { var n = [{ x: +c[l - 2], y: +c[l - 1] }, { x: +c[l], y: +c[l + 1] }, { x: +c[l + 2], y: +c[l + 3] }, { x: +c[l + 4], y: +c[l + 5] }]; j ? l ? m - 4 === l ? n[3] = { x: +c[0], y: +c[1] } : m - 2 === l && (n[2] = { x: +c[0], y: +c[1] }, n[3] = { x: +c[2], y: +c[3] }) : n[0] = { x: +c[m - 2], y: +c[m - 1] } : m - 4 === l ? n[3] = n[2] : l || (n[0] = { x: +c[l], y: +c[l + 1] }), k.curve(d * (-n[0].x + 6 * n[1].x + n[2].x) / 6 + e * n[2].x, d * (-n[0].y + 6 * n[1].y + n[2].y) / 6 + e * n[2].y, d * (n[1].x + 6 * n[2].x - n[3].x) / 6 + e * n[2].x, d * (n[1].y + 6 * n[2].y - n[3].y) / 6 + e * n[2].y, n[2].x, n[2].y, !1, g[(l + 2) / 2]) } return k } return b.Interpolation.none()([]) } }, b.Interpolation.monotoneCubic = function (a) { var c = { fillHoles: !1 }; return a = b.extend({}, c, a), function d(c, e) { var f = b.splitIntoSegments(c, e, { fillHoles: a.fillHoles, increasingX: !0 }); if (f.length) { if (f.length > 1) { var g = []; return f.forEach(function (a) { g.push(d(a.pathCoordinates, a.valueData)) }), b.Svg.Path.join(g) } if (c = f[0].pathCoordinates, e = f[0].valueData, c.length <= 4) return b.Interpolation.none()(c, e); var h, i, j = [], k = [], l = c.length / 2, m = [], n = [], o = [], p = []; for (h = 0; h < l; h++)j[h] = c[2 * h], k[h] = c[2 * h + 1]; for (h = 0; h < l - 1; h++)o[h] = k[h + 1] - k[h], p[h] = j[h + 1] - j[h], n[h] = o[h] / p[h]; for (m[0] = n[0], m[l - 1] = n[l - 2], h = 1; h < l - 1; h++)0 === n[h] || 0 === n[h - 1] || n[h - 1] > 0 != n[h] > 0 ? m[h] = 0 : (m[h] = 3 * (p[h - 1] + p[h]) / ((2 * p[h] + p[h - 1]) / n[h - 1] + (p[h] + 2 * p[h - 1]) / n[h]), isFinite(m[h]) || (m[h] = 0)); for (i = (new b.Svg.Path).move(j[0], k[0], !1, e[0]), h = 0; h < l - 1; h++)i.curve(j[h] + p[h] / 3, k[h] + m[h] * p[h] / 3, j[h + 1] - p[h] / 3, k[h + 1] - m[h + 1] * p[h] / 3, j[h + 1], k[h + 1], !1, e[h + 1]); return i } return b.Interpolation.none()([]) } }, b.Interpolation.step = function (a) { var c = { postpone: !0, fillHoles: !1 }; return a = b.extend({}, c, a), function (c, d) { for (var e, f, g, h = new b.Svg.Path, i = 0; i < c.length; i += 2) { var j = c[i], k = c[i + 1], l = d[i / 2]; void 0 !== l.value ? (void 0 === g ? h.move(j, k, !1, l) : (a.postpone ? h.line(j, f, !1, g) : h.line(e, k, !1, l), h.line(j, k, !1, l)), e = j, f = k, g = l) : a.fillHoles || (e = f = g = void 0) } return h } } }(this || global, a), function (a, b) { "use strict"; b.EventEmitter = function () { function a(a, b) { d[a] = d[a] || [], d[a].push(b) } function b(a, b) { d[a] && (b ? (d[a].splice(d[a].indexOf(b), 1), 0 === d[a].length && delete d[a]) : delete d[a]) } function c(a, b) { d[a] && d[a].forEach(function (a) { a(b) }), d["*"] && d["*"].forEach(function (c) { c(a, b) }) } var d = []; return { addEventHandler: a, removeEventHandler: b, emit: c } } }(this || global, a), function (a, b) { "use strict"; function c(a) { var b = []; if (a.length) for (var c = 0; c < a.length; c++)b.push(a[c]); return b } function d(a, c) { var d = c || this.prototype || b.Class, e = Object.create(d); b.Class.cloneDefinitions(e, a); var f = function () { var a, c = e.constructor || function () { }; return a = this === b ? Object.create(e) : this, c.apply(a, Array.prototype.slice.call(arguments, 0)), a }; return f.prototype = e, f["super"] = d, f.extend = this.extend, f } function e() { var a = c(arguments), b = a[0]; return a.splice(1, a.length - 1).forEach(function (a) { Object.getOwnPropertyNames(a).forEach(function (c) { delete b[c], Object.defineProperty(b, c, Object.getOwnPropertyDescriptor(a, c)) }) }), b } b.Class = { extend: d, cloneDefinitions: e } }(this || global, a), function (a, b) { "use strict"; function c(a, c, d) { return a && (this.data = a || {}, this.data.labels = this.data.labels || [], this.data.series = this.data.series || [], this.eventEmitter.emit("data", { type: "update", data: this.data })), c && (this.options = b.extend({}, d ? this.options : this.defaultOptions, c), this.initializeTimeoutId || (this.optionsProvider.removeMediaQueryListeners(), this.optionsProvider = b.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter))), this.initializeTimeoutId || this.createChart(this.optionsProvider.getCurrentOptions()), this } function d() { return this.initializeTimeoutId ? i.clearTimeout(this.initializeTimeoutId) : (i.removeEventListener("resize", this.resizeListener), this.optionsProvider.removeMediaQueryListeners()), this } function e(a, b) { return this.eventEmitter.addEventHandler(a, b), this } function f(a, b) { return this.eventEmitter.removeEventHandler(a, b), this } function g() { i.addEventListener("resize", this.resizeListener), this.optionsProvider = b.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter), this.eventEmitter.addEventHandler("optionsChanged", function () { this.update() }.bind(this)), this.options.plugins && this.options.plugins.forEach(function (a) { a instanceof Array ? a[0](this, a[1]) : a(this) }.bind(this)), this.eventEmitter.emit("data", { type: "initial", data: this.data }), this.createChart(this.optionsProvider.getCurrentOptions()), this.initializeTimeoutId = void 0 } function h(a, c, d, e, f) { this.container = b.querySelector(a), this.data = c || {}, this.data.labels = this.data.labels || [], this.data.series = this.data.series || [], this.defaultOptions = d, this.options = e, this.responsiveOptions = f, this.eventEmitter = b.EventEmitter(), this.supportsForeignObject = b.Svg.isSupported("Extensibility"), this.supportsAnimations = b.Svg.isSupported("AnimationEventsAttribute"), this.resizeListener = function () { this.update() }.bind(this), this.container && (this.container.__chartist__ && this.container.__chartist__.detach(), this.container.__chartist__ = this), this.initializeTimeoutId = setTimeout(g.bind(this), 0) } var i = a.window; b.Base = b.Class.extend({ constructor: h, optionsProvider: void 0, container: void 0, svg: void 0, eventEmitter: void 0, createChart: function () { throw new Error("Base chart type can't be instantiated!") }, update: c, detach: d, on: e, off: f, version: b.version, supportsForeignObject: !1 }) }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e, f) { a instanceof Element ? this._node = a : (this._node = y.createElementNS(b.namespaces.svg, a), "svg" === a && this.attr({ "xmlns:ct": b.namespaces.ct })), c && this.attr(c), d && this.addClass(d), e && (f && e._node.firstChild ? e._node.insertBefore(this._node, e._node.firstChild) : e._node.appendChild(this._node)) } function d(a, c) { return "string" == typeof a ? c ? this._node.getAttributeNS(c, a) : this._node.getAttribute(a) : (Object.keys(a).forEach(function (c) { if (void 0 !== a[c]) if (c.indexOf(":") !== -1) { var d = c.split(":"); this._node.setAttributeNS(b.namespaces[d[0]], c, a[c]) } else this._node.setAttribute(c, a[c]) }.bind(this)), this) } function e(a, c, d, e) { return new b.Svg(a, c, d, this, e) } function f() { return this._node.parentNode instanceof SVGElement ? new b.Svg(this._node.parentNode) : null } function g() { for (var a = this._node; "svg" !== a.nodeName;)a = a.parentNode; return new b.Svg(a) } function h(a) { var c = this._node.querySelector(a); return c ? new b.Svg(c) : null } function i(a) { var c = this._node.querySelectorAll(a); return c.length ? new b.Svg.List(c) : null } function j() { return this._node } function k(a, c, d, e) { if ("string" == typeof a) { var f = y.createElement("div"); f.innerHTML = a, a = f.firstChild } a.setAttribute("xmlns", b.namespaces.xmlns); var g = this.elem("foreignObject", c, d, e); return g._node.appendChild(a), g } function l(a) { return this._node.appendChild(y.createTextNode(a)), this } function m() { for (; this._node.firstChild;)this._node.removeChild(this._node.firstChild); return this } function n() { return this._node.parentNode.removeChild(this._node), this.parent() } function o(a) { return this._node.parentNode.replaceChild(a._node, this._node), a } function p(a, b) { return b && this._node.firstChild ? this._node.insertBefore(a._node, this._node.firstChild) : this._node.appendChild(a._node), this } function q() { return this._node.getAttribute("class") ? this._node.getAttribute("class").trim().split(/\s+/) : [] } function r(a) { return this._node.setAttribute("class", this.classes(this._node).concat(a.trim().split(/\s+/)).filter(function (a, b, c) { return c.indexOf(a) === b }).join(" ")), this } function s(a) { var b = a.trim().split(/\s+/); return this._node.setAttribute("class", this.classes(this._node).filter(function (a) { return b.indexOf(a) === -1 }).join(" ")), this } function t() { return this._node.setAttribute("class", ""), this } function u() { return this._node.getBoundingClientRect().height } function v() { return this._node.getBoundingClientRect().width } function w(a, c, d) { return void 0 === c && (c = !0), Object.keys(a).forEach(function (e) { function f(a, c) { var f, g, h, i = {}; a.easing && (h = a.easing instanceof Array ? a.easing : b.Svg.Easing[a.easing], delete a.easing), a.begin = b.ensureUnit(a.begin, "ms"), a.dur = b.ensureUnit(a.dur, "ms"), h && (a.calcMode = "spline", a.keySplines = h.join(" "), a.keyTimes = "0;1"), c && (a.fill = "freeze", i[e] = a.from, this.attr(i), g = b.quantity(a.begin || 0).value, a.begin = "indefinite"), f = this.elem("animate", b.extend({ attributeName: e }, a)), c && setTimeout(function () { try { f._node.beginElement() } catch (b) { i[e] = a.to, this.attr(i), f.remove() } }.bind(this), g), d && f._node.addEventListener("beginEvent", function () { d.emit("animationBegin", { element: this, animate: f._node, params: a }) }.bind(this)), f._node.addEventListener("endEvent", function () { d && d.emit("animationEnd", { element: this, animate: f._node, params: a }), c && (i[e] = a.to, this.attr(i), f.remove()) }.bind(this)) } a[e] instanceof Array ? a[e].forEach(function (a) { f.bind(this)(a, !1) }.bind(this)) : f.bind(this)(a[e], c) }.bind(this)), this } function x(a) { var c = this; this.svgElements = []; for (var d = 0; d < a.length; d++)this.svgElements.push(new b.Svg(a[d])); Object.keys(b.Svg.prototype).filter(function (a) { return ["constructor", "parent", "querySelector", "querySelectorAll", "replace", "append", "classes", "height", "width"].indexOf(a) === -1 }).forEach(function (a) { c[a] = function () { var d = Array.prototype.slice.call(arguments, 0); return c.svgElements.forEach(function (c) { b.Svg.prototype[a].apply(c, d) }), c } }) } var y = a.document; b.Svg = b.Class.extend({ constructor: c, attr: d, elem: e, parent: f, root: g, querySelector: h, querySelectorAll: i, getNode: j, foreignObject: k, text: l, empty: m, remove: n, replace: o, append: p, classes: q, addClass: r, removeClass: s, removeAllClasses: t, height: u, width: v, animate: w }), b.Svg.isSupported = function (a) { return y.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#" + a, "1.1") }; var z = { easeInSine: [.47, 0, .745, .715], easeOutSine: [.39, .575, .565, 1], easeInOutSine: [.445, .05, .55, .95], easeInQuad: [.55, .085, .68, .53], easeOutQuad: [.25, .46, .45, .94], easeInOutQuad: [.455, .03, .515, .955], easeInCubic: [.55, .055, .675, .19], easeOutCubic: [.215, .61, .355, 1], easeInOutCubic: [.645, .045, .355, 1], easeInQuart: [.895, .03, .685, .22], easeOutQuart: [.165, .84, .44, 1], easeInOutQuart: [.77, 0, .175, 1], easeInQuint: [.755, .05, .855, .06], easeOutQuint: [.23, 1, .32, 1], easeInOutQuint: [.86, 0, .07, 1], easeInExpo: [.95, .05, .795, .035], easeOutExpo: [.19, 1, .22, 1], easeInOutExpo: [1, 0, 0, 1], easeInCirc: [.6, .04, .98, .335], easeOutCirc: [.075, .82, .165, 1], easeInOutCirc: [.785, .135, .15, .86], easeInBack: [.6, -.28, .735, .045], easeOutBack: [.175, .885, .32, 1.275], easeInOutBack: [.68, -.55, .265, 1.55] }; b.Svg.Easing = z, b.Svg.List = b.Class.extend({ constructor: x }) }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e, f, g) { var h = b.extend({ command: f ? a.toLowerCase() : a.toUpperCase() }, c, g ? { data: g } : {}); d.splice(e, 0, h) } function d(a, b) { a.forEach(function (c, d) { t[c.command.toLowerCase()].forEach(function (e, f) { b(c, e, d, f, a) }) }) } function e(a, c) { this.pathElements = [], this.pos = 0, this.close = a, this.options = b.extend({}, u, c) } function f(a) { return void 0 !== a ? (this.pos = Math.max(0, Math.min(this.pathElements.length, a)), this) : this.pos } function g(a) { return this.pathElements.splice(this.pos, a), this } function h(a, b, d, e) { return c("M", { x: +a, y: +b }, this.pathElements, this.pos++, d, e), this } function i(a, b, d, e) { return c("L", { x: +a, y: +b }, this.pathElements, this.pos++, d, e), this } function j(a, b, d, e, f, g, h, i) { return c("C", { x1: +a, y1: +b, x2: +d, y2: +e, x: +f, y: +g }, this.pathElements, this.pos++, h, i), this } function k(a, b, d, e, f, g, h, i, j) { return c("A", { rx: +a, ry: +b, xAr: +d, lAf: +e, sf: +f, x: +g, y: +h }, this.pathElements, this.pos++, i, j), this } function l(a) { var c = a.replace(/([A-Za-z])([0-9])/g, "$1 $2").replace(/([0-9])([A-Za-z])/g, "$1 $2").split(/[\s,]+/).reduce(function (a, b) { return b.match(/[A-Za-z]/) && a.push([]), a[a.length - 1].push(b), a }, []); "Z" === c[c.length - 1][0].toUpperCase() && c.pop(); var d = c.map(function (a) { var c = a.shift(), d = t[c.toLowerCase()]; return b.extend({ command: c }, d.reduce(function (b, c, d) { return b[c] = +a[d], b }, {})) }), e = [this.pos, 0]; return Array.prototype.push.apply(e, d), Array.prototype.splice.apply(this.pathElements, e), this.pos += d.length, this } function m() { var a = Math.pow(10, this.options.accuracy); return this.pathElements.reduce(function (b, c) { var d = t[c.command.toLowerCase()].map(function (b) { return this.options.accuracy ? Math.round(c[b] * a) / a : c[b] }.bind(this)); return b + c.command + d.join(",") }.bind(this), "") + (this.close ? "Z" : "") } function n(a, b) { return d(this.pathElements, function (c, d) { c[d] *= "x" === d[0] ? a : b }), this } function o(a, b) { return d(this.pathElements, function (c, d) { c[d] += "x" === d[0] ? a : b }), this } function p(a) { return d(this.pathElements, function (b, c, d, e, f) { var g = a(b, c, d, e, f); (g || 0 === g) && (b[c] = g) }), this } function q(a) { var c = new b.Svg.Path(a || this.close); return c.pos = this.pos, c.pathElements = this.pathElements.slice().map(function (a) { return b.extend({}, a) }), c.options = b.extend({}, this.options), c } function r(a) { var c = [new b.Svg.Path]; return this.pathElements.forEach(function (d) { d.command === a.toUpperCase() && 0 !== c[c.length - 1].pathElements.length && c.push(new b.Svg.Path), c[c.length - 1].pathElements.push(d) }), c } function s(a, c, d) { for (var e = new b.Svg.Path(c, d), f = 0; f < a.length; f++)for (var g = a[f], h = 0; h < g.pathElements.length; h++)e.pathElements.push(g.pathElements[h]); return e } var t = { m: ["x", "y"], l: ["x", "y"], c: ["x1", "y1", "x2", "y2", "x", "y"], a: ["rx", "ry", "xAr", "lAf", "sf", "x", "y"] }, u = { accuracy: 3 }; b.Svg.Path = b.Class.extend({ constructor: e, position: f, remove: g, move: h, line: i, curve: j, arc: k, scale: n, translate: o, transform: p, parse: l, stringify: m, clone: q, splitByCommand: r }), b.Svg.Path.elementDescriptions = t, b.Svg.Path.join = s }(this || global, a), function (a, b) { "use strict"; function c(a, b, c, d) { this.units = a, this.counterUnits = a === e.x ? e.y : e.x, this.chartRect = b, this.axisLength = b[a.rectEnd] - b[a.rectStart], this.gridOffset = b[a.rectOffset], this.ticks = c, this.options = d } function d(a, c, d, e, f) { var g = e["axis" + this.units.pos.toUpperCase()], h = this.ticks.map(this.projectValue.bind(this)), i = this.ticks.map(g.labelInterpolationFnc); h.forEach(function (j, k) { var l, m = { x: 0, y: 0 }; l = h[k + 1] ? h[k + 1] - j : Math.max(this.axisLength - j, 30), b.isFalseyButZero(i[k]) && "" !== i[k] || ("x" === this.units.pos ? (j = this.chartRect.x1 + j, m.x = e.axisX.labelOffset.x, "start" === e.axisX.position ? m.y = this.chartRect.padding.top + e.axisX.labelOffset.y + (d ? 5 : 20) : m.y = this.chartRect.y1 + e.axisX.labelOffset.y + (d ? 5 : 20)) : (j = this.chartRect.y1 - j, m.y = e.axisY.labelOffset.y - (d ? l : 0), "start" === e.axisY.position ? m.x = d ? this.chartRect.padding.left + e.axisY.labelOffset.x : this.chartRect.x1 - 10 : m.x = this.chartRect.x2 + e.axisY.labelOffset.x + 10), g.showGrid && b.createGrid(j, k, this, this.gridOffset, this.chartRect[this.counterUnits.len](), a, [e.classNames.grid, e.classNames[this.units.dir]], f), g.showLabel && b.createLabel(j, l, k, i, this, g.offset, m, c, [e.classNames.label, e.classNames[this.units.dir], "start" === g.position ? e.classNames[g.position] : e.classNames.end], d, f)) }.bind(this)) } var e = (a.window, a.document, { x: { pos: "x", len: "width", dir: "horizontal", rectStart: "x1", rectEnd: "x2", rectOffset: "y2" }, y: { pos: "y", len: "height", dir: "vertical", rectStart: "y2", rectEnd: "y1", rectOffset: "x1" } }); b.Axis = b.Class.extend({ constructor: c, createGridAndLabels: d, projectValue: function (a, b, c) { throw new Error("Base axis can't be instantiated!") } }), b.Axis.units = e }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e) { var f = e.highLow || b.getHighLow(c, e, a.pos); this.bounds = b.getBounds(d[a.rectEnd] - d[a.rectStart], f, e.scaleMinSpace || 20, e.onlyInteger), this.range = { min: this.bounds.min, max: this.bounds.max }, b.AutoScaleAxis["super"].constructor.call(this, a, d, this.bounds.values, e) } function d(a) { return this.axisLength * (+b.getMultiValue(a, this.units.pos) - this.bounds.min) / this.bounds.range } a.window, a.document; b.AutoScaleAxis = b.Axis.extend({ constructor: c, projectValue: d }) }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e) { var f = e.highLow || b.getHighLow(c, e, a.pos); this.divisor = e.divisor || 1, this.ticks = e.ticks || b.times(this.divisor).map(function (a, b) { return f.low + (f.high - f.low) / this.divisor * b }.bind(this)), this.ticks.sort(function (a, b) { return a - b }), this.range = { min: f.low, max: f.high }, b.FixedScaleAxis["super"].constructor.call(this, a, d, this.ticks, e), this.stepLength = this.axisLength / this.divisor } function d(a) { return this.axisLength * (+b.getMultiValue(a, this.units.pos) - this.range.min) / (this.range.max - this.range.min) } a.window, a.document; b.FixedScaleAxis = b.Axis.extend({ constructor: c, projectValue: d }) }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e) { b.StepAxis["super"].constructor.call(this, a, d, e.ticks, e); var f = Math.max(1, e.ticks.length - (e.stretch ? 1 : 0)); this.stepLength = this.axisLength / f } function d(a, b) { return this.stepLength * b } a.window, a.document; b.StepAxis = b.Axis.extend({ constructor: c, projectValue: d }) }(this || global, a), function (a, b) { "use strict"; function c(a) { var c = b.normalizeData(this.data, a.reverseData, !0); this.svg = b.createSvg(this.container, a.width, a.height, a.classNames.chart); var d, f, g = this.svg.elem("g").addClass(a.classNames.gridGroup), h = this.svg.elem("g"), i = this.svg.elem("g").addClass(a.classNames.labelGroup), j = b.createChartRect(this.svg, a, e.padding); d = void 0 === a.axisX.type ? new b.StepAxis(b.Axis.units.x, c.normalized.series, j, b.extend({}, a.axisX, { ticks: c.normalized.labels, stretch: a.fullWidth })) : a.axisX.type.call(b, b.Axis.units.x, c.normalized.series, j, a.axisX), f = void 0 === a.axisY.type ? new b.AutoScaleAxis(b.Axis.units.y, c.normalized.series, j, b.extend({}, a.axisY, { high: b.isNumeric(a.high) ? a.high : a.axisY.high, low: b.isNumeric(a.low) ? a.low : a.axisY.low })) : a.axisY.type.call(b, b.Axis.units.y, c.normalized.series, j, a.axisY), d.createGridAndLabels(g, i, this.supportsForeignObject, a, this.eventEmitter), f.createGridAndLabels(g, i, this.supportsForeignObject, a, this.eventEmitter), a.showGridBackground && b.createGridBackground(g, j, a.classNames.gridBackground, this.eventEmitter), c.raw.series.forEach(function (e, g) { var i = h.elem("g"); i.attr({ "ct:series-name": e.name, "ct:meta": b.serialize(e.meta) }), i.addClass([a.classNames.series, e.className || a.classNames.series + "-" + b.alphaNumerate(g)].join(" ")); var k = [], l = []; c.normalized.series[g].forEach(function (a, h) { var i = { x: j.x1 + d.projectValue(a, h, c.normalized.series[g]), y: j.y1 - f.projectValue(a, h, c.normalized.series[g]) }; k.push(i.x, i.y), l.push({ value: a, valueIndex: h, meta: b.getMetaData(e, h) }) }.bind(this)); var m = { lineSmooth: b.getSeriesOption(e, a, "lineSmooth"), showPoint: b.getSeriesOption(e, a, "showPoint"), showLine: b.getSeriesOption(e, a, "showLine"), showArea: b.getSeriesOption(e, a, "showArea"), areaBase: b.getSeriesOption(e, a, "areaBase") }, n = "function" == typeof m.lineSmooth ? m.lineSmooth : m.lineSmooth ? b.Interpolation.monotoneCubic() : b.Interpolation.none(), o = n(k, l); if (m.showPoint && o.pathElements.forEach(function (c) { var h = i.elem("line", { x1: c.x, y1: c.y, x2: c.x + .01, y2: c.y }, a.classNames.point).attr({ "ct:value": [c.data.value.x, c.data.value.y].filter(b.isNumeric).join(","), "ct:meta": b.serialize(c.data.meta) }); this.eventEmitter.emit("draw", { type: "point", value: c.data.value, index: c.data.valueIndex, meta: c.data.meta, series: e, seriesIndex: g, axisX: d, axisY: f, group: i, element: h, x: c.x, y: c.y }) }.bind(this)), m.showLine) { var p = i.elem("path", { d: o.stringify() }, a.classNames.line, !0); this.eventEmitter.emit("draw", { type: "line", values: c.normalized.series[g], path: o.clone(), chartRect: j, index: g, series: e, seriesIndex: g, seriesMeta: e.meta, axisX: d, axisY: f, group: i, element: p }) } if (m.showArea && f.range) { var q = Math.max(Math.min(m.areaBase, f.range.max), f.range.min), r = j.y1 - f.projectValue(q); o.splitByCommand("M").filter(function (a) { return a.pathElements.length > 1 }).map(function (a) { var b = a.pathElements[0], c = a.pathElements[a.pathElements.length - 1]; return a.clone(!0).position(0).remove(1).move(b.x, r).line(b.x, b.y).position(a.pathElements.length + 1).line(c.x, r) }).forEach(function (b) { var h = i.elem("path", { d: b.stringify() }, a.classNames.area, !0); this.eventEmitter.emit("draw", { type: "area", values: c.normalized.series[g], path: b.clone(), series: e, seriesIndex: g, axisX: d, axisY: f, chartRect: j, index: g, group: i, element: h }) }.bind(this)) } }.bind(this)), this.eventEmitter.emit("created", { bounds: f.bounds, chartRect: j, axisX: d, axisY: f, svg: this.svg, options: a }) } function d(a, c, d, f) { b.Line["super"].constructor.call(this, a, c, e, b.extend({}, e, d), f) } var e = (a.window, a.document, { axisX: { offset: 30, position: "end", labelOffset: { x: 0, y: 0 }, showLabel: !0, showGrid: !0, labelInterpolationFnc: b.noop, type: void 0 }, axisY: { offset: 40, position: "start", labelOffset: { x: 0, y: 0 }, showLabel: !0, showGrid: !0, labelInterpolationFnc: b.noop, type: void 0, scaleMinSpace: 20, onlyInteger: !1 }, width: void 0, height: void 0, showLine: !0, showPoint: !0, showArea: !1, areaBase: 0, lineSmooth: !0, showGridBackground: !1, low: void 0, high: void 0, chartPadding: { top: 15, right: 15, bottom: 5, left: 10 }, fullWidth: !1, reverseData: !1, classNames: { chart: "ct-chart-line", label: "ct-label", labelGroup: "ct-labels", series: "ct-series", line: "ct-line", point: "ct-point", area: "ct-area", grid: "ct-grid", gridGroup: "ct-grids", gridBackground: "ct-grid-background", vertical: "ct-vertical", horizontal: "ct-horizontal", start: "ct-start", end: "ct-end" } }); b.Line = b.Base.extend({ constructor: d, createChart: c }) }(this || global, a), function (a, b) { - "use strict"; function c(a) { - var c, d; a.distributeSeries ? (c = b.normalizeData(this.data, a.reverseData, a.horizontalBars ? "x" : "y"), c.normalized.series = c.normalized.series.map(function (a) { return [a] })) : c = b.normalizeData(this.data, a.reverseData, a.horizontalBars ? "x" : "y"), this.svg = b.createSvg(this.container, a.width, a.height, a.classNames.chart + (a.horizontalBars ? " " + a.classNames.horizontalBars : "")); var f = this.svg.elem("g").addClass(a.classNames.gridGroup), g = this.svg.elem("g"), h = this.svg.elem("g").addClass(a.classNames.labelGroup); - if (a.stackBars && 0 !== c.normalized.series.length) { var i = b.serialMap(c.normalized.series, function () { return Array.prototype.slice.call(arguments).map(function (a) { return a }).reduce(function (a, b) { return { x: a.x + (b && b.x) || 0, y: a.y + (b && b.y) || 0 } }, { x: 0, y: 0 }) }); d = b.getHighLow([i], a, a.horizontalBars ? "x" : "y") } else d = b.getHighLow(c.normalized.series, a, a.horizontalBars ? "x" : "y"); d.high = +a.high || (0 === a.high ? 0 : d.high), d.low = +a.low || (0 === a.low ? 0 : d.low); var j, k, l, m, n, o = b.createChartRect(this.svg, a, e.padding); k = a.distributeSeries && a.stackBars ? c.normalized.labels.slice(0, 1) : c.normalized.labels, a.horizontalBars ? (j = m = void 0 === a.axisX.type ? new b.AutoScaleAxis(b.Axis.units.x, c.normalized.series, o, b.extend({}, a.axisX, { highLow: d, referenceValue: 0 })) : a.axisX.type.call(b, b.Axis.units.x, c.normalized.series, o, b.extend({}, a.axisX, { highLow: d, referenceValue: 0 })), l = n = void 0 === a.axisY.type ? new b.StepAxis(b.Axis.units.y, c.normalized.series, o, { ticks: k }) : a.axisY.type.call(b, b.Axis.units.y, c.normalized.series, o, a.axisY)) : (l = m = void 0 === a.axisX.type ? new b.StepAxis(b.Axis.units.x, c.normalized.series, o, { ticks: k }) : a.axisX.type.call(b, b.Axis.units.x, c.normalized.series, o, a.axisX), j = n = void 0 === a.axisY.type ? new b.AutoScaleAxis(b.Axis.units.y, c.normalized.series, o, b.extend({}, a.axisY, { highLow: d, referenceValue: 0 })) : a.axisY.type.call(b, b.Axis.units.y, c.normalized.series, o, b.extend({}, a.axisY, { highLow: d, referenceValue: 0 }))); var p = a.horizontalBars ? o.x1 + j.projectValue(0) : o.y1 - j.projectValue(0), q = []; l.createGridAndLabels(f, h, this.supportsForeignObject, a, this.eventEmitter), j.createGridAndLabels(f, h, this.supportsForeignObject, a, this.eventEmitter), a.showGridBackground && b.createGridBackground(f, o, a.classNames.gridBackground, this.eventEmitter), c.raw.series.forEach(function (d, e) { var f, h, i = e - (c.raw.series.length - 1) / 2; f = a.distributeSeries && !a.stackBars ? l.axisLength / c.normalized.series.length / 2 : a.distributeSeries && a.stackBars ? l.axisLength / 2 : l.axisLength / c.normalized.series[e].length / 2, h = g.elem("g"), h.attr({ "ct:series-name": d.name, "ct:meta": b.serialize(d.meta) }), h.addClass([a.classNames.series, d.className || a.classNames.series + "-" + b.alphaNumerate(e)].join(" ")), c.normalized.series[e].forEach(function (g, k) { var r, s, t, u; if (u = a.distributeSeries && !a.stackBars ? e : a.distributeSeries && a.stackBars ? 0 : k, r = a.horizontalBars ? { x: o.x1 + j.projectValue(g && g.x ? g.x : 0, k, c.normalized.series[e]), y: o.y1 - l.projectValue(g && g.y ? g.y : 0, u, c.normalized.series[e]) } : { x: o.x1 + l.projectValue(g && g.x ? g.x : 0, u, c.normalized.series[e]), y: o.y1 - j.projectValue(g && g.y ? g.y : 0, k, c.normalized.series[e]) }, l instanceof b.StepAxis && (l.options.stretch || (r[l.units.pos] += f * (a.horizontalBars ? -1 : 1)), r[l.units.pos] += a.stackBars || a.distributeSeries ? 0 : i * a.seriesBarDistance * (a.horizontalBars ? -1 : 1)), t = q[k] || p, q[k] = t - (p - r[l.counterUnits.pos]), void 0 !== g) { var v = {}; v[l.units.pos + "1"] = r[l.units.pos], v[l.units.pos + "2"] = r[l.units.pos], !a.stackBars || "accumulate" !== a.stackMode && a.stackMode ? (v[l.counterUnits.pos + "1"] = p, v[l.counterUnits.pos + "2"] = r[l.counterUnits.pos]) : (v[l.counterUnits.pos + "1"] = t, v[l.counterUnits.pos + "2"] = q[k]), v.x1 = Math.min(Math.max(v.x1, o.x1), o.x2), v.x2 = Math.min(Math.max(v.x2, o.x1), o.x2), v.y1 = Math.min(Math.max(v.y1, o.y2), o.y1), v.y2 = Math.min(Math.max(v.y2, o.y2), o.y1); var w = b.getMetaData(d, k); s = h.elem("line", v, a.classNames.bar).attr({ "ct:value": [g.x, g.y].filter(b.isNumeric).join(","), "ct:meta": b.serialize(w) }), this.eventEmitter.emit("draw", b.extend({ type: "bar", value: g, index: k, meta: w, series: d, seriesIndex: e, axisX: m, axisY: n, chartRect: o, group: h, element: s }, v)) } }.bind(this)) }.bind(this)), this.eventEmitter.emit("created", { bounds: j.bounds, chartRect: o, axisX: m, axisY: n, svg: this.svg, options: a }) - } function d(a, c, d, f) { b.Bar["super"].constructor.call(this, a, c, e, b.extend({}, e, d), f) } var e = (a.window, a.document, { axisX: { offset: 30, position: "end", labelOffset: { x: 0, y: 0 }, showLabel: !0, showGrid: !0, labelInterpolationFnc: b.noop, scaleMinSpace: 30, onlyInteger: !1 }, axisY: { offset: 40, position: "start", labelOffset: { x: 0, y: 0 }, showLabel: !0, showGrid: !0, labelInterpolationFnc: b.noop, scaleMinSpace: 20, onlyInteger: !1 }, width: void 0, height: void 0, high: void 0, low: void 0, referenceValue: 0, chartPadding: { top: 15, right: 15, bottom: 5, left: 10 }, seriesBarDistance: 15, stackBars: !1, stackMode: "accumulate", horizontalBars: !1, distributeSeries: !1, reverseData: !1, showGridBackground: !1, classNames: { chart: "ct-chart-bar", horizontalBars: "ct-horizontal-bars", label: "ct-label", labelGroup: "ct-labels", series: "ct-series", bar: "ct-bar", grid: "ct-grid", gridGroup: "ct-grids", gridBackground: "ct-grid-background", vertical: "ct-vertical", horizontal: "ct-horizontal", start: "ct-start", end: "ct-end" } }); b.Bar = b.Base.extend({ constructor: d, createChart: c }) - }(this || global, a), function (a, b) { "use strict"; function c(a, b, c) { var d = b.x > a.x; return d && "explode" === c || !d && "implode" === c ? "start" : d && "implode" === c || !d && "explode" === c ? "end" : "middle" } function d(a) { var d, e, g, h, i, j = b.normalizeData(this.data), k = [], l = a.startAngle; this.svg = b.createSvg(this.container, a.width, a.height, a.donut ? a.classNames.chartDonut : a.classNames.chartPie), e = b.createChartRect(this.svg, a, f.padding), g = Math.min(e.width() / 2, e.height() / 2), i = a.total || j.normalized.series.reduce(function (a, b) { return a + b }, 0); var m = b.quantity(a.donutWidth); "%" === m.unit && (m.value *= g / 100), g -= a.donut && !a.donutSolid ? m.value / 2 : 0, h = "outside" === a.labelPosition || a.donut && !a.donutSolid ? g : "center" === a.labelPosition ? 0 : a.donutSolid ? g - m.value / 2 : g / 2, h += a.labelOffset; var n = { x: e.x1 + e.width() / 2, y: e.y2 + e.height() / 2 }, o = 1 === j.raw.series.filter(function (a) { return a.hasOwnProperty("value") ? 0 !== a.value : 0 !== a }).length; j.raw.series.forEach(function (a, b) { k[b] = this.svg.elem("g", null, null) }.bind(this)), a.showLabel && (d = this.svg.elem("g", null, null)), j.raw.series.forEach(function (e, f) { if (0 !== j.normalized.series[f] || !a.ignoreEmptyValues) { k[f].attr({ "ct:series-name": e.name }), k[f].addClass([a.classNames.series, e.className || a.classNames.series + "-" + b.alphaNumerate(f)].join(" ")); var p = i > 0 ? l + j.normalized.series[f] / i * 360 : 0, q = Math.max(0, l - (0 === f || o ? 0 : .2)); p - q >= 359.99 && (p = q + 359.99); var r, s, t, u = b.polarToCartesian(n.x, n.y, g, q), v = b.polarToCartesian(n.x, n.y, g, p), w = new b.Svg.Path(!a.donut || a.donutSolid).move(v.x, v.y).arc(g, g, 0, p - l > 180, 0, u.x, u.y); a.donut ? a.donutSolid && (t = g - m.value, r = b.polarToCartesian(n.x, n.y, t, l - (0 === f || o ? 0 : .2)), s = b.polarToCartesian(n.x, n.y, t, p), w.line(r.x, r.y), w.arc(t, t, 0, p - l > 180, 1, s.x, s.y)) : w.line(n.x, n.y); var x = a.classNames.slicePie; a.donut && (x = a.classNames.sliceDonut, a.donutSolid && (x = a.classNames.sliceDonutSolid)); var y = k[f].elem("path", { d: w.stringify() }, x); if (y.attr({ "ct:value": j.normalized.series[f], "ct:meta": b.serialize(e.meta) }), a.donut && !a.donutSolid && (y._node.style.strokeWidth = m.value + "px"), this.eventEmitter.emit("draw", { type: "slice", value: j.normalized.series[f], totalDataSum: i, index: f, meta: e.meta, series: e, group: k[f], element: y, path: w.clone(), center: n, radius: g, startAngle: l, endAngle: p }), a.showLabel) { var z; z = 1 === j.raw.series.length ? { x: n.x, y: n.y } : b.polarToCartesian(n.x, n.y, h, l + (p - l) / 2); var A; A = j.normalized.labels && !b.isFalseyButZero(j.normalized.labels[f]) ? j.normalized.labels[f] : j.normalized.series[f]; var B = a.labelInterpolationFnc(A, f); if (B || 0 === B) { var C = d.elem("text", { dx: z.x, dy: z.y, "text-anchor": c(n, z, a.labelDirection) }, a.classNames.label).text("" + B); this.eventEmitter.emit("draw", { type: "label", index: f, group: d, element: C, text: "" + B, x: z.x, y: z.y }) } } l = p } }.bind(this)), this.eventEmitter.emit("created", { chartRect: e, svg: this.svg, options: a }) } function e(a, c, d, e) { b.Pie["super"].constructor.call(this, a, c, f, b.extend({}, f, d), e) } var f = (a.window, a.document, { width: void 0, height: void 0, chartPadding: 5, classNames: { chartPie: "ct-chart-pie", chartDonut: "ct-chart-donut", series: "ct-series", slicePie: "ct-slice-pie", sliceDonut: "ct-slice-donut", sliceDonutSolid: "ct-slice-donut-solid", label: "ct-label" }, startAngle: 0, total: void 0, donut: !1, donutSolid: !1, donutWidth: 60, showLabel: !0, labelOffset: 0, labelPosition: "inside", labelInterpolationFnc: b.noop, labelDirection: "neutral", reverseData: !1, ignoreEmptyValues: !1 }); b.Pie = b.Base.extend({ constructor: e, createChart: d, determineAnchorPosition: c }) }(this || global, a), a -}); -//# sourceMappingURL=chartist.min.js.map - -var i, l, selectedLine = null; - -/* Navigate to hash without browser history entry */ -var navigateToHash = function () { - if (window.history !== undefined && window.history.replaceState !== undefined) { - window.history.replaceState(undefined, undefined, this.getAttribute("href")); - } -}; - -var hashLinks = document.getElementsByClassName('navigatetohash'); -for (i = 0, l = hashLinks.length; i < l; i++) { - hashLinks[i].addEventListener('click', navigateToHash); -} - -/* Switch test method */ -var switchTestMethod = function () { - var method = this.getAttribute("value"); - console.log("Selected test method: " + method); - - var lines, i, l, coverageData, lineAnalysis, cells; - - lines = document.querySelectorAll('.lineAnalysis tr'); - - for (i = 1, l = lines.length; i < l; i++) { - coverageData = JSON.parse(lines[i].getAttribute('data-coverage').replace(/'/g, '"')); - lineAnalysis = coverageData[method]; - cells = lines[i].querySelectorAll('td'); - if (lineAnalysis === undefined) { - lineAnalysis = coverageData.AllTestMethods; - if (lineAnalysis.LVS !== 'gray') { - cells[0].setAttribute('class', 'red'); - cells[1].innerText = cells[1].textContent = '0'; - cells[4].setAttribute('class', 'lightred'); - } - } else { - cells[0].setAttribute('class', lineAnalysis.LVS); - cells[1].innerText = cells[1].textContent = lineAnalysis.VC; - cells[4].setAttribute('class', 'light' + lineAnalysis.LVS); - } - } -}; - -var testMethods = document.getElementsByClassName('switchtestmethod'); -for (i = 0, l = testMethods.length; i < l; i++) { - testMethods[i].addEventListener('change', switchTestMethod); -} - -/* Highlight test method by line */ -var toggleLine = function () { - if (selectedLine === this) { - selectedLine = null; - } else { - selectedLine = null; - unhighlightTestMethods(); - highlightTestMethods.call(this); - selectedLine = this; - } - -}; -var highlightTestMethods = function () { - if (selectedLine !== null) { - return; - } - - var lineAnalysis; - var coverageData = JSON.parse(this.getAttribute('data-coverage').replace(/'/g, '"')); - var testMethods = document.getElementsByClassName('testmethod'); - - for (i = 0, l = testMethods.length; i < l; i++) { - lineAnalysis = coverageData[testMethods[i].id]; - if (lineAnalysis === undefined) { - testMethods[i].className = testMethods[i].className.replace(/\s*light.+/g, ""); - } else { - testMethods[i].className += ' light' + lineAnalysis.LVS; - } - } -}; -var unhighlightTestMethods = function () { - if (selectedLine !== null) { - return; - } - - var testMethods = document.getElementsByClassName('testmethod'); - for (i = 0, l = testMethods.length; i < l; i++) { - testMethods[i].className = testMethods[i].className.replace(/\s*light.+/g, ""); - } -}; -var coverableLines = document.getElementsByClassName('coverableline'); -for (i = 0, l = coverableLines.length; i < l; i++) { - coverableLines[i].addEventListener('click', toggleLine); - coverableLines[i].addEventListener('mouseenter', highlightTestMethods); - coverableLines[i].addEventListener('mouseleave', unhighlightTestMethods); -} - -/* History charts */ -var renderChart = function (chart) { - // Remove current children (e.g. PNG placeholder) - while (chart.firstChild) { - chart.firstChild.remove(); - } - - var chartData = window[chart.getAttribute('data-data')]; - var options = { - axisY: { - type: undefined, - onlyInteger: true - }, - lineSmooth: false, - low: 0, - high: 100, - scaleMinSpace: 20, - onlyInteger: true, - fullWidth: true - }; - var lineChart = new Chartist.Line(chart, { - labels: [], - series: chartData.series - }, options); - - /* Zoom */ - var zoomButtonDiv = document.createElement("div"); - zoomButtonDiv.className = "toggleZoom"; - var zoomButtonLink = document.createElement("a"); - zoomButtonLink.setAttribute("href", ""); - var zoomButtonText = document.createElement("i"); - zoomButtonText.className = "icon-search-plus"; - - zoomButtonLink.appendChild(zoomButtonText); - zoomButtonDiv.appendChild(zoomButtonLink); - - chart.appendChild(zoomButtonDiv); - - zoomButtonDiv.addEventListener('click', function (event) { - event.preventDefault(); - - if (options.axisY.type === undefined) { - options.axisY.type = Chartist.AutoScaleAxis; - zoomButtonText.className = "icon-search-minus"; - } else { - options.axisY.type = undefined; - zoomButtonText.className = "icon-search-plus"; - } - - lineChart.update(null, options); - }); - - var tooltip = document.createElement("div"); - tooltip.className = "tooltip"; - - chart.appendChild(tooltip); - - /* Tooltips */ - var showToolTip = function () { - var index = this.getAttribute('ct:meta'); - - tooltip.innerHTML = chartData.tooltips[index]; - tooltip.style.display = 'block'; - }; - - var moveToolTip = function (event) { - var box = chart.getBoundingClientRect(); - var left = event.pageX - box.left - window.pageXOffset; - var top = event.pageY - box.top - window.pageYOffset; - - left = left + 20; - top = top - tooltip.offsetHeight / 2; - - if (left + tooltip.offsetWidth > box.width) { - left -= tooltip.offsetWidth + 40; - } - - if (top < 0) { - top = 0; - } - - if (top + tooltip.offsetHeight > box.height) { - top = box.height - tooltip.offsetHeight; - } - - tooltip.style.left = left + 'px'; - tooltip.style.top = top + 'px'; - }; - - var hideToolTip = function () { - tooltip.style.display = 'none'; - }; - chart.addEventListener('mousemove', moveToolTip); - - lineChart.on('created', function () { - var chartPoints = chart.getElementsByClassName('ct-point'); - for (i = 0, l = chartPoints.length; i < l; i++) { - chartPoints[i].addEventListener('mousemove', showToolTip); - chartPoints[i].addEventListener('mouseout', hideToolTip); - } - }); -}; - -var charts = document.getElementsByClassName('historychart'); -for (i = 0, l = charts.length; i < l; i++) { - renderChart(charts[i]); -} \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_cog.svg b/BlazorShop.UnitTests/codecoverage/icon_cog.svg deleted file mode 100644 index d730bf12..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_cog.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_cog_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_cog_dark.svg deleted file mode 100644 index ccbcd9b0..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_cog_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_cube.svg b/BlazorShop.UnitTests/codecoverage/icon_cube.svg deleted file mode 100644 index 3302443c..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_cube.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_cube_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_cube_dark.svg deleted file mode 100644 index 3e7f0fa8..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_cube_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_down-dir_active.svg b/BlazorShop.UnitTests/codecoverage/icon_down-dir_active.svg deleted file mode 100644 index d11cf041..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_down-dir_active.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_down-dir_active_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_down-dir_active_dark.svg deleted file mode 100644 index fa34aeb3..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_down-dir_active_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_fork.svg b/BlazorShop.UnitTests/codecoverage/icon_fork.svg deleted file mode 100644 index f0148b3a..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_fork.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_fork_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_fork_dark.svg deleted file mode 100644 index 11930c9b..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_fork_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_info-circled.svg b/BlazorShop.UnitTests/codecoverage/icon_info-circled.svg deleted file mode 100644 index 252166bb..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_info-circled.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_info-circled_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_info-circled_dark.svg deleted file mode 100644 index 252166bb..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_info-circled_dark.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_minus.svg b/BlazorShop.UnitTests/codecoverage/icon_minus.svg deleted file mode 100644 index 3c30c365..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_minus.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_minus_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_minus_dark.svg deleted file mode 100644 index 2516b6fc..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_minus_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_plus.svg b/BlazorShop.UnitTests/codecoverage/icon_plus.svg deleted file mode 100644 index 79327232..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_plus.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_plus_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_plus_dark.svg deleted file mode 100644 index 6ed4edd0..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_plus_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_search-minus.svg b/BlazorShop.UnitTests/codecoverage/icon_search-minus.svg deleted file mode 100644 index c174eb5e..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_search-minus.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_search-minus_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_search-minus_dark.svg deleted file mode 100644 index 9caaffbc..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_search-minus_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_search-plus.svg b/BlazorShop.UnitTests/codecoverage/icon_search-plus.svg deleted file mode 100644 index 04b24ecc..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_search-plus.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_search-plus_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_search-plus_dark.svg deleted file mode 100644 index 53241945..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_search-plus_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_sponsor.svg b/BlazorShop.UnitTests/codecoverage/icon_sponsor.svg deleted file mode 100644 index bf6d9591..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_sponsor.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_star.svg b/BlazorShop.UnitTests/codecoverage/icon_star.svg deleted file mode 100644 index b23c54ea..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_star.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_star_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_star_dark.svg deleted file mode 100644 index 49c0d034..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_star_dark.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_up-dir.svg b/BlazorShop.UnitTests/codecoverage/icon_up-dir.svg deleted file mode 100644 index 567c11f3..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_up-dir.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_up-dir_active.svg b/BlazorShop.UnitTests/codecoverage/icon_up-dir_active.svg deleted file mode 100644 index bb225544..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_up-dir_active.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_wrench.svg b/BlazorShop.UnitTests/codecoverage/icon_wrench.svg deleted file mode 100644 index b6aa318c..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_wrench.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/icon_wrench_dark.svg b/BlazorShop.UnitTests/codecoverage/icon_wrench_dark.svg deleted file mode 100644 index 5c77a9c8..00000000 --- a/BlazorShop.UnitTests/codecoverage/icon_wrench_dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/index.htm b/BlazorShop.UnitTests/codecoverage/index.htm deleted file mode 100644 index 36094fac..00000000 --- a/BlazorShop.UnitTests/codecoverage/index.htm +++ /dev/null @@ -1,560 +0,0 @@ - - - - - - - -Summary - Coverage Report - -
-

SummaryStarSponsor

-
-
-
Information
-
-
- - - - - - - - - - - - - - - - - - - - - -
Parser:Cobertura
Assemblies:6
Classes:376
Files:392
Coverage date:25-Feb-2023 - 4:58:54 PM
-
-
-
-
-
Line coverage
-
-
5%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1061
Uncovered lines:17506
Coverable lines:18567
Total lines:34472
Line coverage:5.7%
-
-
-
-
-
Branch coverage
-
-
5%
-
- - - - - - - - - - - - - -
Covered branches:63
Total branches:1239
Branch coverage:5%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Risk Hotspots

- - -

No risk hotspots found.

-

Coverage

- -
- ------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Line coverageBranch coverage
NameCoveredUncoveredCoverableTotalPercentageCoveredTotalPercentage
BlazorShop.Application564301435781066415.7%
  
6243414.2%
  
BlazorShop.Application.Commands.AccountCommand.ChangePasswordCommand40432100%
 
00
 
BlazorShop.Application.Commands.AccountCommand.LoginCommand20222100%
 
00
 
BlazorShop.Application.Commands.AccountCommand.RegisterCommand2464233.3%
  
00
 
BlazorShop.Application.Commands.AccountCommand.ResetPasswordCommand30327100%
 
00
 
BlazorShop.Application.Commands.CartCommand.CreateCartCommand50537100%
 
00
 
BlazorShop.Application.Commands.CartCommand.DeleteAllCartsCommand011170%
 
00
 
BlazorShop.Application.Commands.CartCommand.DeleteCartCommand022220%
 
00
 
BlazorShop.Application.Commands.CartCommand.UpdateCartCommand066420%
 
00
 
BlazorShop.Application.Commands.ClotheCommand.CreateClotheCommand70747100%
 
00
 
BlazorShop.Application.Commands.ClotheCommand.DeleteClotheCommand10117100%
 
00
 
BlazorShop.Application.Commands.ClotheCommand.UpdateClotheCommand70747100%
 
00
 
BlazorShop.Application.Commands.InvoiceCommand.CreateInvoiceCommand055370%
 
00
 
BlazorShop.Application.Commands.InvoiceCommand.DeleteInvoiceCommand011170%
 
00
 
BlazorShop.Application.Commands.InvoiceCommand.UpdateInvoiceCommand066420%
 
00
 
BlazorShop.Application.Commands.MusicCommand.CreateMusicCommand088520%
 
00
 
BlazorShop.Application.Commands.MusicCommand.DeleteMusicCommand011170%
 
00
 
BlazorShop.Application.Commands.MusicCommand.UpdateMusicCommand088520%
 
00
 
BlazorShop.Application.Commands.OrderCommand.CreateOrderCommand044320%
 
00
 
BlazorShop.Application.Commands.OrderCommand.DeleteOrderCommand011170%
 
00
 
BlazorShop.Application.Commands.OrderCommand.UpdateOrderCommand055370%
 
00
 
BlazorShop.Application.Commands.ReceiptCommand.CreateReceiptCommand044320%
 
00
 
BlazorShop.Application.Commands.ReceiptCommand.DeleteReceiptCommand011170%
 
00
 
BlazorShop.Application.Commands.ReceiptCommand.UpdateReceiptCommand055370%
 
00
 
BlazorShop.Application.Commands.RoleCommand.CreateRoleCommand011170%
 
00
 
BlazorShop.Application.Commands.RoleCommand.DeleteRoleCommand011170%
 
00
 
BlazorShop.Application.Commands.RoleCommand.UpdateRoleCommand022220%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.CreateSubscriberCommand066420%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.DeleteSubscriberCommand011170%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.UpdateCreatedSubscriberCommand055370%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberCommand077470%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberStatusCommand011170%
 
00
 
BlazorShop.Application.Commands.SubscriptionCommand.CreateSubscriptionCommand077470%
 
00
 
BlazorShop.Application.Commands.SubscriptionCommand.DeleteSubscriptionCommand011170%
 
00
 
BlazorShop.Application.Commands.SubscriptionCommand.UpdateSubscriptionCommand077470%
 
00
 
BlazorShop.Application.Commands.TodoItemCommand.CreateTodoItemCommand066420%
 
00
 
BlazorShop.Application.Commands.TodoItemCommand.DeleteTodoItemCommand011170%
 
00
 
BlazorShop.Application.Commands.TodoItemCommand.UpdateTodoItemCommand066420%
 
00
 
BlazorShop.Application.Commands.TodoListCommand.CreateTodoListCommand022220%
 
00
 
BlazorShop.Application.Commands.TodoListCommand.DeleteTodoListCommand011170%
 
00
 
BlazorShop.Application.Commands.TodoListCommand.UpdateTodoListCommand022220%
 
00
 
BlazorShop.Application.Commands.UserCommand.ActivateUserCommand10117100%
 
00
 
BlazorShop.Application.Commands.UserCommand.AssignUserToRoleCommand20222100%
 
00
 
BlazorShop.Application.Commands.UserCommand.CreateUserCommand2243250%
  
00
 
BlazorShop.Application.Commands.UserCommand.DeleteUserCommand10117100%
 
00
 
BlazorShop.Application.Commands.UserCommand.UpdateUserCommand1343225%
  
00
 
BlazorShop.Application.Commands.UserCommand.UpdateUserEmailCommand1232733.3%
  
00
 
BlazorShop.Application.Common.Behaviours.UnhandledExceptionBehaviour<T1, T2>01414500%
 
00
 
BlazorShop.Application.Common.Behaviours.ValidationBehaviour<T1, T2>01717570%
 
040%
 
BlazorShop.Application.Common.Exceptions.ValidationException01010370%
 
00
 
BlazorShop.Application.Common.Mappings.IMapFrom<T>011190%
 
00
 
BlazorShop.Application.Common.Mappings.MappingExtensions011220%
 
00
 
BlazorShop.Application.Common.Mappings.MappingProfile01515370%
 
080%
 
BlazorShop.Application.Common.Models.EmailSettings60642100%
 
00
 
BlazorShop.Application.Common.Models.JwtTokenConfig055370%
 
00
 
BlazorShop.Application.Common.Models.JwtTokenResponse7295577.7%
  
00
 
BlazorShop.Application.Common.Models.RequestResponse90948100%
 
00
 
BlazorShop.Application.Common.Models.Result<T>40434100%
 
00
 
BlazorShop.Application.DependencyInjection088290%
 
00
 
BlazorShop.Application.Handlers.Commands.AccountHandler.ChangePasswordCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.AccountHandler.LoginCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.AccountHandler.RegisterCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.AccountHandler.ResetPasswordCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.CartHandler.CreateCartCommandHandler03737840%
 
060%
 
BlazorShop.Application.Handlers.Commands.CartHandler.DeleteAllCartsCommandHandler02323620%
 
040%
 
BlazorShop.Application.Handlers.Commands.CartHandler.DeleteCartCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.CartHandler.UpdateCartCommandHandler02929710%
 
060%
 
BlazorShop.Application.Handlers.Commands.ClotheHandler.CreateClotheCommandHandler3003070100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.ClotheHandler.DeleteClotheCommandHandler252276992.5%
  
3650%
  
BlazorShop.Application.Handlers.Commands.ClotheHandler.UpdateClotheCommandHandler302327493.7%
  
3650%
  
BlazorShop.Application.Handlers.Commands.InvoiceHandler.CreateInvoiceCommandHandler02828680%
 
040%
 
BlazorShop.Application.Handlers.Commands.InvoiceHandler.DeleteInvoiceCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.InvoiceHandler.UpdateInvoiceCommandHandler03131730%
 
060%
 
BlazorShop.Application.Handlers.Commands.MusicHandler.CreateMusicCommandHandler03636780%
 
060%
 
BlazorShop.Application.Handlers.Commands.MusicHandler.DeleteMusicCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.MusicHandler.UpdateMusicCommandHandler03333750%
 
060%
 
BlazorShop.Application.Handlers.Commands.OrderHandler.CreateOrderCommandHandler02828680%
 
040%
 
BlazorShop.Application.Handlers.Commands.OrderHandler.DeleteOrderCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.OrderHandler.UpdateOrderCommandHandler03030720%
 
060%
 
BlazorShop.Application.Handlers.Commands.ReceiptHandler.CreateReceiptCommandHandler02727670%
 
040%
 
BlazorShop.Application.Handlers.Commands.ReceiptHandler.DeleteReceiptCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.ReceiptHandler.UpdateReceiptCommandHandler02929710%
 
060%
 
BlazorShop.Application.Handlers.Commands.RoleHandler.CreateRoleCommandHandler01818570%
 
040%
 
BlazorShop.Application.Handlers.Commands.RoleHandler.DeleteRoleCommandHandler01818570%
 
040%
 
BlazorShop.Application.Handlers.Commands.RoleHandler.UpdateRoleCommandHandler01818570%
 
040%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.CreateSubscriberCommandHandler04343910%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.DeleteSubscriberCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateCreatedSubscriberCommandHandler03737860%
 
080%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberCommandHandler03535790%
 
080%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberStatusCommandHandler02727690%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriptionHandler.CreateSubscriptionCommandHandler03838800%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriptionHandler.DeleteSubscriptionCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriptionHandler.UpdateSubscriptionCommandHandler03232740%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoItemHandler.CreateTodoItemCommandHandler04444910%
 
080%
 
BlazorShop.Application.Handlers.Commands.TodoItemHandler.DeleteTodoItemCommandHandler02626680%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoItemHandler.UpdateTodoItemCommandHandler03131740%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoListHandler.CreateTodoListCommandHandler03333780%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoListHandler.DeleteTodoListCommandHandler02626680%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoListHandler.UpdateTodoListCommandHandler02727700%
 
060%
 
BlazorShop.Application.Handlers.Commands.UserHandler.ActivateUserCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.AssignUserToRoleCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.CreateUserCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.DeleteUserCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserCommandHandler1901958100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserEmailCommandHandler1901958100%
 
2450%
  
BlazorShop.Application.Handlers.Queries.CartHandler.GetCartByIdQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsCountQueryHandler515205825%
  
1250%
  
BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClotheByIdQueryHandler3203277100%
 
3650%
  
BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClothesQueryHandler3203277100%
 
3650%
  
BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoiceByIdQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoicesQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicsQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrderByIdQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrdersQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptByIdQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptsQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByIdQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByNormalizedNameQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesForAdminQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscriberByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscribersQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetUserSubscribersQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionsQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemsQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListsQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByEmailQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByIdQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersInactiveQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Queries.CartQuery.GetCartByIdQuery022220%
 
00
 
BlazorShop.Application.Queries.CartQuery.GetCartsCountQuery011170%
 
00
 
BlazorShop.Application.Queries.CartQuery.GetCartsQuery011170%
 
00
 
BlazorShop.Application.Queries.ClotheQuery.GetClotheByIdQuery10117100%
 
00
 
BlazorShop.Application.Queries.InvoiceQuery.GetInvoiceByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.MusicQuery.GetMusicByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.OrderQuery.GetOrderByIdQuery022220%
 
00
 
BlazorShop.Application.Queries.OrderQuery.GetOrdersQuery011170%
 
00
 
BlazorShop.Application.Queries.ReceiptQuery.GetReceiptByIdQuery022220%
 
00
 
BlazorShop.Application.Queries.ReceiptQuery.GetReceiptsQuery011170%
 
00
 
BlazorShop.Application.Queries.RoleQuery.GetRoleByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.RoleQuery.GetRoleByNormalizedNameQuery011170%
 
00
 
BlazorShop.Application.Queries.SubscriberQuery.GetSubscriberByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.SubscriberQuery.GetUserSubscribersQuery011170%
 
00
 
BlazorShop.Application.Queries.SubscriptionQuery.GetSubscriptionByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.TodoItemQuery.GetTodoItemByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.TodoListQuery.GetTodoListByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.UserQuery.GetUserByEmailQuery011170%
 
00
 
BlazorShop.Application.Queries.UserQuery.GetUserByIdQuery011170%
 
00
 
BlazorShop.Application.Responses.CartResponse02121750%
 
00
 
BlazorShop.Application.Responses.ClotheResponse811196942.1%
  
00
 
BlazorShop.Application.Responses.InvoiceResponse01515570%
 
00
 
BlazorShop.Application.Responses.MusicResponse01919690%
 
00
 
BlazorShop.Application.Responses.OrderResponse01515570%
 
00
 
BlazorShop.Application.Responses.ReceiptResponse01313510%
 
00
 
BlazorShop.Application.Responses.RoleResponse099390%
 
00
 
BlazorShop.Application.Responses.SubscriberResponse033331110%
 
00
 
BlazorShop.Application.Responses.SubscriptionResponse02323810%
 
00
 
BlazorShop.Application.Responses.TodoItemResponse01919690%
 
00
 
BlazorShop.Application.Responses.TodoListResponse099390%
 
00
 
BlazorShop.Application.Responses.UserResponse02121710%
 
00
 
BlazorShop.Application.Validators.AccountValidator.ChangePasswordCommandValidator01616350%
 
00
 
BlazorShop.Application.Validators.AccountValidator.LoginCommandValidator02323490%
 
00
 
BlazorShop.Application.Validators.AccountValidator.RegisterCommandValidator03636650%
 
00
 
BlazorShop.Application.Validators.AccountValidator.ResetPasswordCommandValidator02828550%
 
00
 
BlazorShop.Application.Validators.CartValidator.CreateCartCommandValidator02323570%
 
00
 
BlazorShop.Application.Validators.CartValidator.DeleteAllCartsCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.CartValidator.DeleteCartCommandValidator077240%
 
00
 
BlazorShop.Application.Validators.CartValidator.GetCartByIdQueryValidator077240%
 
00
 
BlazorShop.Application.Validators.CartValidator.GetCartsCountQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.CartValidator.GetCartsQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.CartValidator.UpdateCartCommandValidator02525600%
 
00
 
BlazorShop.Application.Validators.ClotheValidator.CreateClotheCommandValidator03131660%
 
00
 
BlazorShop.Application.Validators.ClotheValidator.DeleteClotheCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.ClotheValidator.GetClotheByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.ClotheValidator.UpdateClotheCommandValidator03333690%
 
00
 
BlazorShop.Application.Validators.InvoiceValidator.CreateInvoiceCommandValidator02525590%
 
00
 
BlazorShop.Application.Validators.InvoiceValidator.DeleteInvoiceCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.InvoiceValidator.GetInvoiceByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.InvoiceValidator.UpdateInvoiceCommandValidator02727620%
 
00
 
BlazorShop.Application.Validators.MusicValidator.CreateMusicCommandValidator03939760%
 
00
 
BlazorShop.Application.Validators.MusicValidator.DeleteMusicCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.MusicValidator.GetMusicByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.MusicValidator.UpdateMusicCommandValidator03939760%
 
00
 
BlazorShop.Application.Validators.OrderValidator.CreateOrderCommandValidator01717360%
 
00
 
BlazorShop.Application.Validators.OrderValidator.DeleteOrderCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.OrderValidator.GetOrderByIdQueryValidator099260%
 
00
 
BlazorShop.Application.Validators.OrderValidator.GetOrdersQueryValidator077230%
 
00
 
BlazorShop.Application.Validators.OrderValidator.UpdateOrderCommandValidator01919390%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.CreateReceiptCommandValidator01919380%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.DeleteReceiptCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.GetReceiptByIdQueryValidator099260%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.GetReceiptsQueryValidator077230%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.UpdateReceiptCommandValidator02121410%
 
00
 
BlazorShop.Application.Validators.RoleValidator.CreateRoleCommandValidator077230%
 
00
 
BlazorShop.Application.Validators.RoleValidator.DeleteRoleCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.RoleValidator.GetRoleByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.RoleValidator.GetRoleByNormalizedNameQueryValidator077230%
 
00
 
BlazorShop.Application.Validators.RoleValidator.UpdateRoleCommandValidator099260%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.CreateSubscriberCommandValidator02020410%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.DeleteSubscriberCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.GetSubscriberByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.GetUserSubscribersQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.UpdateCreatedSubscriberCommandValidator02222420%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberCommandValidator02424460%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberStatusCommandValidator077230%
 
00
 
BlazorShop.Application.Validators.SubscriptionValidator.CreateSubscriptionCommandValidator03434700%
 
00
 
BlazorShop.Application.Validators.SubscriptionValidator.DeleteSubscriptionCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriptionValidator.GetSubscriptionByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriptionValidator.UpdateSubscriptionCommandValidator03434700%
 
00
 
BlazorShop.Application.Validators.TodoItemValidator.CreateTodoItemCommandValidator02929640%
 
00
 
BlazorShop.Application.Validators.TodoItemValidator.DeleteTodoItemCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.TodoItemValidator.GetTodoItemByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.TodoItemValidator.UpdateTodoItemCommandValidator03030650%
 
00
 
BlazorShop.Application.Validators.TodoListValidator.CreateTodoListCommandValidator01717480%
 
00
 
BlazorShop.Application.Validators.TodoListValidator.DeleteTodoListCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.TodoListValidator.GetTodoListByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.TodoListValidator.UpdateTodoListCommandValidator01717480%
 
00
 
BlazorShop.Application.Validators.UserValidator.ActivateUserCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.UserValidator.AssignUserToRoleCommandValidator077240%
 
00
 
BlazorShop.Application.Validators.UserValidator.CreateUserCommandValidator03131590%
 
00
 
BlazorShop.Application.Validators.UserValidator.DeleteUserCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.UserValidator.GetUserByEmailQueryValidator01919440%
 
00
 
BlazorShop.Application.Validators.UserValidator.GetUserByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.UserValidator.UpdateUserCommandValidator01717360%
 
00
 
BlazorShop.Application.Validators.UserValidator.UpdateUserEmailCommandValidator02727540%
 
00
 
BlazorShop.Domain8667458610.8%
  
00
 
BlazorShop.Domain.Common.EntityBase10117100%
 
00
 
BlazorShop.Domain.Entities.Cart055370%
 
00
 
BlazorShop.Domain.Entities.Clothe70747100%
 
00
 
BlazorShop.Domain.Entities.Identity.Role022220%
 
00
 
BlazorShop.Domain.Entities.Identity.RoleClaim011170%
 
00
 
BlazorShop.Domain.Entities.Identity.User077470%
 
00
 
BlazorShop.Domain.Entities.Identity.UserClaim011170%
 
00
 
BlazorShop.Domain.Entities.Identity.UserLogin011170%
 
00
 
BlazorShop.Domain.Entities.Identity.UserRole022220%
 
00
 
BlazorShop.Domain.Entities.Identity.UserToken011170%
 
00
 
BlazorShop.Domain.Entities.Invoice055370%
 
00
 
BlazorShop.Domain.Entities.Music077470%
 
00
 
BlazorShop.Domain.Entities.Order055370%
 
00
 
BlazorShop.Domain.Entities.Receipt044320%
 
00
 
BlazorShop.Domain.Entities.Subscriber088520%
 
00
 
BlazorShop.Domain.Entities.Subscription099570%
 
00
 
BlazorShop.Domain.Entities.TodoItem066420%
 
00
 
BlazorShop.Domain.Entities.TodoList022220%
 
00
 
BlazorShop.Infrastructure3161081511131130262.8%
  
0700%
 
BlazorShop.Infrastructure.DependencyInjection03232590%
 
00
 
BlazorShop.Infrastructure.Migrations.ApplicationDbContextModelSnapshot07107107560%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_108818819790%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_1001147114712700%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_1106966967650%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_207107107980%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_306036036680%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_406096096740%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_506126126770%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_606416417100%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_706266266910%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_806436437100%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_906766767450%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration1207587588300%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration1307347348030%
 
00
 
BlazorShop.Infrastructure.Persistence.ApplicationDbContext4134410893.1%
  
00
 
BlazorShop.Infrastructure.Persistence.ApplicationDbContextSeed03173173850%
 
0200%
 
BlazorShop.Infrastructure.Persistence.Configurations.CartConfiguration1201231100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.ClotheConfiguration2302342100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleClaimConfiguration1201232100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleConfiguration90928100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserClaimConfiguration1201232100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserConfiguration2302343100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserLoginConfiguration60625100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserRoleConfiguration90928100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserTokenConfiguration60625100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.InvoiceConfiguration1601635100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.MusicConfiguration2302342100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.OrderConfiguration1801837100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.ReceiptConfiguration1501534100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.SubscriberConfiguration1901938100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.SubscriptionConfiguration2902948100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.TodoItemConfiguration90928100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.TodoListConfiguration70726100%
 
00
 
BlazorShop.Infrastructure.Services.AccountService91011101838.1%
  
0200%
 
BlazorShop.Infrastructure.Services.DateTimeService011170%
 
00
 
BlazorShop.Infrastructure.Services.EmailService056561010%
 
020%
 
BlazorShop.Infrastructure.Services.RoleService91241332196.7%
  
0120%
 
BlazorShop.Infrastructure.Services.UserService91241332256.7%
  
0160%
 
BlazorShop.Infrastructure.Utils.AdminSeedModel055370%
 
00
 
BlazorShop.Infrastructure.Utils.RolesSeedModel066420%
 
00
 
BlazorShop.WebApi6084590520956.6%
  
11740.5%
 
BlazorShop.WebApi.Controllers.AccountsController5354010912.5%
  
080%
 
BlazorShop.WebApi.Controllers.ApiBaseController50529100%
 
00
 
BlazorShop.WebApi.Controllers.CartsController9344312020.9%
  
1128.3%
  
BlazorShop.WebApi.Controllers.ClothesController33033969%
  
0100%
 
BlazorShop.WebApi.Controllers.HomeController414186322.2%
  
00
 
BlazorShop.WebApi.Controllers.InvoicesController33033919%
  
0100%
 
BlazorShop.WebApi.Controllers.MusicsController33033959%
  
0100%
 
BlazorShop.WebApi.Controllers.OrdersController33033979%
  
0100%
 
BlazorShop.WebApi.Controllers.PaymentsController41731773082.2%
  
080%
 
BlazorShop.WebApi.Controllers.ReceiptsController33033979%
  
0100%
 
BlazorShop.WebApi.Controllers.RolesController336391047.6%
  
0120%
 
BlazorShop.WebApi.Controllers.SubscribersController336391107.6%
  
0120%
 
BlazorShop.WebApi.Controllers.SubscriptionsController33033959%
  
0100%
 
BlazorShop.WebApi.Controllers.TodoItemsController324277811.1%
  
080%
 
BlazorShop.WebApi.Controllers.TodoListsController33033919%
  
0100%
 
BlazorShop.WebApi.Controllers.UsersController348511395.8%
  
0160%
 
BlazorShop.WebApi.Filters.ApiExceptionFilterAttribute059591160%
 
0180%
 
BlazorShop.WebApi.Filters.JwtTokenMiddleware03838850%
 
060%
 
Program01381381720%
 
040%
 
BlazorShop.WebClient1072716282379963.7%
  
05530%
 
BlazorShop.WebClient.Auth.AuthenticationService11698013613.7%
  
080%
 
BlazorShop.WebClient.Auth.AuthStateProvider727349020.5%
  
060%
 
BlazorShop.WebClient.Auth.JwtTokenParser03535780%
 
0100%
 
BlazorShop.WebClient.AuthPolicies.AdminRoleHandler01111330%
 
080%
 
BlazorShop.WebClient.AuthPolicies.AdminRoleRequirement055260%
 
00
 
BlazorShop.WebClient.AuthPolicies.CustomerRoleHandler01616380%
 
0140%
 
BlazorShop.WebClient.AuthPolicies.CustomerRoleRequirement088330%
 
00
 
BlazorShop.WebClient.AuthPolicies.DefaultRoleHandler01111330%
 
080%
 
BlazorShop.WebClient.AuthPolicies.DefaultRoleRequirement055260%
 
00
 
BlazorShop.WebClient.AuthPolicies.UserRoleHandler01111330%
 
080%
 
BlazorShop.WebClient.AuthPolicies.UserRoleRequirement055260%
 
00
 
BlazorShop.WebClient.Interceptor.HttpInterceptorService523288417.8%
  
070%
 
BlazorShop.WebClient.Interceptor.HttpResponseException01212490%
 
00
 
BlazorShop.WebClient.Pages.Account.Login027271080%
 
060%
 
BlazorShop.WebClient.Pages.Account.Logout044230%
 
00
 
BlazorShop.WebClient.Pages.Account.Register016161010%
 
040%
 
BlazorShop.WebClient.Pages.Account.ResetPassword01616840%
 
040%
 
BlazorShop.WebClient.Pages.Account.VerifyAuth03838750%
 
0140%
 
BlazorShop.WebClient.Pages.Admin.Clothes.AddEditClothe032321390%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Clothes.Clothes064641980%
 
080%
 
BlazorShop.WebClient.Pages.Admin.Musics.AddEditMusic032321410%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Musics.Musics047471650%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Roles.AddEditRole03232970%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Roles.Roles060601890%
 
080%
 
BlazorShop.WebClient.Pages.Admin.Subscribers.Subscribers042421450%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Subscriptions.AddEditSubscription032321380%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Subscriptions.Subscriptions047471650%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Todos.TodoItems078782220%
 
0220%
 
BlazorShop.WebClient.Pages.Admin.Todos.TodoLists037371420%
 
0100%
 
BlazorShop.WebClient.Pages.Admin.Todos.TodoState031311120%
 
00
 
BlazorShop.WebClient.Pages.Admin.Users.AddEditUser038381250%
 
080%
 
BlazorShop.WebClient.Pages.Admin.Users.Users082822650%
 
0120%
 
BlazorShop.WebClient.Pages.Cart.Cart037371560%
 
080%
 
BlazorShop.WebClient.Pages.Clothes.ClotheDetails035352270%
 
060%
 
BlazorShop.WebClient.Pages.Clothes.Index056561920%
 
0100%
 
BlazorShop.WebClient.Pages.Internal.Not_found033280%
 
00
 
BlazorShop.WebClient.Pages.Internal.Server_error033280%
 
00
 
BlazorShop.WebClient.Pages.Internal.Unauthorized033280%
 
00
 
BlazorShop.WebClient.Pages.Musics.Index01181182900%
 
0280%
 
BlazorShop.WebClient.Pages.Musics.MusicDetails021211740%
 
040%
 
BlazorShop.WebClient.Pages.Orders.MyOrders051511540%
 
0100%
 
BlazorShop.WebClient.Pages.Orders.OrderSuccess01111880%
 
020%
 
BlazorShop.WebClient.Pages.Orders.OrderView044441410%
 
0100%
 
BlazorShop.WebClient.Pages.Receipts.Receipts045451420%
 
0100%
 
BlazorShop.WebClient.Pages.Subscriptions.MySubscriptions01281283500%
 
0260%
 
BlazorShop.WebClient.Pages.Subscriptions.SubscriptionSuccess01111880%
 
020%
 
BlazorShop.WebClient.Pages.Subscriptions.UpdateSubscriptionSuccess01111880%
 
020%
 
BlazorShop.WebClient.Pages.User.Profile060602720%
 
0320%
 
BlazorShop.WebClient.Services.AccountService637438613.9%
  
040%
 
BlazorShop.WebClient.Services.CartService61181242014.8%
  
0220%
 
BlazorShop.WebClient.Services.ClotheService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.MusicService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.OrderService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.ReceiptService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.RoleService689951586.3%
  
0180%
 
BlazorShop.WebClient.Services.SessionStorageService621277822.2%
  
020%
 
BlazorShop.WebClient.Services.StripeService616225727.2%
  
020%
 
BlazorShop.WebClient.Services.SubscriberService684901536.6%
  
0180%
 
BlazorShop.WebClient.Services.SubscriptionService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.TodoItemService660661199%
  
0120%
 
BlazorShop.WebClient.Services.TodoListService673791387.5%
  
0160%
 
BlazorShop.WebClient.Services.UserService61301362144.4%
  
0220%
 
BlazorShop.WebClient.Shared.AppState01414400%
 
00
 
BlazorShop.WebClient.Shared.MainLayout029291110%
 
080%
 
BlazorShop.WebClient.Shared.NavMenu0551290%
 
020%
 
Program05555720%
 
00
 
BlazorShop.WorkerService6505610510.7%
  
080%
 
BlazorShop.WorkerService.Worker629357717.1%
  
080%
 
Program02121280%
 
00
 
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/index.html b/BlazorShop.UnitTests/codecoverage/index.html deleted file mode 100644 index 36094fac..00000000 --- a/BlazorShop.UnitTests/codecoverage/index.html +++ /dev/null @@ -1,560 +0,0 @@ - - - - - - - -Summary - Coverage Report - -
-

SummaryStarSponsor

-
-
-
Information
-
-
- - - - - - - - - - - - - - - - - - - - - -
Parser:Cobertura
Assemblies:6
Classes:376
Files:392
Coverage date:25-Feb-2023 - 4:58:54 PM
-
-
-
-
-
Line coverage
-
-
5%
-
- - - - - - - - - - - - - - - - - - - - - -
Covered lines:1061
Uncovered lines:17506
Coverable lines:18567
Total lines:34472
Line coverage:5.7%
-
-
-
-
-
Branch coverage
-
-
5%
-
- - - - - - - - - - - - - -
Covered branches:63
Total branches:1239
Branch coverage:5%
-
-
-
-
-
Method coverage
-
-
-

Feature is only available for sponsors

-Upgrade to PRO version -
-
-
-
-

Risk Hotspots

- - -

No risk hotspots found.

-

Coverage

- -
- ------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Line coverageBranch coverage
NameCoveredUncoveredCoverableTotalPercentageCoveredTotalPercentage
BlazorShop.Application564301435781066415.7%
  
6243414.2%
  
BlazorShop.Application.Commands.AccountCommand.ChangePasswordCommand40432100%
 
00
 
BlazorShop.Application.Commands.AccountCommand.LoginCommand20222100%
 
00
 
BlazorShop.Application.Commands.AccountCommand.RegisterCommand2464233.3%
  
00
 
BlazorShop.Application.Commands.AccountCommand.ResetPasswordCommand30327100%
 
00
 
BlazorShop.Application.Commands.CartCommand.CreateCartCommand50537100%
 
00
 
BlazorShop.Application.Commands.CartCommand.DeleteAllCartsCommand011170%
 
00
 
BlazorShop.Application.Commands.CartCommand.DeleteCartCommand022220%
 
00
 
BlazorShop.Application.Commands.CartCommand.UpdateCartCommand066420%
 
00
 
BlazorShop.Application.Commands.ClotheCommand.CreateClotheCommand70747100%
 
00
 
BlazorShop.Application.Commands.ClotheCommand.DeleteClotheCommand10117100%
 
00
 
BlazorShop.Application.Commands.ClotheCommand.UpdateClotheCommand70747100%
 
00
 
BlazorShop.Application.Commands.InvoiceCommand.CreateInvoiceCommand055370%
 
00
 
BlazorShop.Application.Commands.InvoiceCommand.DeleteInvoiceCommand011170%
 
00
 
BlazorShop.Application.Commands.InvoiceCommand.UpdateInvoiceCommand066420%
 
00
 
BlazorShop.Application.Commands.MusicCommand.CreateMusicCommand088520%
 
00
 
BlazorShop.Application.Commands.MusicCommand.DeleteMusicCommand011170%
 
00
 
BlazorShop.Application.Commands.MusicCommand.UpdateMusicCommand088520%
 
00
 
BlazorShop.Application.Commands.OrderCommand.CreateOrderCommand044320%
 
00
 
BlazorShop.Application.Commands.OrderCommand.DeleteOrderCommand011170%
 
00
 
BlazorShop.Application.Commands.OrderCommand.UpdateOrderCommand055370%
 
00
 
BlazorShop.Application.Commands.ReceiptCommand.CreateReceiptCommand044320%
 
00
 
BlazorShop.Application.Commands.ReceiptCommand.DeleteReceiptCommand011170%
 
00
 
BlazorShop.Application.Commands.ReceiptCommand.UpdateReceiptCommand055370%
 
00
 
BlazorShop.Application.Commands.RoleCommand.CreateRoleCommand011170%
 
00
 
BlazorShop.Application.Commands.RoleCommand.DeleteRoleCommand011170%
 
00
 
BlazorShop.Application.Commands.RoleCommand.UpdateRoleCommand022220%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.CreateSubscriberCommand066420%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.DeleteSubscriberCommand011170%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.UpdateCreatedSubscriberCommand055370%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberCommand077470%
 
00
 
BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberStatusCommand011170%
 
00
 
BlazorShop.Application.Commands.SubscriptionCommand.CreateSubscriptionCommand077470%
 
00
 
BlazorShop.Application.Commands.SubscriptionCommand.DeleteSubscriptionCommand011170%
 
00
 
BlazorShop.Application.Commands.SubscriptionCommand.UpdateSubscriptionCommand077470%
 
00
 
BlazorShop.Application.Commands.TodoItemCommand.CreateTodoItemCommand066420%
 
00
 
BlazorShop.Application.Commands.TodoItemCommand.DeleteTodoItemCommand011170%
 
00
 
BlazorShop.Application.Commands.TodoItemCommand.UpdateTodoItemCommand066420%
 
00
 
BlazorShop.Application.Commands.TodoListCommand.CreateTodoListCommand022220%
 
00
 
BlazorShop.Application.Commands.TodoListCommand.DeleteTodoListCommand011170%
 
00
 
BlazorShop.Application.Commands.TodoListCommand.UpdateTodoListCommand022220%
 
00
 
BlazorShop.Application.Commands.UserCommand.ActivateUserCommand10117100%
 
00
 
BlazorShop.Application.Commands.UserCommand.AssignUserToRoleCommand20222100%
 
00
 
BlazorShop.Application.Commands.UserCommand.CreateUserCommand2243250%
  
00
 
BlazorShop.Application.Commands.UserCommand.DeleteUserCommand10117100%
 
00
 
BlazorShop.Application.Commands.UserCommand.UpdateUserCommand1343225%
  
00
 
BlazorShop.Application.Commands.UserCommand.UpdateUserEmailCommand1232733.3%
  
00
 
BlazorShop.Application.Common.Behaviours.UnhandledExceptionBehaviour<T1, T2>01414500%
 
00
 
BlazorShop.Application.Common.Behaviours.ValidationBehaviour<T1, T2>01717570%
 
040%
 
BlazorShop.Application.Common.Exceptions.ValidationException01010370%
 
00
 
BlazorShop.Application.Common.Mappings.IMapFrom<T>011190%
 
00
 
BlazorShop.Application.Common.Mappings.MappingExtensions011220%
 
00
 
BlazorShop.Application.Common.Mappings.MappingProfile01515370%
 
080%
 
BlazorShop.Application.Common.Models.EmailSettings60642100%
 
00
 
BlazorShop.Application.Common.Models.JwtTokenConfig055370%
 
00
 
BlazorShop.Application.Common.Models.JwtTokenResponse7295577.7%
  
00
 
BlazorShop.Application.Common.Models.RequestResponse90948100%
 
00
 
BlazorShop.Application.Common.Models.Result<T>40434100%
 
00
 
BlazorShop.Application.DependencyInjection088290%
 
00
 
BlazorShop.Application.Handlers.Commands.AccountHandler.ChangePasswordCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.AccountHandler.LoginCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.AccountHandler.RegisterCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.AccountHandler.ResetPasswordCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.CartHandler.CreateCartCommandHandler03737840%
 
060%
 
BlazorShop.Application.Handlers.Commands.CartHandler.DeleteAllCartsCommandHandler02323620%
 
040%
 
BlazorShop.Application.Handlers.Commands.CartHandler.DeleteCartCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.CartHandler.UpdateCartCommandHandler02929710%
 
060%
 
BlazorShop.Application.Handlers.Commands.ClotheHandler.CreateClotheCommandHandler3003070100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.ClotheHandler.DeleteClotheCommandHandler252276992.5%
  
3650%
  
BlazorShop.Application.Handlers.Commands.ClotheHandler.UpdateClotheCommandHandler302327493.7%
  
3650%
  
BlazorShop.Application.Handlers.Commands.InvoiceHandler.CreateInvoiceCommandHandler02828680%
 
040%
 
BlazorShop.Application.Handlers.Commands.InvoiceHandler.DeleteInvoiceCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.InvoiceHandler.UpdateInvoiceCommandHandler03131730%
 
060%
 
BlazorShop.Application.Handlers.Commands.MusicHandler.CreateMusicCommandHandler03636780%
 
060%
 
BlazorShop.Application.Handlers.Commands.MusicHandler.DeleteMusicCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.MusicHandler.UpdateMusicCommandHandler03333750%
 
060%
 
BlazorShop.Application.Handlers.Commands.OrderHandler.CreateOrderCommandHandler02828680%
 
040%
 
BlazorShop.Application.Handlers.Commands.OrderHandler.DeleteOrderCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.OrderHandler.UpdateOrderCommandHandler03030720%
 
060%
 
BlazorShop.Application.Handlers.Commands.ReceiptHandler.CreateReceiptCommandHandler02727670%
 
040%
 
BlazorShop.Application.Handlers.Commands.ReceiptHandler.DeleteReceiptCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.ReceiptHandler.UpdateReceiptCommandHandler02929710%
 
060%
 
BlazorShop.Application.Handlers.Commands.RoleHandler.CreateRoleCommandHandler01818570%
 
040%
 
BlazorShop.Application.Handlers.Commands.RoleHandler.DeleteRoleCommandHandler01818570%
 
040%
 
BlazorShop.Application.Handlers.Commands.RoleHandler.UpdateRoleCommandHandler01818570%
 
040%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.CreateSubscriberCommandHandler04343910%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.DeleteSubscriberCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateCreatedSubscriberCommandHandler03737860%
 
080%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberCommandHandler03535790%
 
080%
 
BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberStatusCommandHandler02727690%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriptionHandler.CreateSubscriptionCommandHandler03838800%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriptionHandler.DeleteSubscriptionCommandHandler02626670%
 
060%
 
BlazorShop.Application.Handlers.Commands.SubscriptionHandler.UpdateSubscriptionCommandHandler03232740%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoItemHandler.CreateTodoItemCommandHandler04444910%
 
080%
 
BlazorShop.Application.Handlers.Commands.TodoItemHandler.DeleteTodoItemCommandHandler02626680%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoItemHandler.UpdateTodoItemCommandHandler03131740%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoListHandler.CreateTodoListCommandHandler03333780%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoListHandler.DeleteTodoListCommandHandler02626680%
 
060%
 
BlazorShop.Application.Handlers.Commands.TodoListHandler.UpdateTodoListCommandHandler02727700%
 
060%
 
BlazorShop.Application.Handlers.Commands.UserHandler.ActivateUserCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.AssignUserToRoleCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.CreateUserCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.DeleteUserCommandHandler1801857100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserCommandHandler1901958100%
 
2450%
  
BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserEmailCommandHandler1901958100%
 
2450%
  
BlazorShop.Application.Handlers.Queries.CartHandler.GetCartByIdQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsCountQueryHandler515205825%
  
1250%
  
BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClotheByIdQueryHandler3203277100%
 
3650%
  
BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClothesQueryHandler3203277100%
 
3650%
  
BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoiceByIdQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoicesQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicsQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrderByIdQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrdersQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptByIdQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptsQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByIdQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByNormalizedNameQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesForAdminQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscriberByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscribersQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetUserSubscribersQueryHandler626327718.7%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionsQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemsQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListByIdQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListsQueryHandler625317619.3%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByEmailQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByIdQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersInactiveQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersQueryHandler521266619.2%
  
1616.6%
  
BlazorShop.Application.Queries.CartQuery.GetCartByIdQuery022220%
 
00
 
BlazorShop.Application.Queries.CartQuery.GetCartsCountQuery011170%
 
00
 
BlazorShop.Application.Queries.CartQuery.GetCartsQuery011170%
 
00
 
BlazorShop.Application.Queries.ClotheQuery.GetClotheByIdQuery10117100%
 
00
 
BlazorShop.Application.Queries.InvoiceQuery.GetInvoiceByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.MusicQuery.GetMusicByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.OrderQuery.GetOrderByIdQuery022220%
 
00
 
BlazorShop.Application.Queries.OrderQuery.GetOrdersQuery011170%
 
00
 
BlazorShop.Application.Queries.ReceiptQuery.GetReceiptByIdQuery022220%
 
00
 
BlazorShop.Application.Queries.ReceiptQuery.GetReceiptsQuery011170%
 
00
 
BlazorShop.Application.Queries.RoleQuery.GetRoleByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.RoleQuery.GetRoleByNormalizedNameQuery011170%
 
00
 
BlazorShop.Application.Queries.SubscriberQuery.GetSubscriberByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.SubscriberQuery.GetUserSubscribersQuery011170%
 
00
 
BlazorShop.Application.Queries.SubscriptionQuery.GetSubscriptionByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.TodoItemQuery.GetTodoItemByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.TodoListQuery.GetTodoListByIdQuery011170%
 
00
 
BlazorShop.Application.Queries.UserQuery.GetUserByEmailQuery011170%
 
00
 
BlazorShop.Application.Queries.UserQuery.GetUserByIdQuery011170%
 
00
 
BlazorShop.Application.Responses.CartResponse02121750%
 
00
 
BlazorShop.Application.Responses.ClotheResponse811196942.1%
  
00
 
BlazorShop.Application.Responses.InvoiceResponse01515570%
 
00
 
BlazorShop.Application.Responses.MusicResponse01919690%
 
00
 
BlazorShop.Application.Responses.OrderResponse01515570%
 
00
 
BlazorShop.Application.Responses.ReceiptResponse01313510%
 
00
 
BlazorShop.Application.Responses.RoleResponse099390%
 
00
 
BlazorShop.Application.Responses.SubscriberResponse033331110%
 
00
 
BlazorShop.Application.Responses.SubscriptionResponse02323810%
 
00
 
BlazorShop.Application.Responses.TodoItemResponse01919690%
 
00
 
BlazorShop.Application.Responses.TodoListResponse099390%
 
00
 
BlazorShop.Application.Responses.UserResponse02121710%
 
00
 
BlazorShop.Application.Validators.AccountValidator.ChangePasswordCommandValidator01616350%
 
00
 
BlazorShop.Application.Validators.AccountValidator.LoginCommandValidator02323490%
 
00
 
BlazorShop.Application.Validators.AccountValidator.RegisterCommandValidator03636650%
 
00
 
BlazorShop.Application.Validators.AccountValidator.ResetPasswordCommandValidator02828550%
 
00
 
BlazorShop.Application.Validators.CartValidator.CreateCartCommandValidator02323570%
 
00
 
BlazorShop.Application.Validators.CartValidator.DeleteAllCartsCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.CartValidator.DeleteCartCommandValidator077240%
 
00
 
BlazorShop.Application.Validators.CartValidator.GetCartByIdQueryValidator077240%
 
00
 
BlazorShop.Application.Validators.CartValidator.GetCartsCountQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.CartValidator.GetCartsQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.CartValidator.UpdateCartCommandValidator02525600%
 
00
 
BlazorShop.Application.Validators.ClotheValidator.CreateClotheCommandValidator03131660%
 
00
 
BlazorShop.Application.Validators.ClotheValidator.DeleteClotheCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.ClotheValidator.GetClotheByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.ClotheValidator.UpdateClotheCommandValidator03333690%
 
00
 
BlazorShop.Application.Validators.InvoiceValidator.CreateInvoiceCommandValidator02525590%
 
00
 
BlazorShop.Application.Validators.InvoiceValidator.DeleteInvoiceCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.InvoiceValidator.GetInvoiceByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.InvoiceValidator.UpdateInvoiceCommandValidator02727620%
 
00
 
BlazorShop.Application.Validators.MusicValidator.CreateMusicCommandValidator03939760%
 
00
 
BlazorShop.Application.Validators.MusicValidator.DeleteMusicCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.MusicValidator.GetMusicByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.MusicValidator.UpdateMusicCommandValidator03939760%
 
00
 
BlazorShop.Application.Validators.OrderValidator.CreateOrderCommandValidator01717360%
 
00
 
BlazorShop.Application.Validators.OrderValidator.DeleteOrderCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.OrderValidator.GetOrderByIdQueryValidator099260%
 
00
 
BlazorShop.Application.Validators.OrderValidator.GetOrdersQueryValidator077230%
 
00
 
BlazorShop.Application.Validators.OrderValidator.UpdateOrderCommandValidator01919390%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.CreateReceiptCommandValidator01919380%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.DeleteReceiptCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.GetReceiptByIdQueryValidator099260%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.GetReceiptsQueryValidator077230%
 
00
 
BlazorShop.Application.Validators.ReceiptValidator.UpdateReceiptCommandValidator02121410%
 
00
 
BlazorShop.Application.Validators.RoleValidator.CreateRoleCommandValidator077230%
 
00
 
BlazorShop.Application.Validators.RoleValidator.DeleteRoleCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.RoleValidator.GetRoleByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.RoleValidator.GetRoleByNormalizedNameQueryValidator077230%
 
00
 
BlazorShop.Application.Validators.RoleValidator.UpdateRoleCommandValidator099260%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.CreateSubscriberCommandValidator02020410%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.DeleteSubscriberCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.GetSubscriberByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.GetUserSubscribersQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.UpdateCreatedSubscriberCommandValidator02222420%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberCommandValidator02424460%
 
00
 
BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberStatusCommandValidator077230%
 
00
 
BlazorShop.Application.Validators.SubscriptionValidator.CreateSubscriptionCommandValidator03434700%
 
00
 
BlazorShop.Application.Validators.SubscriptionValidator.DeleteSubscriptionCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriptionValidator.GetSubscriptionByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.SubscriptionValidator.UpdateSubscriptionCommandValidator03434700%
 
00
 
BlazorShop.Application.Validators.TodoItemValidator.CreateTodoItemCommandValidator02929640%
 
00
 
BlazorShop.Application.Validators.TodoItemValidator.DeleteTodoItemCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.TodoItemValidator.GetTodoItemByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.TodoItemValidator.UpdateTodoItemCommandValidator03030650%
 
00
 
BlazorShop.Application.Validators.TodoListValidator.CreateTodoListCommandValidator01717480%
 
00
 
BlazorShop.Application.Validators.TodoListValidator.DeleteTodoListCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.TodoListValidator.GetTodoListByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.TodoListValidator.UpdateTodoListCommandValidator01717480%
 
00
 
BlazorShop.Application.Validators.UserValidator.ActivateUserCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.UserValidator.AssignUserToRoleCommandValidator077240%
 
00
 
BlazorShop.Application.Validators.UserValidator.CreateUserCommandValidator03131590%
 
00
 
BlazorShop.Application.Validators.UserValidator.DeleteUserCommandValidator055210%
 
00
 
BlazorShop.Application.Validators.UserValidator.GetUserByEmailQueryValidator01919440%
 
00
 
BlazorShop.Application.Validators.UserValidator.GetUserByIdQueryValidator055210%
 
00
 
BlazorShop.Application.Validators.UserValidator.UpdateUserCommandValidator01717360%
 
00
 
BlazorShop.Application.Validators.UserValidator.UpdateUserEmailCommandValidator02727540%
 
00
 
BlazorShop.Domain8667458610.8%
  
00
 
BlazorShop.Domain.Common.EntityBase10117100%
 
00
 
BlazorShop.Domain.Entities.Cart055370%
 
00
 
BlazorShop.Domain.Entities.Clothe70747100%
 
00
 
BlazorShop.Domain.Entities.Identity.Role022220%
 
00
 
BlazorShop.Domain.Entities.Identity.RoleClaim011170%
 
00
 
BlazorShop.Domain.Entities.Identity.User077470%
 
00
 
BlazorShop.Domain.Entities.Identity.UserClaim011170%
 
00
 
BlazorShop.Domain.Entities.Identity.UserLogin011170%
 
00
 
BlazorShop.Domain.Entities.Identity.UserRole022220%
 
00
 
BlazorShop.Domain.Entities.Identity.UserToken011170%
 
00
 
BlazorShop.Domain.Entities.Invoice055370%
 
00
 
BlazorShop.Domain.Entities.Music077470%
 
00
 
BlazorShop.Domain.Entities.Order055370%
 
00
 
BlazorShop.Domain.Entities.Receipt044320%
 
00
 
BlazorShop.Domain.Entities.Subscriber088520%
 
00
 
BlazorShop.Domain.Entities.Subscription099570%
 
00
 
BlazorShop.Domain.Entities.TodoItem066420%
 
00
 
BlazorShop.Domain.Entities.TodoList022220%
 
00
 
BlazorShop.Infrastructure3161081511131130262.8%
  
0700%
 
BlazorShop.Infrastructure.DependencyInjection03232590%
 
00
 
BlazorShop.Infrastructure.Migrations.ApplicationDbContextModelSnapshot07107107560%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_108818819790%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_1001147114712700%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_1106966967650%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_207107107980%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_306036036680%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_406096096740%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_506126126770%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_606416417100%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_706266266910%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_806436437100%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration_906766767450%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration1207587588300%
 
00
 
BlazorShop.Infrastructure.Migrations.Migration1307347348030%
 
00
 
BlazorShop.Infrastructure.Persistence.ApplicationDbContext4134410893.1%
  
00
 
BlazorShop.Infrastructure.Persistence.ApplicationDbContextSeed03173173850%
 
0200%
 
BlazorShop.Infrastructure.Persistence.Configurations.CartConfiguration1201231100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.ClotheConfiguration2302342100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleClaimConfiguration1201232100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleConfiguration90928100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserClaimConfiguration1201232100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserConfiguration2302343100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserLoginConfiguration60625100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserRoleConfiguration90928100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserTokenConfiguration60625100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.InvoiceConfiguration1601635100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.MusicConfiguration2302342100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.OrderConfiguration1801837100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.ReceiptConfiguration1501534100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.SubscriberConfiguration1901938100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.SubscriptionConfiguration2902948100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.TodoItemConfiguration90928100%
 
00
 
BlazorShop.Infrastructure.Persistence.Configurations.TodoListConfiguration70726100%
 
00
 
BlazorShop.Infrastructure.Services.AccountService91011101838.1%
  
0200%
 
BlazorShop.Infrastructure.Services.DateTimeService011170%
 
00
 
BlazorShop.Infrastructure.Services.EmailService056561010%
 
020%
 
BlazorShop.Infrastructure.Services.RoleService91241332196.7%
  
0120%
 
BlazorShop.Infrastructure.Services.UserService91241332256.7%
  
0160%
 
BlazorShop.Infrastructure.Utils.AdminSeedModel055370%
 
00
 
BlazorShop.Infrastructure.Utils.RolesSeedModel066420%
 
00
 
BlazorShop.WebApi6084590520956.6%
  
11740.5%
 
BlazorShop.WebApi.Controllers.AccountsController5354010912.5%
  
080%
 
BlazorShop.WebApi.Controllers.ApiBaseController50529100%
 
00
 
BlazorShop.WebApi.Controllers.CartsController9344312020.9%
  
1128.3%
  
BlazorShop.WebApi.Controllers.ClothesController33033969%
  
0100%
 
BlazorShop.WebApi.Controllers.HomeController414186322.2%
  
00
 
BlazorShop.WebApi.Controllers.InvoicesController33033919%
  
0100%
 
BlazorShop.WebApi.Controllers.MusicsController33033959%
  
0100%
 
BlazorShop.WebApi.Controllers.OrdersController33033979%
  
0100%
 
BlazorShop.WebApi.Controllers.PaymentsController41731773082.2%
  
080%
 
BlazorShop.WebApi.Controllers.ReceiptsController33033979%
  
0100%
 
BlazorShop.WebApi.Controllers.RolesController336391047.6%
  
0120%
 
BlazorShop.WebApi.Controllers.SubscribersController336391107.6%
  
0120%
 
BlazorShop.WebApi.Controllers.SubscriptionsController33033959%
  
0100%
 
BlazorShop.WebApi.Controllers.TodoItemsController324277811.1%
  
080%
 
BlazorShop.WebApi.Controllers.TodoListsController33033919%
  
0100%
 
BlazorShop.WebApi.Controllers.UsersController348511395.8%
  
0160%
 
BlazorShop.WebApi.Filters.ApiExceptionFilterAttribute059591160%
 
0180%
 
BlazorShop.WebApi.Filters.JwtTokenMiddleware03838850%
 
060%
 
Program01381381720%
 
040%
 
BlazorShop.WebClient1072716282379963.7%
  
05530%
 
BlazorShop.WebClient.Auth.AuthenticationService11698013613.7%
  
080%
 
BlazorShop.WebClient.Auth.AuthStateProvider727349020.5%
  
060%
 
BlazorShop.WebClient.Auth.JwtTokenParser03535780%
 
0100%
 
BlazorShop.WebClient.AuthPolicies.AdminRoleHandler01111330%
 
080%
 
BlazorShop.WebClient.AuthPolicies.AdminRoleRequirement055260%
 
00
 
BlazorShop.WebClient.AuthPolicies.CustomerRoleHandler01616380%
 
0140%
 
BlazorShop.WebClient.AuthPolicies.CustomerRoleRequirement088330%
 
00
 
BlazorShop.WebClient.AuthPolicies.DefaultRoleHandler01111330%
 
080%
 
BlazorShop.WebClient.AuthPolicies.DefaultRoleRequirement055260%
 
00
 
BlazorShop.WebClient.AuthPolicies.UserRoleHandler01111330%
 
080%
 
BlazorShop.WebClient.AuthPolicies.UserRoleRequirement055260%
 
00
 
BlazorShop.WebClient.Interceptor.HttpInterceptorService523288417.8%
  
070%
 
BlazorShop.WebClient.Interceptor.HttpResponseException01212490%
 
00
 
BlazorShop.WebClient.Pages.Account.Login027271080%
 
060%
 
BlazorShop.WebClient.Pages.Account.Logout044230%
 
00
 
BlazorShop.WebClient.Pages.Account.Register016161010%
 
040%
 
BlazorShop.WebClient.Pages.Account.ResetPassword01616840%
 
040%
 
BlazorShop.WebClient.Pages.Account.VerifyAuth03838750%
 
0140%
 
BlazorShop.WebClient.Pages.Admin.Clothes.AddEditClothe032321390%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Clothes.Clothes064641980%
 
080%
 
BlazorShop.WebClient.Pages.Admin.Musics.AddEditMusic032321410%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Musics.Musics047471650%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Roles.AddEditRole03232970%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Roles.Roles060601890%
 
080%
 
BlazorShop.WebClient.Pages.Admin.Subscribers.Subscribers042421450%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Subscriptions.AddEditSubscription032321380%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Subscriptions.Subscriptions047471650%
 
060%
 
BlazorShop.WebClient.Pages.Admin.Todos.TodoItems078782220%
 
0220%
 
BlazorShop.WebClient.Pages.Admin.Todos.TodoLists037371420%
 
0100%
 
BlazorShop.WebClient.Pages.Admin.Todos.TodoState031311120%
 
00
 
BlazorShop.WebClient.Pages.Admin.Users.AddEditUser038381250%
 
080%
 
BlazorShop.WebClient.Pages.Admin.Users.Users082822650%
 
0120%
 
BlazorShop.WebClient.Pages.Cart.Cart037371560%
 
080%
 
BlazorShop.WebClient.Pages.Clothes.ClotheDetails035352270%
 
060%
 
BlazorShop.WebClient.Pages.Clothes.Index056561920%
 
0100%
 
BlazorShop.WebClient.Pages.Internal.Not_found033280%
 
00
 
BlazorShop.WebClient.Pages.Internal.Server_error033280%
 
00
 
BlazorShop.WebClient.Pages.Internal.Unauthorized033280%
 
00
 
BlazorShop.WebClient.Pages.Musics.Index01181182900%
 
0280%
 
BlazorShop.WebClient.Pages.Musics.MusicDetails021211740%
 
040%
 
BlazorShop.WebClient.Pages.Orders.MyOrders051511540%
 
0100%
 
BlazorShop.WebClient.Pages.Orders.OrderSuccess01111880%
 
020%
 
BlazorShop.WebClient.Pages.Orders.OrderView044441410%
 
0100%
 
BlazorShop.WebClient.Pages.Receipts.Receipts045451420%
 
0100%
 
BlazorShop.WebClient.Pages.Subscriptions.MySubscriptions01281283500%
 
0260%
 
BlazorShop.WebClient.Pages.Subscriptions.SubscriptionSuccess01111880%
 
020%
 
BlazorShop.WebClient.Pages.Subscriptions.UpdateSubscriptionSuccess01111880%
 
020%
 
BlazorShop.WebClient.Pages.User.Profile060602720%
 
0320%
 
BlazorShop.WebClient.Services.AccountService637438613.9%
  
040%
 
BlazorShop.WebClient.Services.CartService61181242014.8%
  
0220%
 
BlazorShop.WebClient.Services.ClotheService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.MusicService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.OrderService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.ReceiptService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.RoleService689951586.3%
  
0180%
 
BlazorShop.WebClient.Services.SessionStorageService621277822.2%
  
020%
 
BlazorShop.WebClient.Services.StripeService616225727.2%
  
020%
 
BlazorShop.WebClient.Services.SubscriberService684901536.6%
  
0180%
 
BlazorShop.WebClient.Services.SubscriptionService671771357.7%
  
0140%
 
BlazorShop.WebClient.Services.TodoItemService660661199%
  
0120%
 
BlazorShop.WebClient.Services.TodoListService673791387.5%
  
0160%
 
BlazorShop.WebClient.Services.UserService61301362144.4%
  
0220%
 
BlazorShop.WebClient.Shared.AppState01414400%
 
00
 
BlazorShop.WebClient.Shared.MainLayout029291110%
 
080%
 
BlazorShop.WebClient.Shared.NavMenu0551290%
 
020%
 
Program05555720%
 
00
 
BlazorShop.WorkerService6505610510.7%
  
080%
 
BlazorShop.WorkerService.Worker629357717.1%
  
080%
 
Program02121280%
 
00
 
-
-
-
- - \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/main.js b/BlazorShop.UnitTests/codecoverage/main.js deleted file mode 100644 index c88edf85..00000000 --- a/BlazorShop.UnitTests/codecoverage/main.js +++ /dev/null @@ -1,682 +0,0 @@ -/* Chartist.js 0.11.4 - * Copyright © 2019 Gion Kunz - * Free to use under either the WTFPL license or the MIT license. - * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL - * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT - */ - -!function (a, b) { "function" == typeof define && define.amd ? define("Chartist", [], function () { return a.Chartist = b() }) : "object" == typeof module && module.exports ? module.exports = b() : a.Chartist = b() }(this, function () { - var a = { version: "0.11.4" }; return function (a, b) { "use strict"; var c = a.window, d = a.document; b.namespaces = { svg: "http://www.w3.org/2000/svg", xmlns: "http://www.w3.org/2000/xmlns/", xhtml: "http://www.w3.org/1999/xhtml", xlink: "http://www.w3.org/1999/xlink", ct: "http://gionkunz.github.com/chartist-js/ct" }, b.noop = function (a) { return a }, b.alphaNumerate = function (a) { return String.fromCharCode(97 + a % 26) }, b.extend = function (a) { var c, d, e; for (a = a || {}, c = 1; c < arguments.length; c++) { d = arguments[c]; for (var f in d) e = d[f], "object" != typeof e || null === e || e instanceof Array ? a[f] = e : a[f] = b.extend(a[f], e) } return a }, b.replaceAll = function (a, b, c) { return a.replace(new RegExp(b, "g"), c) }, b.ensureUnit = function (a, b) { return "number" == typeof a && (a += b), a }, b.quantity = function (a) { if ("string" == typeof a) { var b = /^(\d+)\s*(.*)$/g.exec(a); return { value: +b[1], unit: b[2] || void 0 } } return { value: a } }, b.querySelector = function (a) { return a instanceof Node ? a : d.querySelector(a) }, b.times = function (a) { return Array.apply(null, new Array(a)) }, b.sum = function (a, b) { return a + (b ? b : 0) }, b.mapMultiply = function (a) { return function (b) { return b * a } }, b.mapAdd = function (a) { return function (b) { return b + a } }, b.serialMap = function (a, c) { var d = [], e = Math.max.apply(null, a.map(function (a) { return a.length })); return b.times(e).forEach(function (b, e) { var f = a.map(function (a) { return a[e] }); d[e] = c.apply(null, f) }), d }, b.roundWithPrecision = function (a, c) { var d = Math.pow(10, c || b.precision); return Math.round(a * d) / d }, b.precision = 8, b.escapingMap = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, b.serialize = function (a) { return null === a || void 0 === a ? a : ("number" == typeof a ? a = "" + a : "object" == typeof a && (a = JSON.stringify({ data: a })), Object.keys(b.escapingMap).reduce(function (a, c) { return b.replaceAll(a, c, b.escapingMap[c]) }, a)) }, b.deserialize = function (a) { if ("string" != typeof a) return a; a = Object.keys(b.escapingMap).reduce(function (a, c) { return b.replaceAll(a, b.escapingMap[c], c) }, a); try { a = JSON.parse(a), a = void 0 !== a.data ? a.data : a } catch (c) { } return a }, b.createSvg = function (a, c, d, e) { var f; return c = c || "100%", d = d || "100%", Array.prototype.slice.call(a.querySelectorAll("svg")).filter(function (a) { return a.getAttributeNS(b.namespaces.xmlns, "ct") }).forEach(function (b) { a.removeChild(b) }), f = new b.Svg("svg").attr({ width: c, height: d }).addClass(e), f._node.style.width = c, f._node.style.height = d, a.appendChild(f._node), f }, b.normalizeData = function (a, c, d) { var e, f = { raw: a, normalized: {} }; return f.normalized.series = b.getDataArray({ series: a.series || [] }, c, d), e = f.normalized.series.every(function (a) { return a instanceof Array }) ? Math.max.apply(null, f.normalized.series.map(function (a) { return a.length })) : f.normalized.series.length, f.normalized.labels = (a.labels || []).slice(), Array.prototype.push.apply(f.normalized.labels, b.times(Math.max(0, e - f.normalized.labels.length)).map(function () { return "" })), c && b.reverseData(f.normalized), f }, b.safeHasProperty = function (a, b) { return null !== a && "object" == typeof a && a.hasOwnProperty(b) }, b.isDataHoleValue = function (a) { return null === a || void 0 === a || "number" == typeof a && isNaN(a) }, b.reverseData = function (a) { a.labels.reverse(), a.series.reverse(); for (var b = 0; b < a.series.length; b++)"object" == typeof a.series[b] && void 0 !== a.series[b].data ? a.series[b].data.reverse() : a.series[b] instanceof Array && a.series[b].reverse() }, b.getDataArray = function (a, c, d) { function e(a) { if (b.safeHasProperty(a, "value")) return e(a.value); if (b.safeHasProperty(a, "data")) return e(a.data); if (a instanceof Array) return a.map(e); if (!b.isDataHoleValue(a)) { if (d) { var c = {}; return "string" == typeof d ? c[d] = b.getNumberOrUndefined(a) : c.y = b.getNumberOrUndefined(a), c.x = a.hasOwnProperty("x") ? b.getNumberOrUndefined(a.x) : c.x, c.y = a.hasOwnProperty("y") ? b.getNumberOrUndefined(a.y) : c.y, c } return b.getNumberOrUndefined(a) } } return a.series.map(e) }, b.normalizePadding = function (a, b) { return b = b || 0, "number" == typeof a ? { top: a, right: a, bottom: a, left: a } : { top: "number" == typeof a.top ? a.top : b, right: "number" == typeof a.right ? a.right : b, bottom: "number" == typeof a.bottom ? a.bottom : b, left: "number" == typeof a.left ? a.left : b } }, b.getMetaData = function (a, b) { var c = a.data ? a.data[b] : a[b]; return c ? c.meta : void 0 }, b.orderOfMagnitude = function (a) { return Math.floor(Math.log(Math.abs(a)) / Math.LN10) }, b.projectLength = function (a, b, c) { return b / c.range * a }, b.getAvailableHeight = function (a, c) { return Math.max((b.quantity(c.height).value || a.height()) - (c.chartPadding.top + c.chartPadding.bottom) - c.axisX.offset, 0) }, b.getHighLow = function (a, c, d) { function e(a) { if (void 0 !== a) if (a instanceof Array) for (var b = 0; b < a.length; b++)e(a[b]); else { var c = d ? +a[d] : +a; g && c > f.high && (f.high = c), h && c < f.low && (f.low = c) } } c = b.extend({}, c, d ? c["axis" + d.toUpperCase()] : {}); var f = { high: void 0 === c.high ? -Number.MAX_VALUE : +c.high, low: void 0 === c.low ? Number.MAX_VALUE : +c.low }, g = void 0 === c.high, h = void 0 === c.low; return (g || h) && e(a), (c.referenceValue || 0 === c.referenceValue) && (f.high = Math.max(c.referenceValue, f.high), f.low = Math.min(c.referenceValue, f.low)), f.high <= f.low && (0 === f.low ? f.high = 1 : f.low < 0 ? f.high = 0 : f.high > 0 ? f.low = 0 : (f.high = 1, f.low = 0)), f }, b.isNumeric = function (a) { return null !== a && isFinite(a) }, b.isFalseyButZero = function (a) { return !a && 0 !== a }, b.getNumberOrUndefined = function (a) { return b.isNumeric(a) ? +a : void 0 }, b.isMultiValue = function (a) { return "object" == typeof a && ("x" in a || "y" in a) }, b.getMultiValue = function (a, c) { return b.isMultiValue(a) ? b.getNumberOrUndefined(a[c || "y"]) : b.getNumberOrUndefined(a) }, b.rho = function (a) { function b(a, c) { return a % c === 0 ? c : b(c, a % c) } function c(a) { return a * a + 1 } if (1 === a) return a; var d, e = 2, f = 2; if (a % 2 === 0) return 2; do e = c(e) % a, f = c(c(f)) % a, d = b(Math.abs(e - f), a); while (1 === d); return d }, b.getBounds = function (a, c, d, e) { function f(a, b) { return a === (a += b) && (a *= 1 + (b > 0 ? o : -o)), a } var g, h, i, j = 0, k = { high: c.high, low: c.low }; k.valueRange = k.high - k.low, k.oom = b.orderOfMagnitude(k.valueRange), k.step = Math.pow(10, k.oom), k.min = Math.floor(k.low / k.step) * k.step, k.max = Math.ceil(k.high / k.step) * k.step, k.range = k.max - k.min, k.numberOfSteps = Math.round(k.range / k.step); var l = b.projectLength(a, k.step, k), m = l < d, n = e ? b.rho(k.range) : 0; if (e && b.projectLength(a, 1, k) >= d) k.step = 1; else if (e && n < k.step && b.projectLength(a, n, k) >= d) k.step = n; else for (; ;) { if (m && b.projectLength(a, k.step, k) <= d) k.step *= 2; else { if (m || !(b.projectLength(a, k.step / 2, k) >= d)) break; if (k.step /= 2, e && k.step % 1 !== 0) { k.step *= 2; break } } if (j++ > 1e3) throw new Error("Exceeded maximum number of iterations while optimizing scale step!") } var o = 2.221e-16; for (k.step = Math.max(k.step, o), h = k.min, i = k.max; h + k.step <= k.low;)h = f(h, k.step); for (; i - k.step >= k.high;)i = f(i, -k.step); k.min = h, k.max = i, k.range = k.max - k.min; var p = []; for (g = k.min; g <= k.max; g = f(g, k.step)) { var q = b.roundWithPrecision(g); q !== p[p.length - 1] && p.push(q) } return k.values = p, k }, b.polarToCartesian = function (a, b, c, d) { var e = (d - 90) * Math.PI / 180; return { x: a + c * Math.cos(e), y: b + c * Math.sin(e) } }, b.createChartRect = function (a, c, d) { var e = !(!c.axisX && !c.axisY), f = e ? c.axisY.offset : 0, g = e ? c.axisX.offset : 0, h = a.width() || b.quantity(c.width).value || 0, i = a.height() || b.quantity(c.height).value || 0, j = b.normalizePadding(c.chartPadding, d); h = Math.max(h, f + j.left + j.right), i = Math.max(i, g + j.top + j.bottom); var k = { padding: j, width: function () { return this.x2 - this.x1 }, height: function () { return this.y1 - this.y2 } }; return e ? ("start" === c.axisX.position ? (k.y2 = j.top + g, k.y1 = Math.max(i - j.bottom, k.y2 + 1)) : (k.y2 = j.top, k.y1 = Math.max(i - j.bottom - g, k.y2 + 1)), "start" === c.axisY.position ? (k.x1 = j.left + f, k.x2 = Math.max(h - j.right, k.x1 + 1)) : (k.x1 = j.left, k.x2 = Math.max(h - j.right - f, k.x1 + 1))) : (k.x1 = j.left, k.x2 = Math.max(h - j.right, k.x1 + 1), k.y2 = j.top, k.y1 = Math.max(i - j.bottom, k.y2 + 1)), k }, b.createGrid = function (a, c, d, e, f, g, h, i) { var j = {}; j[d.units.pos + "1"] = a, j[d.units.pos + "2"] = a, j[d.counterUnits.pos + "1"] = e, j[d.counterUnits.pos + "2"] = e + f; var k = g.elem("line", j, h.join(" ")); i.emit("draw", b.extend({ type: "grid", axis: d, index: c, group: g, element: k }, j)) }, b.createGridBackground = function (a, b, c, d) { var e = a.elem("rect", { x: b.x1, y: b.y2, width: b.width(), height: b.height() }, c, !0); d.emit("draw", { type: "gridBackground", group: a, element: e }) }, b.createLabel = function (a, c, e, f, g, h, i, j, k, l, m) { var n, o = {}; if (o[g.units.pos] = a + i[g.units.pos], o[g.counterUnits.pos] = i[g.counterUnits.pos], o[g.units.len] = c, o[g.counterUnits.len] = Math.max(0, h - 10), l) { var p = d.createElement("span"); p.className = k.join(" "), p.setAttribute("xmlns", b.namespaces.xhtml), p.innerText = f[e], p.style[g.units.len] = Math.round(o[g.units.len]) + "px", p.style[g.counterUnits.len] = Math.round(o[g.counterUnits.len]) + "px", n = j.foreignObject(p, b.extend({ style: "overflow: visible;" }, o)) } else n = j.elem("text", o, k.join(" ")).text(f[e]); m.emit("draw", b.extend({ type: "label", axis: g, index: e, group: j, element: n, text: f[e] }, o)) }, b.getSeriesOption = function (a, b, c) { if (a.name && b.series && b.series[a.name]) { var d = b.series[a.name]; return d.hasOwnProperty(c) ? d[c] : b[c] } return b[c] }, b.optionsProvider = function (a, d, e) { function f(a) { var f = h; if (h = b.extend({}, j), d) for (i = 0; i < d.length; i++) { var g = c.matchMedia(d[i][0]); g.matches && (h = b.extend(h, d[i][1])) } e && a && e.emit("optionsChanged", { previousOptions: f, currentOptions: h }) } function g() { k.forEach(function (a) { a.removeListener(f) }) } var h, i, j = b.extend({}, a), k = []; if (!c.matchMedia) throw "window.matchMedia not found! Make sure you're using a polyfill."; if (d) for (i = 0; i < d.length; i++) { var l = c.matchMedia(d[i][0]); l.addListener(f), k.push(l) } return f(), { removeMediaQueryListeners: g, getCurrentOptions: function () { return b.extend({}, h) } } }, b.splitIntoSegments = function (a, c, d) { var e = { increasingX: !1, fillHoles: !1 }; d = b.extend({}, e, d); for (var f = [], g = !0, h = 0; h < a.length; h += 2)void 0 === b.getMultiValue(c[h / 2].value) ? d.fillHoles || (g = !0) : (d.increasingX && h >= 2 && a[h] <= a[h - 2] && (g = !0), g && (f.push({ pathCoordinates: [], valueData: [] }), g = !1), f[f.length - 1].pathCoordinates.push(a[h], a[h + 1]), f[f.length - 1].valueData.push(c[h / 2])); return f } }(this || global, a), function (a, b) { "use strict"; b.Interpolation = {}, b.Interpolation.none = function (a) { var c = { fillHoles: !1 }; return a = b.extend({}, c, a), function (c, d) { for (var e = new b.Svg.Path, f = !0, g = 0; g < c.length; g += 2) { var h = c[g], i = c[g + 1], j = d[g / 2]; void 0 !== b.getMultiValue(j.value) ? (f ? e.move(h, i, !1, j) : e.line(h, i, !1, j), f = !1) : a.fillHoles || (f = !0) } return e } }, b.Interpolation.simple = function (a) { var c = { divisor: 2, fillHoles: !1 }; a = b.extend({}, c, a); var d = 1 / Math.max(1, a.divisor); return function (c, e) { for (var f, g, h, i = new b.Svg.Path, j = 0; j < c.length; j += 2) { var k = c[j], l = c[j + 1], m = (k - f) * d, n = e[j / 2]; void 0 !== n.value ? (void 0 === h ? i.move(k, l, !1, n) : i.curve(f + m, g, k - m, l, k, l, !1, n), f = k, g = l, h = n) : a.fillHoles || (f = k = h = void 0) } return i } }, b.Interpolation.cardinal = function (a) { var c = { tension: 1, fillHoles: !1 }; a = b.extend({}, c, a); var d = Math.min(1, Math.max(0, a.tension)), e = 1 - d; return function f(c, g) { var h = b.splitIntoSegments(c, g, { fillHoles: a.fillHoles }); if (h.length) { if (h.length > 1) { var i = []; return h.forEach(function (a) { i.push(f(a.pathCoordinates, a.valueData)) }), b.Svg.Path.join(i) } if (c = h[0].pathCoordinates, g = h[0].valueData, c.length <= 4) return b.Interpolation.none()(c, g); for (var j, k = (new b.Svg.Path).move(c[0], c[1], !1, g[0]), l = 0, m = c.length; m - 2 * !j > l; l += 2) { var n = [{ x: +c[l - 2], y: +c[l - 1] }, { x: +c[l], y: +c[l + 1] }, { x: +c[l + 2], y: +c[l + 3] }, { x: +c[l + 4], y: +c[l + 5] }]; j ? l ? m - 4 === l ? n[3] = { x: +c[0], y: +c[1] } : m - 2 === l && (n[2] = { x: +c[0], y: +c[1] }, n[3] = { x: +c[2], y: +c[3] }) : n[0] = { x: +c[m - 2], y: +c[m - 1] } : m - 4 === l ? n[3] = n[2] : l || (n[0] = { x: +c[l], y: +c[l + 1] }), k.curve(d * (-n[0].x + 6 * n[1].x + n[2].x) / 6 + e * n[2].x, d * (-n[0].y + 6 * n[1].y + n[2].y) / 6 + e * n[2].y, d * (n[1].x + 6 * n[2].x - n[3].x) / 6 + e * n[2].x, d * (n[1].y + 6 * n[2].y - n[3].y) / 6 + e * n[2].y, n[2].x, n[2].y, !1, g[(l + 2) / 2]) } return k } return b.Interpolation.none()([]) } }, b.Interpolation.monotoneCubic = function (a) { var c = { fillHoles: !1 }; return a = b.extend({}, c, a), function d(c, e) { var f = b.splitIntoSegments(c, e, { fillHoles: a.fillHoles, increasingX: !0 }); if (f.length) { if (f.length > 1) { var g = []; return f.forEach(function (a) { g.push(d(a.pathCoordinates, a.valueData)) }), b.Svg.Path.join(g) } if (c = f[0].pathCoordinates, e = f[0].valueData, c.length <= 4) return b.Interpolation.none()(c, e); var h, i, j = [], k = [], l = c.length / 2, m = [], n = [], o = [], p = []; for (h = 0; h < l; h++)j[h] = c[2 * h], k[h] = c[2 * h + 1]; for (h = 0; h < l - 1; h++)o[h] = k[h + 1] - k[h], p[h] = j[h + 1] - j[h], n[h] = o[h] / p[h]; for (m[0] = n[0], m[l - 1] = n[l - 2], h = 1; h < l - 1; h++)0 === n[h] || 0 === n[h - 1] || n[h - 1] > 0 != n[h] > 0 ? m[h] = 0 : (m[h] = 3 * (p[h - 1] + p[h]) / ((2 * p[h] + p[h - 1]) / n[h - 1] + (p[h] + 2 * p[h - 1]) / n[h]), isFinite(m[h]) || (m[h] = 0)); for (i = (new b.Svg.Path).move(j[0], k[0], !1, e[0]), h = 0; h < l - 1; h++)i.curve(j[h] + p[h] / 3, k[h] + m[h] * p[h] / 3, j[h + 1] - p[h] / 3, k[h + 1] - m[h + 1] * p[h] / 3, j[h + 1], k[h + 1], !1, e[h + 1]); return i } return b.Interpolation.none()([]) } }, b.Interpolation.step = function (a) { var c = { postpone: !0, fillHoles: !1 }; return a = b.extend({}, c, a), function (c, d) { for (var e, f, g, h = new b.Svg.Path, i = 0; i < c.length; i += 2) { var j = c[i], k = c[i + 1], l = d[i / 2]; void 0 !== l.value ? (void 0 === g ? h.move(j, k, !1, l) : (a.postpone ? h.line(j, f, !1, g) : h.line(e, k, !1, l), h.line(j, k, !1, l)), e = j, f = k, g = l) : a.fillHoles || (e = f = g = void 0) } return h } } }(this || global, a), function (a, b) { "use strict"; b.EventEmitter = function () { function a(a, b) { d[a] = d[a] || [], d[a].push(b) } function b(a, b) { d[a] && (b ? (d[a].splice(d[a].indexOf(b), 1), 0 === d[a].length && delete d[a]) : delete d[a]) } function c(a, b) { d[a] && d[a].forEach(function (a) { a(b) }), d["*"] && d["*"].forEach(function (c) { c(a, b) }) } var d = []; return { addEventHandler: a, removeEventHandler: b, emit: c } } }(this || global, a), function (a, b) { "use strict"; function c(a) { var b = []; if (a.length) for (var c = 0; c < a.length; c++)b.push(a[c]); return b } function d(a, c) { var d = c || this.prototype || b.Class, e = Object.create(d); b.Class.cloneDefinitions(e, a); var f = function () { var a, c = e.constructor || function () { }; return a = this === b ? Object.create(e) : this, c.apply(a, Array.prototype.slice.call(arguments, 0)), a }; return f.prototype = e, f["super"] = d, f.extend = this.extend, f } function e() { var a = c(arguments), b = a[0]; return a.splice(1, a.length - 1).forEach(function (a) { Object.getOwnPropertyNames(a).forEach(function (c) { delete b[c], Object.defineProperty(b, c, Object.getOwnPropertyDescriptor(a, c)) }) }), b } b.Class = { extend: d, cloneDefinitions: e } }(this || global, a), function (a, b) { "use strict"; function c(a, c, d) { return a && (this.data = a || {}, this.data.labels = this.data.labels || [], this.data.series = this.data.series || [], this.eventEmitter.emit("data", { type: "update", data: this.data })), c && (this.options = b.extend({}, d ? this.options : this.defaultOptions, c), this.initializeTimeoutId || (this.optionsProvider.removeMediaQueryListeners(), this.optionsProvider = b.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter))), this.initializeTimeoutId || this.createChart(this.optionsProvider.getCurrentOptions()), this } function d() { return this.initializeTimeoutId ? i.clearTimeout(this.initializeTimeoutId) : (i.removeEventListener("resize", this.resizeListener), this.optionsProvider.removeMediaQueryListeners()), this } function e(a, b) { return this.eventEmitter.addEventHandler(a, b), this } function f(a, b) { return this.eventEmitter.removeEventHandler(a, b), this } function g() { i.addEventListener("resize", this.resizeListener), this.optionsProvider = b.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter), this.eventEmitter.addEventHandler("optionsChanged", function () { this.update() }.bind(this)), this.options.plugins && this.options.plugins.forEach(function (a) { a instanceof Array ? a[0](this, a[1]) : a(this) }.bind(this)), this.eventEmitter.emit("data", { type: "initial", data: this.data }), this.createChart(this.optionsProvider.getCurrentOptions()), this.initializeTimeoutId = void 0 } function h(a, c, d, e, f) { this.container = b.querySelector(a), this.data = c || {}, this.data.labels = this.data.labels || [], this.data.series = this.data.series || [], this.defaultOptions = d, this.options = e, this.responsiveOptions = f, this.eventEmitter = b.EventEmitter(), this.supportsForeignObject = b.Svg.isSupported("Extensibility"), this.supportsAnimations = b.Svg.isSupported("AnimationEventsAttribute"), this.resizeListener = function () { this.update() }.bind(this), this.container && (this.container.__chartist__ && this.container.__chartist__.detach(), this.container.__chartist__ = this), this.initializeTimeoutId = setTimeout(g.bind(this), 0) } var i = a.window; b.Base = b.Class.extend({ constructor: h, optionsProvider: void 0, container: void 0, svg: void 0, eventEmitter: void 0, createChart: function () { throw new Error("Base chart type can't be instantiated!") }, update: c, detach: d, on: e, off: f, version: b.version, supportsForeignObject: !1 }) }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e, f) { a instanceof Element ? this._node = a : (this._node = y.createElementNS(b.namespaces.svg, a), "svg" === a && this.attr({ "xmlns:ct": b.namespaces.ct })), c && this.attr(c), d && this.addClass(d), e && (f && e._node.firstChild ? e._node.insertBefore(this._node, e._node.firstChild) : e._node.appendChild(this._node)) } function d(a, c) { return "string" == typeof a ? c ? this._node.getAttributeNS(c, a) : this._node.getAttribute(a) : (Object.keys(a).forEach(function (c) { if (void 0 !== a[c]) if (c.indexOf(":") !== -1) { var d = c.split(":"); this._node.setAttributeNS(b.namespaces[d[0]], c, a[c]) } else this._node.setAttribute(c, a[c]) }.bind(this)), this) } function e(a, c, d, e) { return new b.Svg(a, c, d, this, e) } function f() { return this._node.parentNode instanceof SVGElement ? new b.Svg(this._node.parentNode) : null } function g() { for (var a = this._node; "svg" !== a.nodeName;)a = a.parentNode; return new b.Svg(a) } function h(a) { var c = this._node.querySelector(a); return c ? new b.Svg(c) : null } function i(a) { var c = this._node.querySelectorAll(a); return c.length ? new b.Svg.List(c) : null } function j() { return this._node } function k(a, c, d, e) { if ("string" == typeof a) { var f = y.createElement("div"); f.innerHTML = a, a = f.firstChild } a.setAttribute("xmlns", b.namespaces.xmlns); var g = this.elem("foreignObject", c, d, e); return g._node.appendChild(a), g } function l(a) { return this._node.appendChild(y.createTextNode(a)), this } function m() { for (; this._node.firstChild;)this._node.removeChild(this._node.firstChild); return this } function n() { return this._node.parentNode.removeChild(this._node), this.parent() } function o(a) { return this._node.parentNode.replaceChild(a._node, this._node), a } function p(a, b) { return b && this._node.firstChild ? this._node.insertBefore(a._node, this._node.firstChild) : this._node.appendChild(a._node), this } function q() { return this._node.getAttribute("class") ? this._node.getAttribute("class").trim().split(/\s+/) : [] } function r(a) { return this._node.setAttribute("class", this.classes(this._node).concat(a.trim().split(/\s+/)).filter(function (a, b, c) { return c.indexOf(a) === b }).join(" ")), this } function s(a) { var b = a.trim().split(/\s+/); return this._node.setAttribute("class", this.classes(this._node).filter(function (a) { return b.indexOf(a) === -1 }).join(" ")), this } function t() { return this._node.setAttribute("class", ""), this } function u() { return this._node.getBoundingClientRect().height } function v() { return this._node.getBoundingClientRect().width } function w(a, c, d) { return void 0 === c && (c = !0), Object.keys(a).forEach(function (e) { function f(a, c) { var f, g, h, i = {}; a.easing && (h = a.easing instanceof Array ? a.easing : b.Svg.Easing[a.easing], delete a.easing), a.begin = b.ensureUnit(a.begin, "ms"), a.dur = b.ensureUnit(a.dur, "ms"), h && (a.calcMode = "spline", a.keySplines = h.join(" "), a.keyTimes = "0;1"), c && (a.fill = "freeze", i[e] = a.from, this.attr(i), g = b.quantity(a.begin || 0).value, a.begin = "indefinite"), f = this.elem("animate", b.extend({ attributeName: e }, a)), c && setTimeout(function () { try { f._node.beginElement() } catch (b) { i[e] = a.to, this.attr(i), f.remove() } }.bind(this), g), d && f._node.addEventListener("beginEvent", function () { d.emit("animationBegin", { element: this, animate: f._node, params: a }) }.bind(this)), f._node.addEventListener("endEvent", function () { d && d.emit("animationEnd", { element: this, animate: f._node, params: a }), c && (i[e] = a.to, this.attr(i), f.remove()) }.bind(this)) } a[e] instanceof Array ? a[e].forEach(function (a) { f.bind(this)(a, !1) }.bind(this)) : f.bind(this)(a[e], c) }.bind(this)), this } function x(a) { var c = this; this.svgElements = []; for (var d = 0; d < a.length; d++)this.svgElements.push(new b.Svg(a[d])); Object.keys(b.Svg.prototype).filter(function (a) { return ["constructor", "parent", "querySelector", "querySelectorAll", "replace", "append", "classes", "height", "width"].indexOf(a) === -1 }).forEach(function (a) { c[a] = function () { var d = Array.prototype.slice.call(arguments, 0); return c.svgElements.forEach(function (c) { b.Svg.prototype[a].apply(c, d) }), c } }) } var y = a.document; b.Svg = b.Class.extend({ constructor: c, attr: d, elem: e, parent: f, root: g, querySelector: h, querySelectorAll: i, getNode: j, foreignObject: k, text: l, empty: m, remove: n, replace: o, append: p, classes: q, addClass: r, removeClass: s, removeAllClasses: t, height: u, width: v, animate: w }), b.Svg.isSupported = function (a) { return y.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#" + a, "1.1") }; var z = { easeInSine: [.47, 0, .745, .715], easeOutSine: [.39, .575, .565, 1], easeInOutSine: [.445, .05, .55, .95], easeInQuad: [.55, .085, .68, .53], easeOutQuad: [.25, .46, .45, .94], easeInOutQuad: [.455, .03, .515, .955], easeInCubic: [.55, .055, .675, .19], easeOutCubic: [.215, .61, .355, 1], easeInOutCubic: [.645, .045, .355, 1], easeInQuart: [.895, .03, .685, .22], easeOutQuart: [.165, .84, .44, 1], easeInOutQuart: [.77, 0, .175, 1], easeInQuint: [.755, .05, .855, .06], easeOutQuint: [.23, 1, .32, 1], easeInOutQuint: [.86, 0, .07, 1], easeInExpo: [.95, .05, .795, .035], easeOutExpo: [.19, 1, .22, 1], easeInOutExpo: [1, 0, 0, 1], easeInCirc: [.6, .04, .98, .335], easeOutCirc: [.075, .82, .165, 1], easeInOutCirc: [.785, .135, .15, .86], easeInBack: [.6, -.28, .735, .045], easeOutBack: [.175, .885, .32, 1.275], easeInOutBack: [.68, -.55, .265, 1.55] }; b.Svg.Easing = z, b.Svg.List = b.Class.extend({ constructor: x }) }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e, f, g) { var h = b.extend({ command: f ? a.toLowerCase() : a.toUpperCase() }, c, g ? { data: g } : {}); d.splice(e, 0, h) } function d(a, b) { a.forEach(function (c, d) { t[c.command.toLowerCase()].forEach(function (e, f) { b(c, e, d, f, a) }) }) } function e(a, c) { this.pathElements = [], this.pos = 0, this.close = a, this.options = b.extend({}, u, c) } function f(a) { return void 0 !== a ? (this.pos = Math.max(0, Math.min(this.pathElements.length, a)), this) : this.pos } function g(a) { return this.pathElements.splice(this.pos, a), this } function h(a, b, d, e) { return c("M", { x: +a, y: +b }, this.pathElements, this.pos++, d, e), this } function i(a, b, d, e) { return c("L", { x: +a, y: +b }, this.pathElements, this.pos++, d, e), this } function j(a, b, d, e, f, g, h, i) { return c("C", { x1: +a, y1: +b, x2: +d, y2: +e, x: +f, y: +g }, this.pathElements, this.pos++, h, i), this } function k(a, b, d, e, f, g, h, i, j) { return c("A", { rx: +a, ry: +b, xAr: +d, lAf: +e, sf: +f, x: +g, y: +h }, this.pathElements, this.pos++, i, j), this } function l(a) { var c = a.replace(/([A-Za-z])([0-9])/g, "$1 $2").replace(/([0-9])([A-Za-z])/g, "$1 $2").split(/[\s,]+/).reduce(function (a, b) { return b.match(/[A-Za-z]/) && a.push([]), a[a.length - 1].push(b), a }, []); "Z" === c[c.length - 1][0].toUpperCase() && c.pop(); var d = c.map(function (a) { var c = a.shift(), d = t[c.toLowerCase()]; return b.extend({ command: c }, d.reduce(function (b, c, d) { return b[c] = +a[d], b }, {})) }), e = [this.pos, 0]; return Array.prototype.push.apply(e, d), Array.prototype.splice.apply(this.pathElements, e), this.pos += d.length, this } function m() { var a = Math.pow(10, this.options.accuracy); return this.pathElements.reduce(function (b, c) { var d = t[c.command.toLowerCase()].map(function (b) { return this.options.accuracy ? Math.round(c[b] * a) / a : c[b] }.bind(this)); return b + c.command + d.join(",") }.bind(this), "") + (this.close ? "Z" : "") } function n(a, b) { return d(this.pathElements, function (c, d) { c[d] *= "x" === d[0] ? a : b }), this } function o(a, b) { return d(this.pathElements, function (c, d) { c[d] += "x" === d[0] ? a : b }), this } function p(a) { return d(this.pathElements, function (b, c, d, e, f) { var g = a(b, c, d, e, f); (g || 0 === g) && (b[c] = g) }), this } function q(a) { var c = new b.Svg.Path(a || this.close); return c.pos = this.pos, c.pathElements = this.pathElements.slice().map(function (a) { return b.extend({}, a) }), c.options = b.extend({}, this.options), c } function r(a) { var c = [new b.Svg.Path]; return this.pathElements.forEach(function (d) { d.command === a.toUpperCase() && 0 !== c[c.length - 1].pathElements.length && c.push(new b.Svg.Path), c[c.length - 1].pathElements.push(d) }), c } function s(a, c, d) { for (var e = new b.Svg.Path(c, d), f = 0; f < a.length; f++)for (var g = a[f], h = 0; h < g.pathElements.length; h++)e.pathElements.push(g.pathElements[h]); return e } var t = { m: ["x", "y"], l: ["x", "y"], c: ["x1", "y1", "x2", "y2", "x", "y"], a: ["rx", "ry", "xAr", "lAf", "sf", "x", "y"] }, u = { accuracy: 3 }; b.Svg.Path = b.Class.extend({ constructor: e, position: f, remove: g, move: h, line: i, curve: j, arc: k, scale: n, translate: o, transform: p, parse: l, stringify: m, clone: q, splitByCommand: r }), b.Svg.Path.elementDescriptions = t, b.Svg.Path.join = s }(this || global, a), function (a, b) { "use strict"; function c(a, b, c, d) { this.units = a, this.counterUnits = a === e.x ? e.y : e.x, this.chartRect = b, this.axisLength = b[a.rectEnd] - b[a.rectStart], this.gridOffset = b[a.rectOffset], this.ticks = c, this.options = d } function d(a, c, d, e, f) { var g = e["axis" + this.units.pos.toUpperCase()], h = this.ticks.map(this.projectValue.bind(this)), i = this.ticks.map(g.labelInterpolationFnc); h.forEach(function (j, k) { var l, m = { x: 0, y: 0 }; l = h[k + 1] ? h[k + 1] - j : Math.max(this.axisLength - j, 30), b.isFalseyButZero(i[k]) && "" !== i[k] || ("x" === this.units.pos ? (j = this.chartRect.x1 + j, m.x = e.axisX.labelOffset.x, "start" === e.axisX.position ? m.y = this.chartRect.padding.top + e.axisX.labelOffset.y + (d ? 5 : 20) : m.y = this.chartRect.y1 + e.axisX.labelOffset.y + (d ? 5 : 20)) : (j = this.chartRect.y1 - j, m.y = e.axisY.labelOffset.y - (d ? l : 0), "start" === e.axisY.position ? m.x = d ? this.chartRect.padding.left + e.axisY.labelOffset.x : this.chartRect.x1 - 10 : m.x = this.chartRect.x2 + e.axisY.labelOffset.x + 10), g.showGrid && b.createGrid(j, k, this, this.gridOffset, this.chartRect[this.counterUnits.len](), a, [e.classNames.grid, e.classNames[this.units.dir]], f), g.showLabel && b.createLabel(j, l, k, i, this, g.offset, m, c, [e.classNames.label, e.classNames[this.units.dir], "start" === g.position ? e.classNames[g.position] : e.classNames.end], d, f)) }.bind(this)) } var e = (a.window, a.document, { x: { pos: "x", len: "width", dir: "horizontal", rectStart: "x1", rectEnd: "x2", rectOffset: "y2" }, y: { pos: "y", len: "height", dir: "vertical", rectStart: "y2", rectEnd: "y1", rectOffset: "x1" } }); b.Axis = b.Class.extend({ constructor: c, createGridAndLabels: d, projectValue: function (a, b, c) { throw new Error("Base axis can't be instantiated!") } }), b.Axis.units = e }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e) { var f = e.highLow || b.getHighLow(c, e, a.pos); this.bounds = b.getBounds(d[a.rectEnd] - d[a.rectStart], f, e.scaleMinSpace || 20, e.onlyInteger), this.range = { min: this.bounds.min, max: this.bounds.max }, b.AutoScaleAxis["super"].constructor.call(this, a, d, this.bounds.values, e) } function d(a) { return this.axisLength * (+b.getMultiValue(a, this.units.pos) - this.bounds.min) / this.bounds.range } a.window, a.document; b.AutoScaleAxis = b.Axis.extend({ constructor: c, projectValue: d }) }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e) { var f = e.highLow || b.getHighLow(c, e, a.pos); this.divisor = e.divisor || 1, this.ticks = e.ticks || b.times(this.divisor).map(function (a, b) { return f.low + (f.high - f.low) / this.divisor * b }.bind(this)), this.ticks.sort(function (a, b) { return a - b }), this.range = { min: f.low, max: f.high }, b.FixedScaleAxis["super"].constructor.call(this, a, d, this.ticks, e), this.stepLength = this.axisLength / this.divisor } function d(a) { return this.axisLength * (+b.getMultiValue(a, this.units.pos) - this.range.min) / (this.range.max - this.range.min) } a.window, a.document; b.FixedScaleAxis = b.Axis.extend({ constructor: c, projectValue: d }) }(this || global, a), function (a, b) { "use strict"; function c(a, c, d, e) { b.StepAxis["super"].constructor.call(this, a, d, e.ticks, e); var f = Math.max(1, e.ticks.length - (e.stretch ? 1 : 0)); this.stepLength = this.axisLength / f } function d(a, b) { return this.stepLength * b } a.window, a.document; b.StepAxis = b.Axis.extend({ constructor: c, projectValue: d }) }(this || global, a), function (a, b) { "use strict"; function c(a) { var c = b.normalizeData(this.data, a.reverseData, !0); this.svg = b.createSvg(this.container, a.width, a.height, a.classNames.chart); var d, f, g = this.svg.elem("g").addClass(a.classNames.gridGroup), h = this.svg.elem("g"), i = this.svg.elem("g").addClass(a.classNames.labelGroup), j = b.createChartRect(this.svg, a, e.padding); d = void 0 === a.axisX.type ? new b.StepAxis(b.Axis.units.x, c.normalized.series, j, b.extend({}, a.axisX, { ticks: c.normalized.labels, stretch: a.fullWidth })) : a.axisX.type.call(b, b.Axis.units.x, c.normalized.series, j, a.axisX), f = void 0 === a.axisY.type ? new b.AutoScaleAxis(b.Axis.units.y, c.normalized.series, j, b.extend({}, a.axisY, { high: b.isNumeric(a.high) ? a.high : a.axisY.high, low: b.isNumeric(a.low) ? a.low : a.axisY.low })) : a.axisY.type.call(b, b.Axis.units.y, c.normalized.series, j, a.axisY), d.createGridAndLabels(g, i, this.supportsForeignObject, a, this.eventEmitter), f.createGridAndLabels(g, i, this.supportsForeignObject, a, this.eventEmitter), a.showGridBackground && b.createGridBackground(g, j, a.classNames.gridBackground, this.eventEmitter), c.raw.series.forEach(function (e, g) { var i = h.elem("g"); i.attr({ "ct:series-name": e.name, "ct:meta": b.serialize(e.meta) }), i.addClass([a.classNames.series, e.className || a.classNames.series + "-" + b.alphaNumerate(g)].join(" ")); var k = [], l = []; c.normalized.series[g].forEach(function (a, h) { var i = { x: j.x1 + d.projectValue(a, h, c.normalized.series[g]), y: j.y1 - f.projectValue(a, h, c.normalized.series[g]) }; k.push(i.x, i.y), l.push({ value: a, valueIndex: h, meta: b.getMetaData(e, h) }) }.bind(this)); var m = { lineSmooth: b.getSeriesOption(e, a, "lineSmooth"), showPoint: b.getSeriesOption(e, a, "showPoint"), showLine: b.getSeriesOption(e, a, "showLine"), showArea: b.getSeriesOption(e, a, "showArea"), areaBase: b.getSeriesOption(e, a, "areaBase") }, n = "function" == typeof m.lineSmooth ? m.lineSmooth : m.lineSmooth ? b.Interpolation.monotoneCubic() : b.Interpolation.none(), o = n(k, l); if (m.showPoint && o.pathElements.forEach(function (c) { var h = i.elem("line", { x1: c.x, y1: c.y, x2: c.x + .01, y2: c.y }, a.classNames.point).attr({ "ct:value": [c.data.value.x, c.data.value.y].filter(b.isNumeric).join(","), "ct:meta": b.serialize(c.data.meta) }); this.eventEmitter.emit("draw", { type: "point", value: c.data.value, index: c.data.valueIndex, meta: c.data.meta, series: e, seriesIndex: g, axisX: d, axisY: f, group: i, element: h, x: c.x, y: c.y }) }.bind(this)), m.showLine) { var p = i.elem("path", { d: o.stringify() }, a.classNames.line, !0); this.eventEmitter.emit("draw", { type: "line", values: c.normalized.series[g], path: o.clone(), chartRect: j, index: g, series: e, seriesIndex: g, seriesMeta: e.meta, axisX: d, axisY: f, group: i, element: p }) } if (m.showArea && f.range) { var q = Math.max(Math.min(m.areaBase, f.range.max), f.range.min), r = j.y1 - f.projectValue(q); o.splitByCommand("M").filter(function (a) { return a.pathElements.length > 1 }).map(function (a) { var b = a.pathElements[0], c = a.pathElements[a.pathElements.length - 1]; return a.clone(!0).position(0).remove(1).move(b.x, r).line(b.x, b.y).position(a.pathElements.length + 1).line(c.x, r) }).forEach(function (b) { var h = i.elem("path", { d: b.stringify() }, a.classNames.area, !0); this.eventEmitter.emit("draw", { type: "area", values: c.normalized.series[g], path: b.clone(), series: e, seriesIndex: g, axisX: d, axisY: f, chartRect: j, index: g, group: i, element: h }) }.bind(this)) } }.bind(this)), this.eventEmitter.emit("created", { bounds: f.bounds, chartRect: j, axisX: d, axisY: f, svg: this.svg, options: a }) } function d(a, c, d, f) { b.Line["super"].constructor.call(this, a, c, e, b.extend({}, e, d), f) } var e = (a.window, a.document, { axisX: { offset: 30, position: "end", labelOffset: { x: 0, y: 0 }, showLabel: !0, showGrid: !0, labelInterpolationFnc: b.noop, type: void 0 }, axisY: { offset: 40, position: "start", labelOffset: { x: 0, y: 0 }, showLabel: !0, showGrid: !0, labelInterpolationFnc: b.noop, type: void 0, scaleMinSpace: 20, onlyInteger: !1 }, width: void 0, height: void 0, showLine: !0, showPoint: !0, showArea: !1, areaBase: 0, lineSmooth: !0, showGridBackground: !1, low: void 0, high: void 0, chartPadding: { top: 15, right: 15, bottom: 5, left: 10 }, fullWidth: !1, reverseData: !1, classNames: { chart: "ct-chart-line", label: "ct-label", labelGroup: "ct-labels", series: "ct-series", line: "ct-line", point: "ct-point", area: "ct-area", grid: "ct-grid", gridGroup: "ct-grids", gridBackground: "ct-grid-background", vertical: "ct-vertical", horizontal: "ct-horizontal", start: "ct-start", end: "ct-end" } }); b.Line = b.Base.extend({ constructor: d, createChart: c }) }(this || global, a), function (a, b) { - "use strict"; function c(a) { - var c, d; a.distributeSeries ? (c = b.normalizeData(this.data, a.reverseData, a.horizontalBars ? "x" : "y"), c.normalized.series = c.normalized.series.map(function (a) { return [a] })) : c = b.normalizeData(this.data, a.reverseData, a.horizontalBars ? "x" : "y"), this.svg = b.createSvg(this.container, a.width, a.height, a.classNames.chart + (a.horizontalBars ? " " + a.classNames.horizontalBars : "")); var f = this.svg.elem("g").addClass(a.classNames.gridGroup), g = this.svg.elem("g"), h = this.svg.elem("g").addClass(a.classNames.labelGroup); - if (a.stackBars && 0 !== c.normalized.series.length) { var i = b.serialMap(c.normalized.series, function () { return Array.prototype.slice.call(arguments).map(function (a) { return a }).reduce(function (a, b) { return { x: a.x + (b && b.x) || 0, y: a.y + (b && b.y) || 0 } }, { x: 0, y: 0 }) }); d = b.getHighLow([i], a, a.horizontalBars ? "x" : "y") } else d = b.getHighLow(c.normalized.series, a, a.horizontalBars ? "x" : "y"); d.high = +a.high || (0 === a.high ? 0 : d.high), d.low = +a.low || (0 === a.low ? 0 : d.low); var j, k, l, m, n, o = b.createChartRect(this.svg, a, e.padding); k = a.distributeSeries && a.stackBars ? c.normalized.labels.slice(0, 1) : c.normalized.labels, a.horizontalBars ? (j = m = void 0 === a.axisX.type ? new b.AutoScaleAxis(b.Axis.units.x, c.normalized.series, o, b.extend({}, a.axisX, { highLow: d, referenceValue: 0 })) : a.axisX.type.call(b, b.Axis.units.x, c.normalized.series, o, b.extend({}, a.axisX, { highLow: d, referenceValue: 0 })), l = n = void 0 === a.axisY.type ? new b.StepAxis(b.Axis.units.y, c.normalized.series, o, { ticks: k }) : a.axisY.type.call(b, b.Axis.units.y, c.normalized.series, o, a.axisY)) : (l = m = void 0 === a.axisX.type ? new b.StepAxis(b.Axis.units.x, c.normalized.series, o, { ticks: k }) : a.axisX.type.call(b, b.Axis.units.x, c.normalized.series, o, a.axisX), j = n = void 0 === a.axisY.type ? new b.AutoScaleAxis(b.Axis.units.y, c.normalized.series, o, b.extend({}, a.axisY, { highLow: d, referenceValue: 0 })) : a.axisY.type.call(b, b.Axis.units.y, c.normalized.series, o, b.extend({}, a.axisY, { highLow: d, referenceValue: 0 }))); var p = a.horizontalBars ? o.x1 + j.projectValue(0) : o.y1 - j.projectValue(0), q = []; l.createGridAndLabels(f, h, this.supportsForeignObject, a, this.eventEmitter), j.createGridAndLabels(f, h, this.supportsForeignObject, a, this.eventEmitter), a.showGridBackground && b.createGridBackground(f, o, a.classNames.gridBackground, this.eventEmitter), c.raw.series.forEach(function (d, e) { var f, h, i = e - (c.raw.series.length - 1) / 2; f = a.distributeSeries && !a.stackBars ? l.axisLength / c.normalized.series.length / 2 : a.distributeSeries && a.stackBars ? l.axisLength / 2 : l.axisLength / c.normalized.series[e].length / 2, h = g.elem("g"), h.attr({ "ct:series-name": d.name, "ct:meta": b.serialize(d.meta) }), h.addClass([a.classNames.series, d.className || a.classNames.series + "-" + b.alphaNumerate(e)].join(" ")), c.normalized.series[e].forEach(function (g, k) { var r, s, t, u; if (u = a.distributeSeries && !a.stackBars ? e : a.distributeSeries && a.stackBars ? 0 : k, r = a.horizontalBars ? { x: o.x1 + j.projectValue(g && g.x ? g.x : 0, k, c.normalized.series[e]), y: o.y1 - l.projectValue(g && g.y ? g.y : 0, u, c.normalized.series[e]) } : { x: o.x1 + l.projectValue(g && g.x ? g.x : 0, u, c.normalized.series[e]), y: o.y1 - j.projectValue(g && g.y ? g.y : 0, k, c.normalized.series[e]) }, l instanceof b.StepAxis && (l.options.stretch || (r[l.units.pos] += f * (a.horizontalBars ? -1 : 1)), r[l.units.pos] += a.stackBars || a.distributeSeries ? 0 : i * a.seriesBarDistance * (a.horizontalBars ? -1 : 1)), t = q[k] || p, q[k] = t - (p - r[l.counterUnits.pos]), void 0 !== g) { var v = {}; v[l.units.pos + "1"] = r[l.units.pos], v[l.units.pos + "2"] = r[l.units.pos], !a.stackBars || "accumulate" !== a.stackMode && a.stackMode ? (v[l.counterUnits.pos + "1"] = p, v[l.counterUnits.pos + "2"] = r[l.counterUnits.pos]) : (v[l.counterUnits.pos + "1"] = t, v[l.counterUnits.pos + "2"] = q[k]), v.x1 = Math.min(Math.max(v.x1, o.x1), o.x2), v.x2 = Math.min(Math.max(v.x2, o.x1), o.x2), v.y1 = Math.min(Math.max(v.y1, o.y2), o.y1), v.y2 = Math.min(Math.max(v.y2, o.y2), o.y1); var w = b.getMetaData(d, k); s = h.elem("line", v, a.classNames.bar).attr({ "ct:value": [g.x, g.y].filter(b.isNumeric).join(","), "ct:meta": b.serialize(w) }), this.eventEmitter.emit("draw", b.extend({ type: "bar", value: g, index: k, meta: w, series: d, seriesIndex: e, axisX: m, axisY: n, chartRect: o, group: h, element: s }, v)) } }.bind(this)) }.bind(this)), this.eventEmitter.emit("created", { bounds: j.bounds, chartRect: o, axisX: m, axisY: n, svg: this.svg, options: a }) - } function d(a, c, d, f) { b.Bar["super"].constructor.call(this, a, c, e, b.extend({}, e, d), f) } var e = (a.window, a.document, { axisX: { offset: 30, position: "end", labelOffset: { x: 0, y: 0 }, showLabel: !0, showGrid: !0, labelInterpolationFnc: b.noop, scaleMinSpace: 30, onlyInteger: !1 }, axisY: { offset: 40, position: "start", labelOffset: { x: 0, y: 0 }, showLabel: !0, showGrid: !0, labelInterpolationFnc: b.noop, scaleMinSpace: 20, onlyInteger: !1 }, width: void 0, height: void 0, high: void 0, low: void 0, referenceValue: 0, chartPadding: { top: 15, right: 15, bottom: 5, left: 10 }, seriesBarDistance: 15, stackBars: !1, stackMode: "accumulate", horizontalBars: !1, distributeSeries: !1, reverseData: !1, showGridBackground: !1, classNames: { chart: "ct-chart-bar", horizontalBars: "ct-horizontal-bars", label: "ct-label", labelGroup: "ct-labels", series: "ct-series", bar: "ct-bar", grid: "ct-grid", gridGroup: "ct-grids", gridBackground: "ct-grid-background", vertical: "ct-vertical", horizontal: "ct-horizontal", start: "ct-start", end: "ct-end" } }); b.Bar = b.Base.extend({ constructor: d, createChart: c }) - }(this || global, a), function (a, b) { "use strict"; function c(a, b, c) { var d = b.x > a.x; return d && "explode" === c || !d && "implode" === c ? "start" : d && "implode" === c || !d && "explode" === c ? "end" : "middle" } function d(a) { var d, e, g, h, i, j = b.normalizeData(this.data), k = [], l = a.startAngle; this.svg = b.createSvg(this.container, a.width, a.height, a.donut ? a.classNames.chartDonut : a.classNames.chartPie), e = b.createChartRect(this.svg, a, f.padding), g = Math.min(e.width() / 2, e.height() / 2), i = a.total || j.normalized.series.reduce(function (a, b) { return a + b }, 0); var m = b.quantity(a.donutWidth); "%" === m.unit && (m.value *= g / 100), g -= a.donut && !a.donutSolid ? m.value / 2 : 0, h = "outside" === a.labelPosition || a.donut && !a.donutSolid ? g : "center" === a.labelPosition ? 0 : a.donutSolid ? g - m.value / 2 : g / 2, h += a.labelOffset; var n = { x: e.x1 + e.width() / 2, y: e.y2 + e.height() / 2 }, o = 1 === j.raw.series.filter(function (a) { return a.hasOwnProperty("value") ? 0 !== a.value : 0 !== a }).length; j.raw.series.forEach(function (a, b) { k[b] = this.svg.elem("g", null, null) }.bind(this)), a.showLabel && (d = this.svg.elem("g", null, null)), j.raw.series.forEach(function (e, f) { if (0 !== j.normalized.series[f] || !a.ignoreEmptyValues) { k[f].attr({ "ct:series-name": e.name }), k[f].addClass([a.classNames.series, e.className || a.classNames.series + "-" + b.alphaNumerate(f)].join(" ")); var p = i > 0 ? l + j.normalized.series[f] / i * 360 : 0, q = Math.max(0, l - (0 === f || o ? 0 : .2)); p - q >= 359.99 && (p = q + 359.99); var r, s, t, u = b.polarToCartesian(n.x, n.y, g, q), v = b.polarToCartesian(n.x, n.y, g, p), w = new b.Svg.Path(!a.donut || a.donutSolid).move(v.x, v.y).arc(g, g, 0, p - l > 180, 0, u.x, u.y); a.donut ? a.donutSolid && (t = g - m.value, r = b.polarToCartesian(n.x, n.y, t, l - (0 === f || o ? 0 : .2)), s = b.polarToCartesian(n.x, n.y, t, p), w.line(r.x, r.y), w.arc(t, t, 0, p - l > 180, 1, s.x, s.y)) : w.line(n.x, n.y); var x = a.classNames.slicePie; a.donut && (x = a.classNames.sliceDonut, a.donutSolid && (x = a.classNames.sliceDonutSolid)); var y = k[f].elem("path", { d: w.stringify() }, x); if (y.attr({ "ct:value": j.normalized.series[f], "ct:meta": b.serialize(e.meta) }), a.donut && !a.donutSolid && (y._node.style.strokeWidth = m.value + "px"), this.eventEmitter.emit("draw", { type: "slice", value: j.normalized.series[f], totalDataSum: i, index: f, meta: e.meta, series: e, group: k[f], element: y, path: w.clone(), center: n, radius: g, startAngle: l, endAngle: p }), a.showLabel) { var z; z = 1 === j.raw.series.length ? { x: n.x, y: n.y } : b.polarToCartesian(n.x, n.y, h, l + (p - l) / 2); var A; A = j.normalized.labels && !b.isFalseyButZero(j.normalized.labels[f]) ? j.normalized.labels[f] : j.normalized.series[f]; var B = a.labelInterpolationFnc(A, f); if (B || 0 === B) { var C = d.elem("text", { dx: z.x, dy: z.y, "text-anchor": c(n, z, a.labelDirection) }, a.classNames.label).text("" + B); this.eventEmitter.emit("draw", { type: "label", index: f, group: d, element: C, text: "" + B, x: z.x, y: z.y }) } } l = p } }.bind(this)), this.eventEmitter.emit("created", { chartRect: e, svg: this.svg, options: a }) } function e(a, c, d, e) { b.Pie["super"].constructor.call(this, a, c, f, b.extend({}, f, d), e) } var f = (a.window, a.document, { width: void 0, height: void 0, chartPadding: 5, classNames: { chartPie: "ct-chart-pie", chartDonut: "ct-chart-donut", series: "ct-series", slicePie: "ct-slice-pie", sliceDonut: "ct-slice-donut", sliceDonutSolid: "ct-slice-donut-solid", label: "ct-label" }, startAngle: 0, total: void 0, donut: !1, donutSolid: !1, donutWidth: 60, showLabel: !0, labelOffset: 0, labelPosition: "inside", labelInterpolationFnc: b.noop, labelDirection: "neutral", reverseData: !1, ignoreEmptyValues: !1 }); b.Pie = b.Base.extend({ constructor: e, createChart: d, determineAnchorPosition: c }) }(this || global, a), a -}); -//# sourceMappingURL=chartist.min.js.map - -var i, l, selectedLine = null; - -/* Navigate to hash without browser history entry */ -var navigateToHash = function () { - if (window.history !== undefined && window.history.replaceState !== undefined) { - window.history.replaceState(undefined, undefined, this.getAttribute("href")); - } -}; - -var hashLinks = document.getElementsByClassName('navigatetohash'); -for (i = 0, l = hashLinks.length; i < l; i++) { - hashLinks[i].addEventListener('click', navigateToHash); -} - -/* Switch test method */ -var switchTestMethod = function () { - var method = this.getAttribute("value"); - console.log("Selected test method: " + method); - - var lines, i, l, coverageData, lineAnalysis, cells; - - lines = document.querySelectorAll('.lineAnalysis tr'); - - for (i = 1, l = lines.length; i < l; i++) { - coverageData = JSON.parse(lines[i].getAttribute('data-coverage').replace(/'/g, '"')); - lineAnalysis = coverageData[method]; - cells = lines[i].querySelectorAll('td'); - if (lineAnalysis === undefined) { - lineAnalysis = coverageData.AllTestMethods; - if (lineAnalysis.LVS !== 'gray') { - cells[0].setAttribute('class', 'red'); - cells[1].innerText = cells[1].textContent = '0'; - cells[4].setAttribute('class', 'lightred'); - } - } else { - cells[0].setAttribute('class', lineAnalysis.LVS); - cells[1].innerText = cells[1].textContent = lineAnalysis.VC; - cells[4].setAttribute('class', 'light' + lineAnalysis.LVS); - } - } -}; - -var testMethods = document.getElementsByClassName('switchtestmethod'); -for (i = 0, l = testMethods.length; i < l; i++) { - testMethods[i].addEventListener('change', switchTestMethod); -} - -/* Highlight test method by line */ -var toggleLine = function () { - if (selectedLine === this) { - selectedLine = null; - } else { - selectedLine = null; - unhighlightTestMethods(); - highlightTestMethods.call(this); - selectedLine = this; - } - -}; -var highlightTestMethods = function () { - if (selectedLine !== null) { - return; - } - - var lineAnalysis; - var coverageData = JSON.parse(this.getAttribute('data-coverage').replace(/'/g, '"')); - var testMethods = document.getElementsByClassName('testmethod'); - - for (i = 0, l = testMethods.length; i < l; i++) { - lineAnalysis = coverageData[testMethods[i].id]; - if (lineAnalysis === undefined) { - testMethods[i].className = testMethods[i].className.replace(/\s*light.+/g, ""); - } else { - testMethods[i].className += ' light' + lineAnalysis.LVS; - } - } -}; -var unhighlightTestMethods = function () { - if (selectedLine !== null) { - return; - } - - var testMethods = document.getElementsByClassName('testmethod'); - for (i = 0, l = testMethods.length; i < l; i++) { - testMethods[i].className = testMethods[i].className.replace(/\s*light.+/g, ""); - } -}; -var coverableLines = document.getElementsByClassName('coverableline'); -for (i = 0, l = coverableLines.length; i < l; i++) { - coverableLines[i].addEventListener('click', toggleLine); - coverableLines[i].addEventListener('mouseenter', highlightTestMethods); - coverableLines[i].addEventListener('mouseleave', unhighlightTestMethods); -} - -/* History charts */ -var renderChart = function (chart) { - // Remove current children (e.g. PNG placeholder) - while (chart.firstChild) { - chart.firstChild.remove(); - } - - var chartData = window[chart.getAttribute('data-data')]; - var options = { - axisY: { - type: undefined, - onlyInteger: true - }, - lineSmooth: false, - low: 0, - high: 100, - scaleMinSpace: 20, - onlyInteger: true, - fullWidth: true - }; - var lineChart = new Chartist.Line(chart, { - labels: [], - series: chartData.series - }, options); - - /* Zoom */ - var zoomButtonDiv = document.createElement("div"); - zoomButtonDiv.className = "toggleZoom"; - var zoomButtonLink = document.createElement("a"); - zoomButtonLink.setAttribute("href", ""); - var zoomButtonText = document.createElement("i"); - zoomButtonText.className = "icon-search-plus"; - - zoomButtonLink.appendChild(zoomButtonText); - zoomButtonDiv.appendChild(zoomButtonLink); - - chart.appendChild(zoomButtonDiv); - - zoomButtonDiv.addEventListener('click', function (event) { - event.preventDefault(); - - if (options.axisY.type === undefined) { - options.axisY.type = Chartist.AutoScaleAxis; - zoomButtonText.className = "icon-search-minus"; - } else { - options.axisY.type = undefined; - zoomButtonText.className = "icon-search-plus"; - } - - lineChart.update(null, options); - }); - - var tooltip = document.createElement("div"); - tooltip.className = "tooltip"; - - chart.appendChild(tooltip); - - /* Tooltips */ - var showToolTip = function () { - var index = this.getAttribute('ct:meta'); - - tooltip.innerHTML = chartData.tooltips[index]; - tooltip.style.display = 'block'; - }; - - var moveToolTip = function (event) { - var box = chart.getBoundingClientRect(); - var left = event.pageX - box.left - window.pageXOffset; - var top = event.pageY - box.top - window.pageYOffset; - - left = left + 20; - top = top - tooltip.offsetHeight / 2; - - if (left + tooltip.offsetWidth > box.width) { - left -= tooltip.offsetWidth + 40; - } - - if (top < 0) { - top = 0; - } - - if (top + tooltip.offsetHeight > box.height) { - top = box.height - tooltip.offsetHeight; - } - - tooltip.style.left = left + 'px'; - tooltip.style.top = top + 'px'; - }; - - var hideToolTip = function () { - tooltip.style.display = 'none'; - }; - chart.addEventListener('mousemove', moveToolTip); - - lineChart.on('created', function () { - var chartPoints = chart.getElementsByClassName('ct-point'); - for (i = 0, l = chartPoints.length; i < l; i++) { - chartPoints[i].addEventListener('mousemove', showToolTip); - chartPoints[i].addEventListener('mouseout', hideToolTip); - } - }); -}; - -var charts = document.getElementsByClassName('historychart'); -for (i = 0, l = charts.length; i < l; i++) { - renderChart(charts[i]); -} - -var assemblies = [ - { - "name": "BlazorShop.Application", - "classes": [ - { "name": "BlazorShop.Application.Commands.AccountCommand.ChangePasswordCommand", "rp": "BlazorShop.Application_ChangePasswordCommand.html", "cl": 4, "ucl": 0, "cal": 4, "tl": 32, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.AccountCommand.LoginCommand", "rp": "BlazorShop.Application_LoginCommand.html", "cl": 2, "ucl": 0, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.AccountCommand.RegisterCommand", "rp": "BlazorShop.Application_RegisterCommand.html", "cl": 2, "ucl": 4, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.AccountCommand.ResetPasswordCommand", "rp": "BlazorShop.Application_ResetPasswordCommand.html", "cl": 3, "ucl": 0, "cal": 3, "tl": 27, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.CartCommand.CreateCartCommand", "rp": "BlazorShop.Application_CreateCartCommand.html", "cl": 5, "ucl": 0, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.CartCommand.DeleteAllCartsCommand", "rp": "BlazorShop.Application_DeleteAllCartsCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.CartCommand.DeleteCartCommand", "rp": "BlazorShop.Application_DeleteCartCommand.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.CartCommand.UpdateCartCommand", "rp": "BlazorShop.Application_UpdateCartCommand.html", "cl": 0, "ucl": 6, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.ClotheCommand.CreateClotheCommand", "rp": "BlazorShop.Application_CreateClotheCommand.html", "cl": 7, "ucl": 0, "cal": 7, "tl": 47, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.ClotheCommand.DeleteClotheCommand", "rp": "BlazorShop.Application_DeleteClotheCommand.html", "cl": 1, "ucl": 0, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.ClotheCommand.UpdateClotheCommand", "rp": "BlazorShop.Application_UpdateClotheCommand.html", "cl": 7, "ucl": 0, "cal": 7, "tl": 47, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.InvoiceCommand.CreateInvoiceCommand", "rp": "BlazorShop.Application_CreateInvoiceCommand.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.InvoiceCommand.DeleteInvoiceCommand", "rp": "BlazorShop.Application_DeleteInvoiceCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.InvoiceCommand.UpdateInvoiceCommand", "rp": "BlazorShop.Application_UpdateInvoiceCommand.html", "cl": 0, "ucl": 6, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.MusicCommand.CreateMusicCommand", "rp": "BlazorShop.Application_CreateMusicCommand.html", "cl": 0, "ucl": 8, "cal": 8, "tl": 52, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.MusicCommand.DeleteMusicCommand", "rp": "BlazorShop.Application_DeleteMusicCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.MusicCommand.UpdateMusicCommand", "rp": "BlazorShop.Application_UpdateMusicCommand.html", "cl": 0, "ucl": 8, "cal": 8, "tl": 52, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.OrderCommand.CreateOrderCommand", "rp": "BlazorShop.Application_CreateOrderCommand.html", "cl": 0, "ucl": 4, "cal": 4, "tl": 32, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.OrderCommand.DeleteOrderCommand", "rp": "BlazorShop.Application_DeleteOrderCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.OrderCommand.UpdateOrderCommand", "rp": "BlazorShop.Application_UpdateOrderCommand.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.ReceiptCommand.CreateReceiptCommand", "rp": "BlazorShop.Application_CreateReceiptCommand.html", "cl": 0, "ucl": 4, "cal": 4, "tl": 32, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.ReceiptCommand.DeleteReceiptCommand", "rp": "BlazorShop.Application_DeleteReceiptCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.ReceiptCommand.UpdateReceiptCommand", "rp": "BlazorShop.Application_UpdateReceiptCommand.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.RoleCommand.CreateRoleCommand", "rp": "BlazorShop.Application_CreateRoleCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.RoleCommand.DeleteRoleCommand", "rp": "BlazorShop.Application_DeleteRoleCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.RoleCommand.UpdateRoleCommand", "rp": "BlazorShop.Application_UpdateRoleCommand.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.SubscriberCommand.CreateSubscriberCommand", "rp": "BlazorShop.Application_CreateSubscriberCommand.html", "cl": 0, "ucl": 6, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.SubscriberCommand.DeleteSubscriberCommand", "rp": "BlazorShop.Application_DeleteSubscriberCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.SubscriberCommand.UpdateCreatedSubscriberCommand", "rp": "BlazorShop.Application_UpdateCreatedSubscriberCommand.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberCommand", "rp": "BlazorShop.Application_UpdateSubscriberCommand.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 47, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.SubscriberCommand.UpdateSubscriberStatusCommand", "rp": "BlazorShop.Application_UpdateSubscriberStatusCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.SubscriptionCommand.CreateSubscriptionCommand", "rp": "BlazorShop.Application_CreateSubscriptionCommand.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 47, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.SubscriptionCommand.DeleteSubscriptionCommand", "rp": "BlazorShop.Application_DeleteSubscriptionCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.SubscriptionCommand.UpdateSubscriptionCommand", "rp": "BlazorShop.Application_UpdateSubscriptionCommand.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 47, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.TodoItemCommand.CreateTodoItemCommand", "rp": "BlazorShop.Application_CreateTodoItemCommand.html", "cl": 0, "ucl": 6, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.TodoItemCommand.DeleteTodoItemCommand", "rp": "BlazorShop.Application_DeleteTodoItemCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.TodoItemCommand.UpdateTodoItemCommand", "rp": "BlazorShop.Application_UpdateTodoItemCommand.html", "cl": 0, "ucl": 6, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.TodoListCommand.CreateTodoListCommand", "rp": "BlazorShop.Application_CreateTodoListCommand.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.TodoListCommand.DeleteTodoListCommand", "rp": "BlazorShop.Application_DeleteTodoListCommand.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.TodoListCommand.UpdateTodoListCommand", "rp": "BlazorShop.Application_UpdateTodoListCommand.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.UserCommand.ActivateUserCommand", "rp": "BlazorShop.Application_ActivateUserCommand.html", "cl": 1, "ucl": 0, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.UserCommand.AssignUserToRoleCommand", "rp": "BlazorShop.Application_AssignUserToRoleCommand.html", "cl": 2, "ucl": 0, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.UserCommand.CreateUserCommand", "rp": "BlazorShop.Application_CreateUserCommand.html", "cl": 2, "ucl": 2, "cal": 4, "tl": 32, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.UserCommand.DeleteUserCommand", "rp": "BlazorShop.Application_DeleteUserCommand.html", "cl": 1, "ucl": 0, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.UserCommand.UpdateUserCommand", "rp": "BlazorShop.Application_UpdateUserCommand.html", "cl": 1, "ucl": 3, "cal": 4, "tl": 32, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Commands.UserCommand.UpdateUserEmailCommand", "rp": "BlazorShop.Application_UpdateUserEmailCommand.html", "cl": 1, "ucl": 2, "cal": 3, "tl": 27, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Behaviours.UnhandledExceptionBehaviour", "rp": "BlazorShop.Application_UnhandledExceptionBehaviour_2.html", "cl": 0, "ucl": 14, "cal": 14, "tl": 50, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Behaviours.ValidationBehaviour", "rp": "BlazorShop.Application_ValidationBehaviour_2.html", "cl": 0, "ucl": 17, "cal": 17, "tl": 57, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Exceptions.ValidationException", "rp": "BlazorShop.Application_ValidationException.html", "cl": 0, "ucl": 10, "cal": 10, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Mappings.IMapFrom", "rp": "BlazorShop.Application_IMapFrom_1.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 19, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Mappings.MappingExtensions", "rp": "BlazorShop.Application_MappingExtensions.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Mappings.MappingProfile", "rp": "BlazorShop.Application_MappingProfile.html", "cl": 0, "ucl": 15, "cal": 15, "tl": 37, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Models.EmailSettings", "rp": "BlazorShop.Application_EmailSettings.html", "cl": 6, "ucl": 0, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Models.JwtTokenConfig", "rp": "BlazorShop.Application_JwtTokenConfig.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Models.JwtTokenResponse", "rp": "BlazorShop.Application_JwtTokenResponse.html", "cl": 7, "ucl": 2, "cal": 9, "tl": 55, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Models.RequestResponse", "rp": "BlazorShop.Application_RequestResponse.html", "cl": 9, "ucl": 0, "cal": 9, "tl": 48, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Common.Models.Result", "rp": "BlazorShop.Application_Result_1.html", "cl": 4, "ucl": 0, "cal": 4, "tl": 34, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.DependencyInjection", "rp": "BlazorShop.Application_DependencyInjection.html", "cl": 0, "ucl": 8, "cal": 8, "tl": 29, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.AccountHandler.ChangePasswordCommandHandler", "rp": "BlazorShop.Application_ChangePasswordCommandHandler.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 57, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.AccountHandler.LoginCommandHandler", "rp": "BlazorShop.Application_LoginCommandHandler.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 57, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.AccountHandler.RegisterCommandHandler", "rp": "BlazorShop.Application_RegisterCommandHandler.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 57, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.AccountHandler.ResetPasswordCommandHandler", "rp": "BlazorShop.Application_ResetPasswordCommandHandler.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 57, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.CartHandler.CreateCartCommandHandler", "rp": "BlazorShop.Application_CreateCartCommandHandler.html", "cl": 0, "ucl": 37, "cal": 37, "tl": 84, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.CartHandler.DeleteAllCartsCommandHandler", "rp": "BlazorShop.Application_DeleteAllCartsCommandHandler.html", "cl": 0, "ucl": 23, "cal": 23, "tl": 62, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.CartHandler.DeleteCartCommandHandler", "rp": "BlazorShop.Application_DeleteCartCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 67, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.CartHandler.UpdateCartCommandHandler", "rp": "BlazorShop.Application_UpdateCartCommandHandler.html", "cl": 0, "ucl": 29, "cal": 29, "tl": 71, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.ClotheHandler.CreateClotheCommandHandler", "rp": "BlazorShop.Application_CreateClotheCommandHandler.html", "cl": 30, "ucl": 0, "cal": 30, "tl": 70, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.ClotheHandler.DeleteClotheCommandHandler", "rp": "BlazorShop.Application_DeleteClotheCommandHandler.html", "cl": 25, "ucl": 2, "cal": 27, "tl": 69, "cb": 3, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.ClotheHandler.UpdateClotheCommandHandler", "rp": "BlazorShop.Application_UpdateClotheCommandHandler.html", "cl": 30, "ucl": 2, "cal": 32, "tl": 74, "cb": 3, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.InvoiceHandler.CreateInvoiceCommandHandler", "rp": "BlazorShop.Application_CreateInvoiceCommandHandler.html", "cl": 0, "ucl": 28, "cal": 28, "tl": 68, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.InvoiceHandler.DeleteInvoiceCommandHandler", "rp": "BlazorShop.Application_DeleteInvoiceCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 67, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.InvoiceHandler.UpdateInvoiceCommandHandler", "rp": "BlazorShop.Application_UpdateInvoiceCommandHandler.html", "cl": 0, "ucl": 31, "cal": 31, "tl": 73, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.MusicHandler.CreateMusicCommandHandler", "rp": "BlazorShop.Application_CreateMusicCommandHandler.html", "cl": 0, "ucl": 36, "cal": 36, "tl": 78, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.MusicHandler.DeleteMusicCommandHandler", "rp": "BlazorShop.Application_DeleteMusicCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 67, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.MusicHandler.UpdateMusicCommandHandler", "rp": "BlazorShop.Application_UpdateMusicCommandHandler.html", "cl": 0, "ucl": 33, "cal": 33, "tl": 75, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.OrderHandler.CreateOrderCommandHandler", "rp": "BlazorShop.Application_CreateOrderCommandHandler.html", "cl": 0, "ucl": 28, "cal": 28, "tl": 68, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.OrderHandler.DeleteOrderCommandHandler", "rp": "BlazorShop.Application_DeleteOrderCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 67, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.OrderHandler.UpdateOrderCommandHandler", "rp": "BlazorShop.Application_UpdateOrderCommandHandler.html", "cl": 0, "ucl": 30, "cal": 30, "tl": 72, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.ReceiptHandler.CreateReceiptCommandHandler", "rp": "BlazorShop.Application_CreateReceiptCommandHandler.html", "cl": 0, "ucl": 27, "cal": 27, "tl": 67, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.ReceiptHandler.DeleteReceiptCommandHandler", "rp": "BlazorShop.Application_DeleteReceiptCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 67, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.ReceiptHandler.UpdateReceiptCommandHandler", "rp": "BlazorShop.Application_UpdateReceiptCommandHandler.html", "cl": 0, "ucl": 29, "cal": 29, "tl": 71, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.RoleHandler.CreateRoleCommandHandler", "rp": "BlazorShop.Application_CreateRoleCommandHandler.html", "cl": 0, "ucl": 18, "cal": 18, "tl": 57, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.RoleHandler.DeleteRoleCommandHandler", "rp": "BlazorShop.Application_DeleteRoleCommandHandler.html", "cl": 0, "ucl": 18, "cal": 18, "tl": 57, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.RoleHandler.UpdateRoleCommandHandler", "rp": "BlazorShop.Application_UpdateRoleCommandHandler.html", "cl": 0, "ucl": 18, "cal": 18, "tl": 57, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.SubscriberHandler.CreateSubscriberCommandHandler", "rp": "BlazorShop.Application_CreateSubscriberCommandHandler.html", "cl": 0, "ucl": 43, "cal": 43, "tl": 91, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.SubscriberHandler.DeleteSubscriberCommandHandler", "rp": "BlazorShop.Application_DeleteSubscriberCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 67, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateCreatedSubscriberCommandHandler", "rp": "BlazorShop.Application_UpdateCreatedSubscriberCommandHandler.html", "cl": 0, "ucl": 37, "cal": 37, "tl": 86, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberCommandHandler", "rp": "BlazorShop.Application_UpdateSubscriberCommandHandler.html", "cl": 0, "ucl": 35, "cal": 35, "tl": 79, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.SubscriberHandler.UpdateSubscriberStatusCommandHandler", "rp": "BlazorShop.Application_UpdateSubscriberStatusCommandHandler.html", "cl": 0, "ucl": 27, "cal": 27, "tl": 69, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.SubscriptionHandler.CreateSubscriptionCommandHandler", "rp": "BlazorShop.Application_CreateSubscriptionCommandHandler.html", "cl": 0, "ucl": 38, "cal": 38, "tl": 80, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.SubscriptionHandler.DeleteSubscriptionCommandHandler", "rp": "BlazorShop.Application_DeleteSubscriptionCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 67, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.SubscriptionHandler.UpdateSubscriptionCommandHandler", "rp": "BlazorShop.Application_UpdateSubscriptionCommandHandler.html", "cl": 0, "ucl": 32, "cal": 32, "tl": 74, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.TodoItemHandler.CreateTodoItemCommandHandler", "rp": "BlazorShop.Application_CreateTodoItemCommandHandler.html", "cl": 0, "ucl": 44, "cal": 44, "tl": 91, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.TodoItemHandler.DeleteTodoItemCommandHandler", "rp": "BlazorShop.Application_DeleteTodoItemCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 68, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.TodoItemHandler.UpdateTodoItemCommandHandler", "rp": "BlazorShop.Application_UpdateTodoItemCommandHandler.html", "cl": 0, "ucl": 31, "cal": 31, "tl": 74, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.TodoListHandler.CreateTodoListCommandHandler", "rp": "BlazorShop.Application_CreateTodoListCommandHandler.html", "cl": 0, "ucl": 33, "cal": 33, "tl": 78, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.TodoListHandler.DeleteTodoListCommandHandler", "rp": "BlazorShop.Application_DeleteTodoListCommandHandler.html", "cl": 0, "ucl": 26, "cal": 26, "tl": 68, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.TodoListHandler.UpdateTodoListCommandHandler", "rp": "BlazorShop.Application_UpdateTodoListCommandHandler.html", "cl": 0, "ucl": 27, "cal": 27, "tl": 70, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.UserHandler.ActivateUserCommandHandler", "rp": "BlazorShop.Application_ActivateUserCommandHandler.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 57, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.UserHandler.AssignUserToRoleCommandHandler", "rp": "BlazorShop.Application_AssignUserToRoleCommandHandler.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 57, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.UserHandler.CreateUserCommandHandler", "rp": "BlazorShop.Application_CreateUserCommandHandler.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 57, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.UserHandler.DeleteUserCommandHandler", "rp": "BlazorShop.Application_DeleteUserCommandHandler.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 57, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserCommandHandler", "rp": "BlazorShop.Application_UpdateUserCommandHandler.html", "cl": 19, "ucl": 0, "cal": 19, "tl": 58, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Commands.UserHandler.UpdateUserEmailCommandHandler", "rp": "BlazorShop.Application_UpdateUserEmailCommandHandler.html", "cl": 19, "ucl": 0, "cal": 19, "tl": 58, "cb": 2, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.CartHandler.GetCartByIdQueryHandler", "rp": "BlazorShop.Application_GetCartByIdQueryHandler.html", "cl": 6, "ucl": 26, "cal": 32, "tl": 77, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsCountQueryHandler", "rp": "BlazorShop.Application_GetCartsCountQueryHandler.html", "cl": 5, "ucl": 15, "cal": 20, "tl": 58, "cb": 1, "tb": 2, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.CartHandler.GetCartsQueryHandler", "rp": "BlazorShop.Application_GetCartsQueryHandler.html", "cl": 6, "ucl": 26, "cal": 32, "tl": 77, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClotheByIdQueryHandler", "rp": "BlazorShop.Application_GetClotheByIdQueryHandler.html", "cl": 32, "ucl": 0, "cal": 32, "tl": 77, "cb": 3, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.ClotheHandler.GetClothesQueryHandler", "rp": "BlazorShop.Application_GetClothesQueryHandler.html", "cl": 32, "ucl": 0, "cal": 32, "tl": 77, "cb": 3, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoiceByIdQueryHandler", "rp": "BlazorShop.Application_GetInvoiceByIdQueryHandler.html", "cl": 6, "ucl": 26, "cal": 32, "tl": 77, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.InvoiceHandler.GetInvoicesQueryHandler", "rp": "BlazorShop.Application_GetInvoicesQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicByIdQueryHandler", "rp": "BlazorShop.Application_GetMusicByIdQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.MusicHandler.GetMusicsQueryHandler", "rp": "BlazorShop.Application_GetMusicsQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrderByIdQueryHandler", "rp": "BlazorShop.Application_GetOrderByIdQueryHandler.html", "cl": 6, "ucl": 26, "cal": 32, "tl": 77, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.OrderHandler.GetOrdersQueryHandler", "rp": "BlazorShop.Application_GetOrdersQueryHandler.html", "cl": 6, "ucl": 26, "cal": 32, "tl": 77, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptByIdQueryHandler", "rp": "BlazorShop.Application_GetReceiptByIdQueryHandler.html", "cl": 6, "ucl": 26, "cal": 32, "tl": 77, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.ReceiptHandler.GetReceiptsQueryHandler", "rp": "BlazorShop.Application_GetReceiptsQueryHandler.html", "cl": 6, "ucl": 26, "cal": 32, "tl": 77, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByIdQueryHandler", "rp": "BlazorShop.Application_GetRoleByIdQueryHandler.html", "cl": 5, "ucl": 21, "cal": 26, "tl": 66, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.RoleHandler.GetRoleByNormalizedNameQueryHandler", "rp": "BlazorShop.Application_GetRoleByNormalizedNameQueryHandler.html", "cl": 5, "ucl": 21, "cal": 26, "tl": 66, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesForAdminQueryHandler", "rp": "BlazorShop.Application_GetRolesForAdminQueryHandler.html", "cl": 5, "ucl": 21, "cal": 26, "tl": 66, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.RoleHandler.GetRolesQueryHandler", "rp": "BlazorShop.Application_GetRolesQueryHandler.html", "cl": 5, "ucl": 21, "cal": 26, "tl": 66, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscriberByIdQueryHandler", "rp": "BlazorShop.Application_GetSubscriberByIdQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetSubscribersQueryHandler", "rp": "BlazorShop.Application_GetSubscribersQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.SubscriberHandler.GetUserSubscribersQueryHandler", "rp": "BlazorShop.Application_GetUserSubscribersQueryHandler.html", "cl": 6, "ucl": 26, "cal": 32, "tl": 77, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionByIdQueryHandler", "rp": "BlazorShop.Application_GetSubscriptionByIdQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.SubscriptionHandler.GetSubscriptionsQueryHandler", "rp": "BlazorShop.Application_GetSubscriptionsQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemByIdQueryHandler", "rp": "BlazorShop.Application_GetTodoItemByIdQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.TodoItemHandler.GetTodoItemsQueryHandler", "rp": "BlazorShop.Application_GetTodoItemsQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListByIdQueryHandler", "rp": "BlazorShop.Application_GetTodoListByIdQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.TodoListHandler.GetTodoListsQueryHandler", "rp": "BlazorShop.Application_GetTodoListsQueryHandler.html", "cl": 6, "ucl": 25, "cal": 31, "tl": 76, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByEmailQueryHandler", "rp": "BlazorShop.Application_GetUserByEmailQueryHandler.html", "cl": 5, "ucl": 21, "cal": 26, "tl": 66, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.UserHandler.GetUserByIdQueryHandler", "rp": "BlazorShop.Application_GetUserByIdQueryHandler.html", "cl": 5, "ucl": 21, "cal": 26, "tl": 66, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersInactiveQueryHandler", "rp": "BlazorShop.Application_GetUsersInactiveQueryHandler.html", "cl": 5, "ucl": 21, "cal": 26, "tl": 66, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Handlers.Queries.UserHandler.GetUsersQueryHandler", "rp": "BlazorShop.Application_GetUsersQueryHandler.html", "cl": 5, "ucl": 21, "cal": 26, "tl": 66, "cb": 1, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.CartQuery.GetCartByIdQuery", "rp": "BlazorShop.Application_GetCartByIdQuery.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.CartQuery.GetCartsCountQuery", "rp": "BlazorShop.Application_GetCartsCountQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.CartQuery.GetCartsQuery", "rp": "BlazorShop.Application_GetCartsQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.ClotheQuery.GetClotheByIdQuery", "rp": "BlazorShop.Application_GetClotheByIdQuery.html", "cl": 1, "ucl": 0, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.InvoiceQuery.GetInvoiceByIdQuery", "rp": "BlazorShop.Application_GetInvoiceByIdQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.MusicQuery.GetMusicByIdQuery", "rp": "BlazorShop.Application_GetMusicByIdQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.OrderQuery.GetOrderByIdQuery", "rp": "BlazorShop.Application_GetOrderByIdQuery.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.OrderQuery.GetOrdersQuery", "rp": "BlazorShop.Application_GetOrdersQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.ReceiptQuery.GetReceiptByIdQuery", "rp": "BlazorShop.Application_GetReceiptByIdQuery.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.ReceiptQuery.GetReceiptsQuery", "rp": "BlazorShop.Application_GetReceiptsQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.RoleQuery.GetRoleByIdQuery", "rp": "BlazorShop.Application_GetRoleByIdQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.RoleQuery.GetRoleByNormalizedNameQuery", "rp": "BlazorShop.Application_GetRoleByNormalizedNameQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.SubscriberQuery.GetSubscriberByIdQuery", "rp": "BlazorShop.Application_GetSubscriberByIdQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.SubscriberQuery.GetUserSubscribersQuery", "rp": "BlazorShop.Application_GetUserSubscribersQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.SubscriptionQuery.GetSubscriptionByIdQuery", "rp": "BlazorShop.Application_GetSubscriptionByIdQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.TodoItemQuery.GetTodoItemByIdQuery", "rp": "BlazorShop.Application_GetTodoItemByIdQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.TodoListQuery.GetTodoListByIdQuery", "rp": "BlazorShop.Application_GetTodoListByIdQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.UserQuery.GetUserByEmailQuery", "rp": "BlazorShop.Application_GetUserByEmailQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Queries.UserQuery.GetUserByIdQuery", "rp": "BlazorShop.Application_GetUserByIdQuery.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.CartResponse", "rp": "BlazorShop.Application_CartResponse.html", "cl": 0, "ucl": 21, "cal": 21, "tl": 75, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.ClotheResponse", "rp": "BlazorShop.Application_ClotheResponse.html", "cl": 8, "ucl": 11, "cal": 19, "tl": 69, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.InvoiceResponse", "rp": "BlazorShop.Application_InvoiceResponse.html", "cl": 0, "ucl": 15, "cal": 15, "tl": 57, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.MusicResponse", "rp": "BlazorShop.Application_MusicResponse.html", "cl": 0, "ucl": 19, "cal": 19, "tl": 69, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.OrderResponse", "rp": "BlazorShop.Application_OrderResponse.html", "cl": 0, "ucl": 15, "cal": 15, "tl": 57, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.ReceiptResponse", "rp": "BlazorShop.Application_ReceiptResponse.html", "cl": 0, "ucl": 13, "cal": 13, "tl": 51, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.RoleResponse", "rp": "BlazorShop.Application_RoleResponse.html", "cl": 0, "ucl": 9, "cal": 9, "tl": 39, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.SubscriberResponse", "rp": "BlazorShop.Application_SubscriberResponse.html", "cl": 0, "ucl": 33, "cal": 33, "tl": 111, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.SubscriptionResponse", "rp": "BlazorShop.Application_SubscriptionResponse.html", "cl": 0, "ucl": 23, "cal": 23, "tl": 81, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.TodoItemResponse", "rp": "BlazorShop.Application_TodoItemResponse.html", "cl": 0, "ucl": 19, "cal": 19, "tl": 69, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.TodoListResponse", "rp": "BlazorShop.Application_TodoListResponse.html", "cl": 0, "ucl": 9, "cal": 9, "tl": 39, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Responses.UserResponse", "rp": "BlazorShop.Application_UserResponse.html", "cl": 0, "ucl": 21, "cal": 21, "tl": 71, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.AccountValidator.ChangePasswordCommandValidator", "rp": "BlazorShop.Application_ChangePasswordCommandValidator.html", "cl": 0, "ucl": 16, "cal": 16, "tl": 35, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.AccountValidator.LoginCommandValidator", "rp": "BlazorShop.Application_LoginCommandValidator.html", "cl": 0, "ucl": 23, "cal": 23, "tl": 49, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.AccountValidator.RegisterCommandValidator", "rp": "BlazorShop.Application_RegisterCommandValidator.html", "cl": 0, "ucl": 36, "cal": 36, "tl": 65, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.AccountValidator.ResetPasswordCommandValidator", "rp": "BlazorShop.Application_ResetPasswordCommandValidator.html", "cl": 0, "ucl": 28, "cal": 28, "tl": 55, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.CartValidator.CreateCartCommandValidator", "rp": "BlazorShop.Application_CreateCartCommandValidator.html", "cl": 0, "ucl": 23, "cal": 23, "tl": 57, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.CartValidator.DeleteAllCartsCommandValidator", "rp": "BlazorShop.Application_DeleteAllCartsCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.CartValidator.DeleteCartCommandValidator", "rp": "BlazorShop.Application_DeleteCartCommandValidator.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 24, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.CartValidator.GetCartByIdQueryValidator", "rp": "BlazorShop.Application_GetCartByIdQueryValidator.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 24, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.CartValidator.GetCartsCountQueryValidator", "rp": "BlazorShop.Application_GetCartsCountQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.CartValidator.GetCartsQueryValidator", "rp": "BlazorShop.Application_GetCartsQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.CartValidator.UpdateCartCommandValidator", "rp": "BlazorShop.Application_UpdateCartCommandValidator.html", "cl": 0, "ucl": 25, "cal": 25, "tl": 60, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ClotheValidator.CreateClotheCommandValidator", "rp": "BlazorShop.Application_CreateClotheCommandValidator.html", "cl": 0, "ucl": 31, "cal": 31, "tl": 66, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ClotheValidator.DeleteClotheCommandValidator", "rp": "BlazorShop.Application_DeleteClotheCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ClotheValidator.GetClotheByIdQueryValidator", "rp": "BlazorShop.Application_GetClotheByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ClotheValidator.UpdateClotheCommandValidator", "rp": "BlazorShop.Application_UpdateClotheCommandValidator.html", "cl": 0, "ucl": 33, "cal": 33, "tl": 69, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.InvoiceValidator.CreateInvoiceCommandValidator", "rp": "BlazorShop.Application_CreateInvoiceCommandValidator.html", "cl": 0, "ucl": 25, "cal": 25, "tl": 59, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.InvoiceValidator.DeleteInvoiceCommandValidator", "rp": "BlazorShop.Application_DeleteInvoiceCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.InvoiceValidator.GetInvoiceByIdQueryValidator", "rp": "BlazorShop.Application_GetInvoiceByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.InvoiceValidator.UpdateInvoiceCommandValidator", "rp": "BlazorShop.Application_UpdateInvoiceCommandValidator.html", "cl": 0, "ucl": 27, "cal": 27, "tl": 62, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.MusicValidator.CreateMusicCommandValidator", "rp": "BlazorShop.Application_CreateMusicCommandValidator.html", "cl": 0, "ucl": 39, "cal": 39, "tl": 76, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.MusicValidator.DeleteMusicCommandValidator", "rp": "BlazorShop.Application_DeleteMusicCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.MusicValidator.GetMusicByIdQueryValidator", "rp": "BlazorShop.Application_GetMusicByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.MusicValidator.UpdateMusicCommandValidator", "rp": "BlazorShop.Application_UpdateMusicCommandValidator.html", "cl": 0, "ucl": 39, "cal": 39, "tl": 76, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.OrderValidator.CreateOrderCommandValidator", "rp": "BlazorShop.Application_CreateOrderCommandValidator.html", "cl": 0, "ucl": 17, "cal": 17, "tl": 36, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.OrderValidator.DeleteOrderCommandValidator", "rp": "BlazorShop.Application_DeleteOrderCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.OrderValidator.GetOrderByIdQueryValidator", "rp": "BlazorShop.Application_GetOrderByIdQueryValidator.html", "cl": 0, "ucl": 9, "cal": 9, "tl": 26, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.OrderValidator.GetOrdersQueryValidator", "rp": "BlazorShop.Application_GetOrdersQueryValidator.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 23, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.OrderValidator.UpdateOrderCommandValidator", "rp": "BlazorShop.Application_UpdateOrderCommandValidator.html", "cl": 0, "ucl": 19, "cal": 19, "tl": 39, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ReceiptValidator.CreateReceiptCommandValidator", "rp": "BlazorShop.Application_CreateReceiptCommandValidator.html", "cl": 0, "ucl": 19, "cal": 19, "tl": 38, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ReceiptValidator.DeleteReceiptCommandValidator", "rp": "BlazorShop.Application_DeleteReceiptCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ReceiptValidator.GetReceiptByIdQueryValidator", "rp": "BlazorShop.Application_GetReceiptByIdQueryValidator.html", "cl": 0, "ucl": 9, "cal": 9, "tl": 26, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ReceiptValidator.GetReceiptsQueryValidator", "rp": "BlazorShop.Application_GetReceiptsQueryValidator.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 23, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.ReceiptValidator.UpdateReceiptCommandValidator", "rp": "BlazorShop.Application_UpdateReceiptCommandValidator.html", "cl": 0, "ucl": 21, "cal": 21, "tl": 41, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.RoleValidator.CreateRoleCommandValidator", "rp": "BlazorShop.Application_CreateRoleCommandValidator.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 23, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.RoleValidator.DeleteRoleCommandValidator", "rp": "BlazorShop.Application_DeleteRoleCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.RoleValidator.GetRoleByIdQueryValidator", "rp": "BlazorShop.Application_GetRoleByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.RoleValidator.GetRoleByNormalizedNameQueryValidator", "rp": "BlazorShop.Application_GetRoleByNormalizedNameQueryValidator.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 23, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.RoleValidator.UpdateRoleCommandValidator", "rp": "BlazorShop.Application_UpdateRoleCommandValidator.html", "cl": 0, "ucl": 9, "cal": 9, "tl": 26, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriberValidator.CreateSubscriberCommandValidator", "rp": "BlazorShop.Application_CreateSubscriberCommandValidator.html", "cl": 0, "ucl": 20, "cal": 20, "tl": 41, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriberValidator.DeleteSubscriberCommandValidator", "rp": "BlazorShop.Application_DeleteSubscriberCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriberValidator.GetSubscriberByIdQueryValidator", "rp": "BlazorShop.Application_GetSubscriberByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriberValidator.GetUserSubscribersQueryValidator", "rp": "BlazorShop.Application_GetUserSubscribersQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriberValidator.UpdateCreatedSubscriberCommandValidator", "rp": "BlazorShop.Application_UpdateCreatedSubscriberCommandValidator.html", "cl": 0, "ucl": 22, "cal": 22, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberCommandValidator", "rp": "BlazorShop.Application_UpdateSubscriberCommandValidator.html", "cl": 0, "ucl": 24, "cal": 24, "tl": 46, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriberValidator.UpdateSubscriberStatusCommandValidator", "rp": "BlazorShop.Application_UpdateSubscriberStatusCommandValidator.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 23, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriptionValidator.CreateSubscriptionCommandValidator", "rp": "BlazorShop.Application_CreateSubscriptionCommandValidator.html", "cl": 0, "ucl": 34, "cal": 34, "tl": 70, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriptionValidator.DeleteSubscriptionCommandValidator", "rp": "BlazorShop.Application_DeleteSubscriptionCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriptionValidator.GetSubscriptionByIdQueryValidator", "rp": "BlazorShop.Application_GetSubscriptionByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.SubscriptionValidator.UpdateSubscriptionCommandValidator", "rp": "BlazorShop.Application_UpdateSubscriptionCommandValidator.html", "cl": 0, "ucl": 34, "cal": 34, "tl": 70, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.TodoItemValidator.CreateTodoItemCommandValidator", "rp": "BlazorShop.Application_CreateTodoItemCommandValidator.html", "cl": 0, "ucl": 29, "cal": 29, "tl": 64, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.TodoItemValidator.DeleteTodoItemCommandValidator", "rp": "BlazorShop.Application_DeleteTodoItemCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.TodoItemValidator.GetTodoItemByIdQueryValidator", "rp": "BlazorShop.Application_GetTodoItemByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.TodoItemValidator.UpdateTodoItemCommandValidator", "rp": "BlazorShop.Application_UpdateTodoItemCommandValidator.html", "cl": 0, "ucl": 30, "cal": 30, "tl": 65, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.TodoListValidator.CreateTodoListCommandValidator", "rp": "BlazorShop.Application_CreateTodoListCommandValidator.html", "cl": 0, "ucl": 17, "cal": 17, "tl": 48, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.TodoListValidator.DeleteTodoListCommandValidator", "rp": "BlazorShop.Application_DeleteTodoListCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.TodoListValidator.GetTodoListByIdQueryValidator", "rp": "BlazorShop.Application_GetTodoListByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.TodoListValidator.UpdateTodoListCommandValidator", "rp": "BlazorShop.Application_UpdateTodoListCommandValidator.html", "cl": 0, "ucl": 17, "cal": 17, "tl": 48, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.UserValidator.ActivateUserCommandValidator", "rp": "BlazorShop.Application_ActivateUserCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.UserValidator.AssignUserToRoleCommandValidator", "rp": "BlazorShop.Application_AssignUserToRoleCommandValidator.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 24, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.UserValidator.CreateUserCommandValidator", "rp": "BlazorShop.Application_CreateUserCommandValidator.html", "cl": 0, "ucl": 31, "cal": 31, "tl": 59, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.UserValidator.DeleteUserCommandValidator", "rp": "BlazorShop.Application_DeleteUserCommandValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.UserValidator.GetUserByEmailQueryValidator", "rp": "BlazorShop.Application_GetUserByEmailQueryValidator.html", "cl": 0, "ucl": 19, "cal": 19, "tl": 44, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.UserValidator.GetUserByIdQueryValidator", "rp": "BlazorShop.Application_GetUserByIdQueryValidator.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 21, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.UserValidator.UpdateUserCommandValidator", "rp": "BlazorShop.Application_UpdateUserCommandValidator.html", "cl": 0, "ucl": 17, "cal": 17, "tl": 36, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Application.Validators.UserValidator.UpdateUserEmailCommandValidator", "rp": "BlazorShop.Application_UpdateUserEmailCommandValidator.html", "cl": 0, "ucl": 27, "cal": 27, "tl": 54, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - ]}, - { - "name": "BlazorShop.Domain", - "classes": [ - { "name": "BlazorShop.Domain.Common.EntityBase", "rp": "BlazorShop.Domain_EntityBase.html", "cl": 1, "ucl": 0, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Cart", "rp": "BlazorShop.Domain_Cart.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Clothe", "rp": "BlazorShop.Domain_Clothe.html", "cl": 7, "ucl": 0, "cal": 7, "tl": 47, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Identity.Role", "rp": "BlazorShop.Domain_Role.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Identity.RoleClaim", "rp": "BlazorShop.Domain_RoleClaim.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Identity.User", "rp": "BlazorShop.Domain_User.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 47, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Identity.UserClaim", "rp": "BlazorShop.Domain_UserClaim.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Identity.UserLogin", "rp": "BlazorShop.Domain_UserLogin.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Identity.UserRole", "rp": "BlazorShop.Domain_UserRole.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Identity.UserToken", "rp": "BlazorShop.Domain_UserToken.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Invoice", "rp": "BlazorShop.Domain_Invoice.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Music", "rp": "BlazorShop.Domain_Music.html", "cl": 0, "ucl": 7, "cal": 7, "tl": 47, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Order", "rp": "BlazorShop.Domain_Order.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Receipt", "rp": "BlazorShop.Domain_Receipt.html", "cl": 0, "ucl": 4, "cal": 4, "tl": 32, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Subscriber", "rp": "BlazorShop.Domain_Subscriber.html", "cl": 0, "ucl": 8, "cal": 8, "tl": 52, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.Subscription", "rp": "BlazorShop.Domain_Subscription.html", "cl": 0, "ucl": 9, "cal": 9, "tl": 57, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.TodoItem", "rp": "BlazorShop.Domain_TodoItem.html", "cl": 0, "ucl": 6, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Domain.Entities.TodoList", "rp": "BlazorShop.Domain_TodoList.html", "cl": 0, "ucl": 2, "cal": 2, "tl": 22, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - ]}, - { - "name": "BlazorShop.Infrastructure", - "classes": [ - { "name": "BlazorShop.Infrastructure.DependencyInjection", "rp": "BlazorShop.Infrastructure_DependencyInjection.html", "cl": 0, "ucl": 32, "cal": 32, "tl": 59, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.ApplicationDbContextModelSnapshot", "rp": "BlazorShop.Infrastructure_ApplicationDbContextModelSnapshot.html", "cl": 0, "ucl": 710, "cal": 710, "tl": 756, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_1", "rp": "BlazorShop.Infrastructure_Migration_1.html", "cl": 0, "ucl": 881, "cal": 881, "tl": 979, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_10", "rp": "BlazorShop.Infrastructure_Migration_10.html", "cl": 0, "ucl": 1147, "cal": 1147, "tl": 1270, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_11", "rp": "BlazorShop.Infrastructure_Migration_11.html", "cl": 0, "ucl": 696, "cal": 696, "tl": 765, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_2", "rp": "BlazorShop.Infrastructure_Migration_2.html", "cl": 0, "ucl": 710, "cal": 710, "tl": 798, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_3", "rp": "BlazorShop.Infrastructure_Migration_3.html", "cl": 0, "ucl": 603, "cal": 603, "tl": 668, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_4", "rp": "BlazorShop.Infrastructure_Migration_4.html", "cl": 0, "ucl": 609, "cal": 609, "tl": 674, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_5", "rp": "BlazorShop.Infrastructure_Migration_5.html", "cl": 0, "ucl": 612, "cal": 612, "tl": 677, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_6", "rp": "BlazorShop.Infrastructure_Migration_6.html", "cl": 0, "ucl": 641, "cal": 641, "tl": 710, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_7", "rp": "BlazorShop.Infrastructure_Migration_7.html", "cl": 0, "ucl": 626, "cal": 626, "tl": 691, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_8", "rp": "BlazorShop.Infrastructure_Migration_8.html", "cl": 0, "ucl": 643, "cal": 643, "tl": 710, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration_9", "rp": "BlazorShop.Infrastructure_Migration_9.html", "cl": 0, "ucl": 676, "cal": 676, "tl": 745, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration12", "rp": "BlazorShop.Infrastructure_Migration12.html", "cl": 0, "ucl": 758, "cal": 758, "tl": 830, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Migrations.Migration13", "rp": "BlazorShop.Infrastructure_Migration13.html", "cl": 0, "ucl": 734, "cal": 734, "tl": 803, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.ApplicationDbContext", "rp": "BlazorShop.Infrastructure_ApplicationDbContext.html", "cl": 41, "ucl": 3, "cal": 44, "tl": 108, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.ApplicationDbContextSeed", "rp": "BlazorShop.Infrastructure_ApplicationDbContextSeed.html", "cl": 0, "ucl": 317, "cal": 317, "tl": 385, "cb": 0, "tb": 20, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.CartConfiguration", "rp": "BlazorShop.Infrastructure_CartConfiguration.html", "cl": 12, "ucl": 0, "cal": 12, "tl": 31, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.ClotheConfiguration", "rp": "BlazorShop.Infrastructure_ClotheConfiguration.html", "cl": 23, "ucl": 0, "cal": 23, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleClaimConfiguration", "rp": "BlazorShop.Infrastructure_RoleClaimConfiguration.html", "cl": 12, "ucl": 0, "cal": 12, "tl": 32, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.Identity.RoleConfiguration", "rp": "BlazorShop.Infrastructure_RoleConfiguration.html", "cl": 9, "ucl": 0, "cal": 9, "tl": 28, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserClaimConfiguration", "rp": "BlazorShop.Infrastructure_UserClaimConfiguration.html", "cl": 12, "ucl": 0, "cal": 12, "tl": 32, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserConfiguration", "rp": "BlazorShop.Infrastructure_UserConfiguration.html", "cl": 23, "ucl": 0, "cal": 23, "tl": 43, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserLoginConfiguration", "rp": "BlazorShop.Infrastructure_UserLoginConfiguration.html", "cl": 6, "ucl": 0, "cal": 6, "tl": 25, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserRoleConfiguration", "rp": "BlazorShop.Infrastructure_UserRoleConfiguration.html", "cl": 9, "ucl": 0, "cal": 9, "tl": 28, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.Identity.UserTokenConfiguration", "rp": "BlazorShop.Infrastructure_UserTokenConfiguration.html", "cl": 6, "ucl": 0, "cal": 6, "tl": 25, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.InvoiceConfiguration", "rp": "BlazorShop.Infrastructure_InvoiceConfiguration.html", "cl": 16, "ucl": 0, "cal": 16, "tl": 35, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.MusicConfiguration", "rp": "BlazorShop.Infrastructure_MusicConfiguration.html", "cl": 23, "ucl": 0, "cal": 23, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.OrderConfiguration", "rp": "BlazorShop.Infrastructure_OrderConfiguration.html", "cl": 18, "ucl": 0, "cal": 18, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.ReceiptConfiguration", "rp": "BlazorShop.Infrastructure_ReceiptConfiguration.html", "cl": 15, "ucl": 0, "cal": 15, "tl": 34, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.SubscriberConfiguration", "rp": "BlazorShop.Infrastructure_SubscriberConfiguration.html", "cl": 19, "ucl": 0, "cal": 19, "tl": 38, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.SubscriptionConfiguration", "rp": "BlazorShop.Infrastructure_SubscriptionConfiguration.html", "cl": 29, "ucl": 0, "cal": 29, "tl": 48, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.TodoItemConfiguration", "rp": "BlazorShop.Infrastructure_TodoItemConfiguration.html", "cl": 9, "ucl": 0, "cal": 9, "tl": 28, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Persistence.Configurations.TodoListConfiguration", "rp": "BlazorShop.Infrastructure_TodoListConfiguration.html", "cl": 7, "ucl": 0, "cal": 7, "tl": 26, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Services.AccountService", "rp": "BlazorShop.Infrastructure_AccountService.html", "cl": 9, "ucl": 101, "cal": 110, "tl": 183, "cb": 0, "tb": 20, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Services.DateTimeService", "rp": "BlazorShop.Infrastructure_DateTimeService.html", "cl": 0, "ucl": 1, "cal": 1, "tl": 17, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Services.EmailService", "rp": "BlazorShop.Infrastructure_EmailService.html", "cl": 0, "ucl": 56, "cal": 56, "tl": 101, "cb": 0, "tb": 2, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Services.RoleService", "rp": "BlazorShop.Infrastructure_RoleService.html", "cl": 9, "ucl": 124, "cal": 133, "tl": 219, "cb": 0, "tb": 12, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Services.UserService", "rp": "BlazorShop.Infrastructure_UserService.html", "cl": 9, "ucl": 124, "cal": 133, "tl": 225, "cb": 0, "tb": 16, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Utils.AdminSeedModel", "rp": "BlazorShop.Infrastructure_AdminSeedModel.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 37, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.Infrastructure.Utils.RolesSeedModel", "rp": "BlazorShop.Infrastructure_RolesSeedModel.html", "cl": 0, "ucl": 6, "cal": 6, "tl": 42, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - ]}, - { - "name": "BlazorShop.WebApi", - "classes": [ - { "name": "BlazorShop.WebApi.Controllers.AccountsController", "rp": "BlazorShop.WebApi_AccountsController.html", "cl": 5, "ucl": 35, "cal": 40, "tl": 109, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.ApiBaseController", "rp": "BlazorShop.WebApi_ApiBaseController.html", "cl": 5, "ucl": 0, "cal": 5, "tl": 29, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.CartsController", "rp": "BlazorShop.WebApi_CartsController.html", "cl": 9, "ucl": 34, "cal": 43, "tl": 120, "cb": 1, "tb": 12, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.ClothesController", "rp": "BlazorShop.WebApi_ClothesController.html", "cl": 3, "ucl": 30, "cal": 33, "tl": 96, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.HomeController", "rp": "BlazorShop.WebApi_HomeController.html", "cl": 4, "ucl": 14, "cal": 18, "tl": 63, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.InvoicesController", "rp": "BlazorShop.WebApi_InvoicesController.html", "cl": 3, "ucl": 30, "cal": 33, "tl": 91, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.MusicsController", "rp": "BlazorShop.WebApi_MusicsController.html", "cl": 3, "ucl": 30, "cal": 33, "tl": 95, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.OrdersController", "rp": "BlazorShop.WebApi_OrdersController.html", "cl": 3, "ucl": 30, "cal": 33, "tl": 97, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.PaymentsController", "rp": "BlazorShop.WebApi_PaymentsController.html", "cl": 4, "ucl": 173, "cal": 177, "tl": 308, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.ReceiptsController", "rp": "BlazorShop.WebApi_ReceiptsController.html", "cl": 3, "ucl": 30, "cal": 33, "tl": 97, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.RolesController", "rp": "BlazorShop.WebApi_RolesController.html", "cl": 3, "ucl": 36, "cal": 39, "tl": 104, "cb": 0, "tb": 12, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.SubscribersController", "rp": "BlazorShop.WebApi_SubscribersController.html", "cl": 3, "ucl": 36, "cal": 39, "tl": 110, "cb": 0, "tb": 12, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.SubscriptionsController", "rp": "BlazorShop.WebApi_SubscriptionsController.html", "cl": 3, "ucl": 30, "cal": 33, "tl": 95, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.TodoItemsController", "rp": "BlazorShop.WebApi_TodoItemsController.html", "cl": 3, "ucl": 24, "cal": 27, "tl": 78, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.TodoListsController", "rp": "BlazorShop.WebApi_TodoListsController.html", "cl": 3, "ucl": 30, "cal": 33, "tl": 91, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Controllers.UsersController", "rp": "BlazorShop.WebApi_UsersController.html", "cl": 3, "ucl": 48, "cal": 51, "tl": 139, "cb": 0, "tb": 16, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Filters.ApiExceptionFilterAttribute", "rp": "BlazorShop.WebApi_ApiExceptionFilterAttribute.html", "cl": 0, "ucl": 59, "cal": 59, "tl": 116, "cb": 0, "tb": 18, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebApi.Filters.JwtTokenMiddleware", "rp": "BlazorShop.WebApi_JwtTokenMiddleware.html", "cl": 0, "ucl": 38, "cal": 38, "tl": 85, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "Program", "rp": "BlazorShop.WebApi_Program.html", "cl": 0, "ucl": 138, "cal": 138, "tl": 172, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - ]}, - { - "name": "BlazorShop.WebClient", - "classes": [ - { "name": "BlazorShop.WebClient.Auth.AuthenticationService", "rp": "BlazorShop.WebClient_AuthenticationService.html", "cl": 11, "ucl": 69, "cal": 80, "tl": 136, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Auth.AuthStateProvider", "rp": "BlazorShop.WebClient_AuthStateProvider.html", "cl": 7, "ucl": 27, "cal": 34, "tl": 90, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Auth.JwtTokenParser", "rp": "BlazorShop.WebClient_JwtTokenParser.html", "cl": 0, "ucl": 35, "cal": 35, "tl": 78, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.AuthPolicies.AdminRoleHandler", "rp": "BlazorShop.WebClient_AdminRoleHandler.html", "cl": 0, "ucl": 11, "cal": 11, "tl": 33, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.AuthPolicies.AdminRoleRequirement", "rp": "BlazorShop.WebClient_AdminRoleRequirement.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 26, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.AuthPolicies.CustomerRoleHandler", "rp": "BlazorShop.WebClient_CustomerRoleHandler.html", "cl": 0, "ucl": 16, "cal": 16, "tl": 38, "cb": 0, "tb": 14, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.AuthPolicies.CustomerRoleRequirement", "rp": "BlazorShop.WebClient_CustomerRoleRequirement.html", "cl": 0, "ucl": 8, "cal": 8, "tl": 33, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.AuthPolicies.DefaultRoleHandler", "rp": "BlazorShop.WebClient_DefaultRoleHandler.html", "cl": 0, "ucl": 11, "cal": 11, "tl": 33, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.AuthPolicies.DefaultRoleRequirement", "rp": "BlazorShop.WebClient_DefaultRoleRequirement.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 26, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.AuthPolicies.UserRoleHandler", "rp": "BlazorShop.WebClient_UserRoleHandler.html", "cl": 0, "ucl": 11, "cal": 11, "tl": 33, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.AuthPolicies.UserRoleRequirement", "rp": "BlazorShop.WebClient_UserRoleRequirement.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 26, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Interceptor.HttpInterceptorService", "rp": "BlazorShop.WebClient_HttpInterceptorService.html", "cl": 5, "ucl": 23, "cal": 28, "tl": 84, "cb": 0, "tb": 7, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Interceptor.HttpResponseException", "rp": "BlazorShop.WebClient_HttpResponseException.html", "cl": 0, "ucl": 12, "cal": 12, "tl": 49, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Account.Login", "rp": "BlazorShop.WebClient_Login.html", "cl": 0, "ucl": 27, "cal": 27, "tl": 108, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Account.Logout", "rp": "BlazorShop.WebClient_Logout.html", "cl": 0, "ucl": 4, "cal": 4, "tl": 23, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Account.Register", "rp": "BlazorShop.WebClient_Register.html", "cl": 0, "ucl": 16, "cal": 16, "tl": 101, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Account.ResetPassword", "rp": "BlazorShop.WebClient_ResetPassword.html", "cl": 0, "ucl": 16, "cal": 16, "tl": 84, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Account.VerifyAuth", "rp": "BlazorShop.WebClient_VerifyAuth.html", "cl": 0, "ucl": 38, "cal": 38, "tl": 75, "cb": 0, "tb": 14, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Clothes.AddEditClothe", "rp": "BlazorShop.WebClient_AddEditClothe.html", "cl": 0, "ucl": 32, "cal": 32, "tl": 139, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Clothes.Clothes", "rp": "BlazorShop.WebClient_Clothes.html", "cl": 0, "ucl": 64, "cal": 64, "tl": 198, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Musics.AddEditMusic", "rp": "BlazorShop.WebClient_AddEditMusic.html", "cl": 0, "ucl": 32, "cal": 32, "tl": 141, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Musics.Musics", "rp": "BlazorShop.WebClient_Musics.html", "cl": 0, "ucl": 47, "cal": 47, "tl": 165, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Roles.AddEditRole", "rp": "BlazorShop.WebClient_AddEditRole.html", "cl": 0, "ucl": 32, "cal": 32, "tl": 97, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Roles.Roles", "rp": "BlazorShop.WebClient_Roles.html", "cl": 0, "ucl": 60, "cal": 60, "tl": 189, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Subscribers.Subscribers", "rp": "BlazorShop.WebClient_Subscribers.html", "cl": 0, "ucl": 42, "cal": 42, "tl": 145, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Subscriptions.AddEditSubscription", "rp": "BlazorShop.WebClient_AddEditSubscription.html", "cl": 0, "ucl": 32, "cal": 32, "tl": 138, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Subscriptions.Subscriptions", "rp": "BlazorShop.WebClient_Subscriptions.html", "cl": 0, "ucl": 47, "cal": 47, "tl": 165, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Todos.TodoItems", "rp": "BlazorShop.WebClient_TodoItems.html", "cl": 0, "ucl": 78, "cal": 78, "tl": 222, "cb": 0, "tb": 22, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Todos.TodoLists", "rp": "BlazorShop.WebClient_TodoLists.html", "cl": 0, "ucl": 37, "cal": 37, "tl": 142, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Todos.TodoState", "rp": "BlazorShop.WebClient_TodoState.html", "cl": 0, "ucl": 31, "cal": 31, "tl": 112, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Users.AddEditUser", "rp": "BlazorShop.WebClient_AddEditUser.html", "cl": 0, "ucl": 38, "cal": 38, "tl": 125, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Admin.Users.Users", "rp": "BlazorShop.WebClient_Users.html", "cl": 0, "ucl": 82, "cal": 82, "tl": 265, "cb": 0, "tb": 12, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Cart.Cart", "rp": "BlazorShop.WebClient_Cart.html", "cl": 0, "ucl": 37, "cal": 37, "tl": 156, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Clothes.ClotheDetails", "rp": "BlazorShop.WebClient_ClotheDetails.html", "cl": 0, "ucl": 35, "cal": 35, "tl": 227, "cb": 0, "tb": 6, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Clothes.Index", "rp": "BlazorShop.WebClient_Index.html", "cl": 0, "ucl": 56, "cal": 56, "tl": 192, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Internal.Not_found", "rp": "BlazorShop.WebClient_Not_found.html", "cl": 0, "ucl": 3, "cal": 3, "tl": 28, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Internal.Server_error", "rp": "BlazorShop.WebClient_Server_error.html", "cl": 0, "ucl": 3, "cal": 3, "tl": 28, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Internal.Unauthorized", "rp": "BlazorShop.WebClient_Unauthorized.html", "cl": 0, "ucl": 3, "cal": 3, "tl": 28, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Musics.Index", "rp": "BlazorShop.WebClient_Index.2.html", "cl": 0, "ucl": 118, "cal": 118, "tl": 290, "cb": 0, "tb": 28, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Musics.MusicDetails", "rp": "BlazorShop.WebClient_MusicDetails.html", "cl": 0, "ucl": 21, "cal": 21, "tl": 174, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Orders.MyOrders", "rp": "BlazorShop.WebClient_MyOrders.html", "cl": 0, "ucl": 51, "cal": 51, "tl": 154, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Orders.OrderSuccess", "rp": "BlazorShop.WebClient_OrderSuccess.html", "cl": 0, "ucl": 11, "cal": 11, "tl": 88, "cb": 0, "tb": 2, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Orders.OrderView", "rp": "BlazorShop.WebClient_OrderView.html", "cl": 0, "ucl": 44, "cal": 44, "tl": 141, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Receipts.Receipts", "rp": "BlazorShop.WebClient_Receipts.html", "cl": 0, "ucl": 45, "cal": 45, "tl": 142, "cb": 0, "tb": 10, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Subscriptions.MySubscriptions", "rp": "BlazorShop.WebClient_MySubscriptions.html", "cl": 0, "ucl": 128, "cal": 128, "tl": 350, "cb": 0, "tb": 26, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Subscriptions.SubscriptionSuccess", "rp": "BlazorShop.WebClient_SubscriptionSuccess.html", "cl": 0, "ucl": 11, "cal": 11, "tl": 88, "cb": 0, "tb": 2, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.Subscriptions.UpdateSubscriptionSuccess", "rp": "BlazorShop.WebClient_UpdateSubscriptionSuccess.html", "cl": 0, "ucl": 11, "cal": 11, "tl": 88, "cb": 0, "tb": 2, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Pages.User.Profile", "rp": "BlazorShop.WebClient_Profile.html", "cl": 0, "ucl": 60, "cal": 60, "tl": 272, "cb": 0, "tb": 32, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.AccountService", "rp": "BlazorShop.WebClient_AccountService.html", "cl": 6, "ucl": 37, "cal": 43, "tl": 86, "cb": 0, "tb": 4, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.CartService", "rp": "BlazorShop.WebClient_CartService.html", "cl": 6, "ucl": 118, "cal": 124, "tl": 201, "cb": 0, "tb": 22, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.ClotheService", "rp": "BlazorShop.WebClient_ClotheService.html", "cl": 6, "ucl": 71, "cal": 77, "tl": 135, "cb": 0, "tb": 14, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.MusicService", "rp": "BlazorShop.WebClient_MusicService.html", "cl": 6, "ucl": 71, "cal": 77, "tl": 135, "cb": 0, "tb": 14, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.OrderService", "rp": "BlazorShop.WebClient_OrderService.html", "cl": 6, "ucl": 71, "cal": 77, "tl": 135, "cb": 0, "tb": 14, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.ReceiptService", "rp": "BlazorShop.WebClient_ReceiptService.html", "cl": 6, "ucl": 71, "cal": 77, "tl": 135, "cb": 0, "tb": 14, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.RoleService", "rp": "BlazorShop.WebClient_RoleService.html", "cl": 6, "ucl": 89, "cal": 95, "tl": 158, "cb": 0, "tb": 18, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.SessionStorageService", "rp": "BlazorShop.WebClient_SessionStorageService.html", "cl": 6, "ucl": 21, "cal": 27, "tl": 78, "cb": 0, "tb": 2, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.StripeService", "rp": "BlazorShop.WebClient_StripeService.html", "cl": 6, "ucl": 16, "cal": 22, "tl": 57, "cb": 0, "tb": 2, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.SubscriberService", "rp": "BlazorShop.WebClient_SubscriberService.html", "cl": 6, "ucl": 84, "cal": 90, "tl": 153, "cb": 0, "tb": 18, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.SubscriptionService", "rp": "BlazorShop.WebClient_SubscriptionService.html", "cl": 6, "ucl": 71, "cal": 77, "tl": 135, "cb": 0, "tb": 14, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.TodoItemService", "rp": "BlazorShop.WebClient_TodoItemService.html", "cl": 6, "ucl": 60, "cal": 66, "tl": 119, "cb": 0, "tb": 12, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.TodoListService", "rp": "BlazorShop.WebClient_TodoListService.html", "cl": 6, "ucl": 73, "cal": 79, "tl": 138, "cb": 0, "tb": 16, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Services.UserService", "rp": "BlazorShop.WebClient_UserService.html", "cl": 6, "ucl": 130, "cal": 136, "tl": 214, "cb": 0, "tb": 22, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Shared.AppState", "rp": "BlazorShop.WebClient_AppState.html", "cl": 0, "ucl": 14, "cal": 14, "tl": 40, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Shared.MainLayout", "rp": "BlazorShop.WebClient_MainLayout.html", "cl": 0, "ucl": 29, "cal": 29, "tl": 111, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "BlazorShop.WebClient.Shared.NavMenu", "rp": "BlazorShop.WebClient_NavMenu.html", "cl": 0, "ucl": 5, "cal": 5, "tl": 129, "cb": 0, "tb": 2, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "Program", "rp": "BlazorShop.WebClient_Program.html", "cl": 0, "ucl": 55, "cal": 55, "tl": 72, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - ]}, - { - "name": "BlazorShop.WorkerService", - "classes": [ - { "name": "BlazorShop.WorkerService.Worker", "rp": "BlazorShop.WorkerService_Worker.html", "cl": 6, "ucl": 29, "cal": 35, "tl": 77, "cb": 0, "tb": 8, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - { "name": "Program", "rp": "BlazorShop.WorkerService_Program.html", "cl": 0, "ucl": 21, "cal": 21, "tl": 28, "cb": 0, "tb": 0, "cm": 0, "tm": 0, "lch": [], "bch": [], "mch": [], "hc": [], "metrics": { } }, - ]}, -]; - -var metrics = [{ "name": "Cyclomatic complexity", "abbreviation": "cc", "explanationUrl": "https://en.wikipedia.org/wiki/Cyclomatic_complexity" }, { "name": "Line coverage", "abbreviation": "cov", "explanationUrl": "https://en.wikipedia.org/wiki/Code_coverage" }, { "name": "Branch coverage", "abbreviation": "bcov", "explanationUrl": "https://en.wikipedia.org/wiki/Code_coverage" }]; - -var historicCoverageExecutionTimes = []; - -var riskHotspotMetrics = [ -]; - -var riskHotspots = [ -]; - -var branchCoverageAvailable = true; -var methodCoverageAvailable = false; - - -var translations = { -'top': 'Top:', -'all': 'All', -'assembly': 'Assembly', -'class': 'Class', -'method': 'Method', -'lineCoverage': 'Line coverage', -'noGrouping': 'No grouping', -'byAssembly': 'By assembly', -'byNamespace': 'By namespace, Level:', -'all': 'All', -'collapseAll': 'Collapse all', -'expandAll': 'Expand all', -'grouping': 'Grouping:', -'filter': 'Filter:', -'name': 'Name', -'covered': 'Covered', -'uncovered': 'Uncovered', -'coverable': 'Coverable', -'total': 'Total', -'coverage': 'Line coverage', -'branchCoverage': 'Branch coverage', -'methodCoverage': 'Method coverage', -'percentage': 'Percentage', -'history': 'Coverage history', -'compareHistory': 'Compare with:', -'date': 'Date', -'allChanges': 'All changes', -'selectCoverageTypes': 'Select coverage types', -'selectCoverageTypesAndMetrics': 'Select coverage types & metrics', -'coverageTypes': 'Coverage types', -'metrics': 'Metrics', -'methodCoverageProVersion': 'Feature is only available for sponsors', -'lineCoverageIncreaseOnly': 'Line coverage: Increase only', -'lineCoverageDecreaseOnly': 'Line coverage: Decrease only', -'branchCoverageIncreaseOnly': 'Branch coverage: Increase only', -'branchCoverageDecreaseOnly': 'Branch coverage: Decrease only', -'methodCoverageIncreaseOnly': 'Method coverage: Increase only', -'methodCoverageDecreaseOnly': 'Method coverage: Decrease only' -}; - - -(()=>{"use strict";var e,_={},p={};function n(e){var a=p[e];if(void 0!==a)return a.exports;var r=p[e]={exports:{}};return _[e](r,r.exports,n),r.exports}n.m=_,e=[],n.O=(a,r,u,l)=>{if(!r){var o=1/0;for(f=0;f=l)&&Object.keys(n.O).every(h=>n.O[h](r[t]))?r.splice(t--,1):(v=!1,l0&&e[f-1][2]>l;f--)e[f]=e[f-1];e[f]=[r,u,l]},n.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return n.d(a,{a}),a},n.d=(e,a)=>{for(var r in a)n.o(a,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},n.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={666:0};n.O.j=u=>0===e[u];var a=(u,l)=>{var t,c,[f,o,v]=l,s=0;if(f.some(d=>0!==e[d])){for(t in o)n.o(o,t)&&(n.m[t]=o[t]);if(v)var b=v(n)}for(u&&u(l);s{he(583)},583:()=>{!function(e){const n=e.performance;function i(I){n&&n.mark&&n.mark(I)}function r(I,p){n&&n.measure&&n.measure(I,p)}i("Zone");const c=e.__Zone_symbol_prefix||"__zone_symbol__";function u(I){return c+I}const f=!0===e[u("forceDuplicateZoneCheck")];if(e.Zone){if(f||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}let _=(()=>{class I{constructor(t,o){this._parent=t,this._name=o?o.name||"unnamed":"",this._properties=o&&o.properties||{},this._zoneDelegate=new T(this,this._parent&&this._parent._zoneDelegate,o)}static assertZonePatched(){if(e.Promise!==J.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=I.current;for(;t.parent;)t=t.parent;return t}static get current(){return G.zone}static get currentTask(){return te}static __load_patch(t,o,g=!1){if(J.hasOwnProperty(t)){if(!g&&f)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const P="Zone:"+t;i(P),J[t]=o(e,I,le),r(P,P)}}get parent(){return this._parent}get name(){return this._name}get(t){const o=this.getZoneWith(t);if(o)return o._properties[t]}getZoneWith(t){let o=this;for(;o;){if(o._properties.hasOwnProperty(t))return o;o=o._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,o){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const g=this._zoneDelegate.intercept(this,t,o),P=this;return function(){return P.runGuarded(g,this,arguments,o)}}run(t,o,g,P){G={parent:G,zone:this};try{return this._zoneDelegate.invoke(this,t,o,g,P)}finally{G=G.parent}}runGuarded(t,o=null,g,P){G={parent:G,zone:this};try{try{return this._zoneDelegate.invoke(this,t,o,g,P)}catch(K){if(this._zoneDelegate.handleError(this,K))throw K}}finally{G=G.parent}}runTask(t,o,g){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||z).name+"; Execution: "+this.name+")");if(t.state===j&&(t.type===R||t.type===M))return;const P=t.state!=X;P&&t._transitionTo(X,O),t.runCount++;const K=te;te=t,G={parent:G,zone:this};try{t.type==M&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,o,g)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{t.state!==j&&t.state!==Y&&(t.type==R||t.data&&t.data.isPeriodic?P&&t._transitionTo(O,X):(t.runCount=0,this._updateTaskCount(t,-1),P&&t._transitionTo(j,X,j))),G=G.parent,te=K}}scheduleTask(t){if(t.zone&&t.zone!==this){let g=this;for(;g;){if(g===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);g=g.parent}}t._transitionTo(q,j);const o=[];t._zoneDelegates=o,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(g){throw t._transitionTo(Y,q,j),this._zoneDelegate.handleError(this,g),g}return t._zoneDelegates===o&&this._updateTaskCount(t,1),t.state==q&&t._transitionTo(O,q),t}scheduleMicroTask(t,o,g,P){return this.scheduleTask(new m(v,t,o,g,P,void 0))}scheduleMacroTask(t,o,g,P,K){return this.scheduleTask(new m(M,t,o,g,P,K))}scheduleEventTask(t,o,g,P,K){return this.scheduleTask(new m(R,t,o,g,P,K))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||z).name+"; Execution: "+this.name+")");t._transitionTo(A,O,X);try{this._zoneDelegate.cancelTask(this,t)}catch(o){throw t._transitionTo(Y,A),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(t,-1),t._transitionTo(j,A),t.runCount=0,t}_updateTaskCount(t,o){const g=t._zoneDelegates;-1==o&&(t._zoneDelegates=null);for(let P=0;PI.hasTask(t,o),onScheduleTask:(I,p,t,o)=>I.scheduleTask(t,o),onInvokeTask:(I,p,t,o,g,P)=>I.invokeTask(t,o,g,P),onCancelTask:(I,p,t,o)=>I.cancelTask(t,o)};class T{constructor(p,t,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=p,this._parentDelegate=t,this._forkZS=o&&(o&&o.onFork?o:t._forkZS),this._forkDlgt=o&&(o.onFork?t:t._forkDlgt),this._forkCurrZone=o&&(o.onFork?this.zone:t._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:t._interceptZS),this._interceptDlgt=o&&(o.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:t._invokeZS),this._invokeDlgt=o&&(o.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:t._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:t._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:t._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:t._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const g=o&&o.onHasTask;(g||t&&t._hasTaskZS)&&(this._hasTaskZS=g?o:y,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=p,o.onScheduleTask||(this._scheduleTaskZS=y,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),o.onInvokeTask||(this._invokeTaskZS=y,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),o.onCancelTask||(this._cancelTaskZS=y,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(p,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,p,t):new _(p,t)}intercept(p,t,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,p,t,o):t}invoke(p,t,o,g,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,p,t,o,g,P):t.apply(o,g)}handleError(p,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,p,t)}scheduleTask(p,t){let o=t;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,p,t),o||(o=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=v)throw new Error("Task is missing scheduleFn.");d(t)}return o}invokeTask(p,t,o,g){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,p,t,o,g):t.callback.apply(o,g)}cancelTask(p,t){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,p,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");o=t.cancelFn(t)}return o}hasTask(p,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,p,t)}catch(o){this.handleError(p,o)}}_updateTaskCount(p,t){const o=this._taskCounts,g=o[p],P=o[p]=g+t;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=g&&0!=P||this.hasTask(this.zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:p})}}class m{constructor(p,t,o,g,P,K){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=p,this.source=t,this.data=g,this.scheduleFn=P,this.cancelFn=K,!o)throw new Error("callback is not defined");this.callback=o;const l=this;this.invoke=p===R&&g&&g.useG?m.invokeTask:function(){return m.invokeTask.call(e,l,this,arguments)}}static invokeTask(p,t,o){p||(p=this),re++;try{return p.runCount++,p.zone.runTask(p,t,o)}finally{1==re&&L(),re--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(j,q)}_transitionTo(p,t,o){if(this._state!==t&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${p}', expecting state '${t}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=p,p==j&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const S=u("setTimeout"),D=u("Promise"),Z=u("then");let E,B=[],V=!1;function d(I){if(0===re&&0===B.length)if(E||e[D]&&(E=e[D].resolve(0)),E){let p=E[Z];p||(p=E.then),p.call(E,L)}else e[S](L,0);I&&B.push(I)}function L(){if(!V){for(V=!0;B.length;){const I=B;B=[];for(let p=0;pG,onUnhandledError:F,microtaskDrainDone:F,scheduleMicroTask:d,showUncaughtError:()=>!_[u("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:F,patchMethod:()=>F,bindArguments:()=>[],patchThen:()=>F,patchMacroTask:()=>F,patchEventPrototype:()=>F,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>F,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>F,wrapWithCurrentZone:()=>F,filterProperties:()=>[],attachOriginToPatched:()=>F,_redefineProperty:()=>F,patchCallbacks:()=>F};let G={parent:null,zone:new _(null,null)},te=null,re=0;function F(){}r("Zone","Zone"),e.Zone=_}(typeof window<"u"&&window||typeof self<"u"&&self||global);const ue=Object.getOwnPropertyDescriptor,he=Object.defineProperty,de=Object.getPrototypeOf,Be=Object.create,ut=Array.prototype.slice,Se="addEventListener",Oe="removeEventListener",Ze=Zone.__symbol__(Se),Ie=Zone.__symbol__(Oe),se="true",ie="false",ke=Zone.__symbol__("");function Le(e,n){return Zone.current.wrap(e,n)}function Me(e,n,i,r,c){return Zone.current.scheduleMacroTask(e,n,i,r,c)}const x=Zone.__symbol__,Pe=typeof window<"u",pe=Pe?window:void 0,$=Pe&&pe||"object"==typeof self&&self||global,ht=[null];function Ae(e,n){for(let i=e.length-1;i>=0;i--)"function"==typeof e[i]&&(e[i]=Le(e[i],n+"_"+i));return e}function Fe(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const Ue=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Re=!("nw"in $)&&typeof $.process<"u"&&"[object process]"==={}.toString.call($.process),je=!Re&&!Ue&&!(!Pe||!pe.HTMLElement),We=typeof $.process<"u"&&"[object process]"==={}.toString.call($.process)&&!Ue&&!(!Pe||!pe.HTMLElement),Ce={},qe=function(e){if(!(e=e||$.event))return;let n=Ce[e.type];n||(n=Ce[e.type]=x("ON_PROPERTY"+e.type));const i=this||e.target||$,r=i[n];let c;return je&&i===pe&&"error"===e.type?(c=r&&r.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===c&&e.preventDefault()):(c=r&&r.apply(this,arguments),null!=c&&!c&&e.preventDefault()),c};function Xe(e,n,i){let r=ue(e,n);if(!r&&i&&ue(i,n)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;const c=x("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete r.writable,delete r.value;const u=r.get,f=r.set,_=n.substr(2);let y=Ce[_];y||(y=Ce[_]=x("ON_PROPERTY"+_)),r.set=function(T){let m=this;!m&&e===$&&(m=$),m&&(m[y]&&m.removeEventListener(_,qe),f&&f.apply(m,ht),"function"==typeof T?(m[y]=T,m.addEventListener(_,qe,!1)):m[y]=null)},r.get=function(){let T=this;if(!T&&e===$&&(T=$),!T)return null;const m=T[y];if(m)return m;if(u){let S=u&&u.call(this);if(S)return r.set.call(this,S),"function"==typeof T.removeAttribute&&T.removeAttribute(n),S}return null},he(e,n,r),e[c]=!0}function Ye(e,n,i){if(n)for(let r=0;rfunction(f,_){const y=i(f,_);return y.cbIdx>=0&&"function"==typeof _[y.cbIdx]?Me(y.name,_[y.cbIdx],y,c):u.apply(f,_)})}function ae(e,n){e[x("OriginalDelegate")]=n}let $e=!1,He=!1;function mt(){if($e)return He;$e=!0;try{const e=pe.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(He=!0)}catch{}return He}Zone.__load_patch("ZoneAwarePromise",(e,n,i)=>{const r=Object.getOwnPropertyDescriptor,c=Object.defineProperty,f=i.symbol,_=[],y=!0===e[f("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],T=f("Promise"),m=f("then");i.onUnhandledError=l=>{if(i.showUncaughtError()){const s=l&&l.rejection;s?console.error("Unhandled Promise rejection:",s instanceof Error?s.message:s,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",s,s instanceof Error?s.stack:void 0):console.error(l)}},i.microtaskDrainDone=()=>{for(;_.length;){const l=_.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(s){Z(s)}}};const D=f("unhandledPromiseRejectionHandler");function Z(l){i.onUnhandledError(l);try{const s=n[D];"function"==typeof s&&s.call(this,l)}catch{}}function B(l){return l&&l.then}function V(l){return l}function E(l){return t.reject(l)}const d=f("state"),L=f("value"),z=f("finally"),j=f("parentPromiseValue"),q=f("parentPromiseState"),X=null,A=!0,Y=!1;function M(l,s){return a=>{try{G(l,s,a)}catch(h){G(l,!1,h)}}}const le=f("currentTaskTrace");function G(l,s,a){const h=function(){let l=!1;return function(a){return function(){l||(l=!0,a.apply(null,arguments))}}}();if(l===a)throw new TypeError("Promise resolved with itself");if(l[d]===X){let w=null;try{("object"==typeof a||"function"==typeof a)&&(w=a&&a.then)}catch(C){return h(()=>{G(l,!1,C)})(),l}if(s!==Y&&a instanceof t&&a.hasOwnProperty(d)&&a.hasOwnProperty(L)&&a[d]!==X)re(a),G(l,a[d],a[L]);else if(s!==Y&&"function"==typeof w)try{w.call(a,h(M(l,s)),h(M(l,!1)))}catch(C){h(()=>{G(l,!1,C)})()}else{l[d]=s;const C=l[L];if(l[L]=a,l[z]===z&&s===A&&(l[d]=l[q],l[L]=l[j]),s===Y&&a instanceof Error){const k=n.currentTask&&n.currentTask.data&&n.currentTask.data.__creationTrace__;k&&c(a,le,{configurable:!0,enumerable:!1,writable:!0,value:k})}for(let k=0;k{try{const b=l[L],N=!!a&&z===a[z];N&&(a[j]=b,a[q]=C);const H=s.run(k,void 0,N&&k!==E&&k!==V?[]:[b]);G(a,!0,H)}catch(b){G(a,!1,b)}},a)}const p=function(){};class t{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(s){return G(new this(null),A,s)}static reject(s){return G(new this(null),Y,s)}static race(s){let a,h,w=new this((b,N)=>{a=b,h=N});function C(b){a(b)}function k(b){h(b)}for(let b of s)B(b)||(b=this.resolve(b)),b.then(C,k);return w}static all(s){return t.allWithCallback(s)}static allSettled(s){return(this&&this.prototype instanceof t?this:t).allWithCallback(s,{thenCallback:h=>({status:"fulfilled",value:h}),errorCallback:h=>({status:"rejected",reason:h})})}static allWithCallback(s,a){let h,w,C=new this((H,U)=>{h=H,w=U}),k=2,b=0;const N=[];for(let H of s){B(H)||(H=this.resolve(H));const U=b;try{H.then(Q=>{N[U]=a?a.thenCallback(Q):Q,k--,0===k&&h(N)},Q=>{a?(N[U]=a.errorCallback(Q),k--,0===k&&h(N)):w(Q)})}catch(Q){w(Q)}k++,b++}return k-=2,0===k&&h(N),C}constructor(s){const a=this;if(!(a instanceof t))throw new Error("Must be an instanceof Promise.");a[d]=X,a[L]=[];try{s&&s(M(a,A),M(a,Y))}catch(h){G(a,!1,h)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return t}then(s,a){let h=this.constructor[Symbol.species];(!h||"function"!=typeof h)&&(h=this.constructor||t);const w=new h(p),C=n.current;return this[d]==X?this[L].push(C,w,s,a):F(this,C,w,s,a),w}catch(s){return this.then(null,s)}finally(s){let a=this.constructor[Symbol.species];(!a||"function"!=typeof a)&&(a=t);const h=new a(p);h[z]=z;const w=n.current;return this[d]==X?this[L].push(w,h,s,s):F(this,w,h,s,s),h}}t.resolve=t.resolve,t.reject=t.reject,t.race=t.race,t.all=t.all;const o=e[T]=e.Promise;e.Promise=t;const g=f("thenPatched");function P(l){const s=l.prototype,a=r(s,"then");if(a&&(!1===a.writable||!a.configurable))return;const h=s.then;s[m]=h,l.prototype.then=function(w,C){return new t((b,N)=>{h.call(this,b,N)}).then(w,C)},l[g]=!0}return i.patchThen=P,o&&(P(o),ce(e,"fetch",l=>function K(l){return function(s,a){let h=l.apply(s,a);if(h instanceof t)return h;let w=h.constructor;return w[g]||P(w),h}}(l))),Promise[n.__symbol__("uncaughtPromiseErrors")]=_,t}),Zone.__load_patch("toString",e=>{const n=Function.prototype.toString,i=x("OriginalDelegate"),r=x("Promise"),c=x("Error"),u=function(){if("function"==typeof this){const T=this[i];if(T)return"function"==typeof T?n.call(T):Object.prototype.toString.call(T);if(this===Promise){const m=e[r];if(m)return n.call(m)}if(this===Error){const m=e[c];if(m)return n.call(m)}}return n.call(this)};u[i]=n,Function.prototype.toString=u;const f=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":f.call(this)}});let me=!1;if(typeof window<"u")try{const e=Object.defineProperty({},"passive",{get:function(){me=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{me=!1}const Et={useG:!0},ee={},Ke={},Je=new RegExp("^"+ke+"(\\w+)(true|false)$"),xe=x("propagationStopped");function Qe(e,n){const i=(n?n(e):e)+ie,r=(n?n(e):e)+se,c=ke+i,u=ke+r;ee[e]={},ee[e][ie]=c,ee[e][se]=u}function Tt(e,n,i){const r=i&&i.add||Se,c=i&&i.rm||Oe,u=i&&i.listeners||"eventListeners",f=i&&i.rmAll||"removeAllListeners",_=x(r),y="."+r+":",T="prependListener",m="."+T+":",S=function(E,d,L){if(E.isRemoved)return;const z=E.callback;"object"==typeof z&&z.handleEvent&&(E.callback=q=>z.handleEvent(q),E.originalDelegate=z),E.invoke(E,d,[L]);const j=E.options;j&&"object"==typeof j&&j.once&&d[c].call(d,L.type,E.originalDelegate?E.originalDelegate:E.callback,j)},D=function(E){if(!(E=E||e.event))return;const d=this||E.target||e,L=d[ee[E.type][ie]];if(L)if(1===L.length)S(L[0],d,E);else{const z=L.slice();for(let j=0;jfunction(c,u){c[xe]=!0,r&&r.apply(c,u)})}function yt(e,n,i,r,c){const u=Zone.__symbol__(r);if(n[u])return;const f=n[u]=n[r];n[r]=function(_,y,T){return y&&y.prototype&&c.forEach(function(m){const S=`${i}.${r}::`+m,D=y.prototype;if(D.hasOwnProperty(m)){const Z=e.ObjectGetOwnPropertyDescriptor(D,m);Z&&Z.value?(Z.value=e.wrapWithCurrentZone(Z.value,S),e._redefineProperty(y.prototype,m,Z)):D[m]&&(D[m]=e.wrapWithCurrentZone(D[m],S))}else D[m]&&(D[m]=e.wrapWithCurrentZone(D[m],S))}),f.call(n,_,y,T)},e.attachOriginToPatched(n[r],f)}const Ve=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],wt=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],tt=["load"],nt=["blur","error","focus","load","resize","scroll","messageerror"],Dt=["bounce","finish","start"],rt=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],Ee=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],St=["close","error","open","message"],Ot=["error","message"],Te=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Ve,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function ot(e,n,i){if(!i||0===i.length)return n;const r=i.filter(u=>u.target===e);if(!r||0===r.length)return n;const c=r[0].ignoreProperties;return n.filter(u=>-1===c.indexOf(u))}function W(e,n,i,r){e&&Ye(e,ot(e,n,i),r)}Zone.__load_patch("util",(e,n,i)=>{i.patchOnProperties=Ye,i.patchMethod=ce,i.bindArguments=Ae,i.patchMacroTask=_t;const r=n.__symbol__("BLACK_LISTED_EVENTS"),c=n.__symbol__("UNPATCHED_EVENTS");e[c]&&(e[r]=e[c]),e[r]&&(n[r]=n[c]=e[r]),i.patchEventPrototype=gt,i.patchEventTarget=Tt,i.isIEOrEdge=mt,i.ObjectDefineProperty=he,i.ObjectGetOwnPropertyDescriptor=ue,i.ObjectCreate=Be,i.ArraySlice=ut,i.patchClass=ve,i.wrapWithCurrentZone=Le,i.filterProperties=ot,i.attachOriginToPatched=ae,i._redefineProperty=Object.defineProperty,i.patchCallbacks=yt,i.getGlobalObjects=()=>({globalSources:Ke,zoneSymbolEventNames:ee,eventNames:Te,isBrowser:je,isMix:We,isNode:Re,TRUE_STR:se,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:ke,ADD_EVENT_LISTENER_STR:Se,REMOVE_EVENT_LISTENER_STR:Oe})});const Ne=x("zoneTask");function ge(e,n,i,r){let c=null,u=null;i+=r;const f={};function _(T){const m=T.data;return m.args[0]=function(){return T.invoke.apply(this,arguments)},m.handleId=c.apply(e,m.args),T}function y(T){return u.call(e,T.data.handleId)}c=ce(e,n+=r,T=>function(m,S){if("function"==typeof S[0]){const D={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?S[1]||0:void 0,args:S},Z=S[0];S[0]=function(){try{return Z.apply(this,arguments)}finally{D.isPeriodic||("number"==typeof D.handleId?delete f[D.handleId]:D.handleId&&(D.handleId[Ne]=null))}};const B=Me(n,S[0],D,_,y);if(!B)return B;const V=B.data.handleId;return"number"==typeof V?f[V]=B:V&&(V[Ne]=B),V&&V.ref&&V.unref&&"function"==typeof V.ref&&"function"==typeof V.unref&&(B.ref=V.ref.bind(V),B.unref=V.unref.bind(V)),"number"==typeof V||V?V:B}return T.apply(e,S)}),u=ce(e,i,T=>function(m,S){const D=S[0];let Z;"number"==typeof D?Z=f[D]:(Z=D&&D[Ne],Z||(Z=D)),Z&&"string"==typeof Z.type?"notScheduled"!==Z.state&&(Z.cancelFn&&Z.data.isPeriodic||0===Z.runCount)&&("number"==typeof D?delete f[D]:D&&(D[Ne]=null),Z.zone.cancelTask(Z)):T.apply(e,S)})}Zone.__load_patch("legacy",e=>{const n=e[Zone.__symbol__("legacyPatch")];n&&n()}),Zone.__load_patch("queueMicrotask",(e,n,i)=>{i.patchMethod(e,"queueMicrotask",r=>function(c,u){n.current.scheduleMicroTask("queueMicrotask",u[0])})}),Zone.__load_patch("timers",e=>{const n="set",i="clear";ge(e,n,i,"Timeout"),ge(e,n,i,"Interval"),ge(e,n,i,"Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{ge(e,"request","cancel","AnimationFrame"),ge(e,"mozRequest","mozCancel","AnimationFrame"),ge(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,n)=>{const i=["alert","prompt","confirm"];for(let r=0;rfunction(y,T){return n.current.run(u,e,T,_)})}),Zone.__load_patch("EventTarget",(e,n,i)=>{(function Mt(e,n){n.patchEventPrototype(e,n)})(e,i),function Lt(e,n){if(Zone[n.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:r,TRUE_STR:c,FALSE_STR:u,ZONE_SYMBOL_PREFIX:f}=n.getGlobalObjects();for(let y=0;y{ve("MutationObserver"),ve("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(e,n,i)=>{ve("IntersectionObserver")}),Zone.__load_patch("FileReader",(e,n,i)=>{ve("FileReader")}),Zone.__load_patch("on_property",(e,n,i)=>{!function Zt(e,n){if(Re&&!We||Zone[e.symbol("patchEvents")])return;const i=typeof WebSocket<"u",r=n.__Zone_ignore_on_properties;if(je){const f=window,_=function pt(){try{const e=pe.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:f,ignoreProperties:["error"]}]:[];W(f,Te.concat(["messageerror"]),r&&r.concat(_),de(f)),W(Document.prototype,Te,r),typeof f.SVGElement<"u"&&W(f.SVGElement.prototype,Te,r),W(Element.prototype,Te,r),W(HTMLElement.prototype,Te,r),W(HTMLMediaElement.prototype,wt,r),W(HTMLFrameSetElement.prototype,Ve.concat(nt),r),W(HTMLBodyElement.prototype,Ve.concat(nt),r),W(HTMLFrameElement.prototype,tt,r),W(HTMLIFrameElement.prototype,tt,r);const y=f.HTMLMarqueeElement;y&&W(y.prototype,Dt,r);const T=f.Worker;T&&W(T.prototype,Ot,r)}const c=n.XMLHttpRequest;c&&W(c.prototype,rt,r);const u=n.XMLHttpRequestEventTarget;u&&W(u&&u.prototype,rt,r),typeof IDBIndex<"u"&&(W(IDBIndex.prototype,Ee,r),W(IDBRequest.prototype,Ee,r),W(IDBOpenDBRequest.prototype,Ee,r),W(IDBDatabase.prototype,Ee,r),W(IDBTransaction.prototype,Ee,r),W(IDBCursor.prototype,Ee,r)),i&&W(WebSocket.prototype,St,r)}(i,e)}),Zone.__load_patch("customElements",(e,n,i)=>{!function It(e,n){const{isBrowser:i,isMix:r}=n.getGlobalObjects();(i||r)&&e.customElements&&"customElements"in e&&n.patchCallbacks(n,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,i)}),Zone.__load_patch("XHR",(e,n)=>{!function y(T){const m=T.XMLHttpRequest;if(!m)return;const S=m.prototype;let Z=S[Ze],B=S[Ie];if(!Z){const v=T.XMLHttpRequestEventTarget;if(v){const M=v.prototype;Z=M[Ze],B=M[Ie]}}const V="readystatechange",E="scheduled";function d(v){const M=v.data,R=M.target;R[u]=!1,R[_]=!1;const J=R[c];Z||(Z=R[Ze],B=R[Ie]),J&&B.call(R,V,J);const le=R[c]=()=>{if(R.readyState===R.DONE)if(!M.aborted&&R[u]&&v.state===E){const te=R[n.__symbol__("loadfalse")];if(0!==R.status&&te&&te.length>0){const re=v.invoke;v.invoke=function(){const F=R[n.__symbol__("loadfalse")];for(let I=0;Ifunction(v,M){return v[r]=0==M[2],v[f]=M[1],j.apply(v,M)}),O=x("fetchTaskAborting"),X=x("fetchTaskScheduling"),A=ce(S,"send",()=>function(v,M){if(!0===n.current[X]||v[r])return A.apply(v,M);{const R={target:v,url:v[f],isPeriodic:!1,args:M,aborted:!1},J=Me("XMLHttpRequest.send",L,R,d,z);v&&!0===v[_]&&!R.aborted&&J.state===E&&J.invoke()}}),Y=ce(S,"abort",()=>function(v,M){const R=function D(v){return v[i]}(v);if(R&&"string"==typeof R.type){if(null==R.cancelFn||R.data&&R.data.aborted)return;R.zone.cancelTask(R)}else if(!0===n.current[O])return Y.apply(v,M)})}(e);const i=x("xhrTask"),r=x("xhrSync"),c=x("xhrListener"),u=x("xhrScheduled"),f=x("xhrURL"),_=x("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&function dt(e,n){const i=e.constructor.name;for(let r=0;r{const y=function(){return _.apply(this,Ae(arguments,i+"."+c))};return ae(y,_),y})(u)}}}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,n)=>{function i(r){return function(c){et(e,r).forEach(f=>{const _=e.PromiseRejectionEvent;if(_){const y=new _(r,{promise:c.promise,reason:c.rejection});f.invoke(y)}})}}e.PromiseRejectionEvent&&(n[x("unhandledPromiseRejectionHandler")]=i("unhandledrejection"),n[x("rejectionHandledHandler")]=i("rejectionhandled"))})}},we=>{we(we.s=435)}]); - -"use strict";(self.webpackChunkcoverage_app=self.webpackChunkcoverage_app||[]).push([[179],{938:()=>{function me(e){return"function"==typeof e}function jo(e){const t=e(r=>{Error.call(r),r.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const $o=jo(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((r,o)=>`${o+1}) ${r.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function Rr(e,n){if(e){const t=e.indexOf(n);0<=t&&e.splice(t,1)}}class Tt{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._teardowns=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const i of t)i.remove(this);else t.remove(this);const{initialTeardown:r}=this;if(me(r))try{r()}catch(i){n=i instanceof $o?i.errors:[i]}const{_teardowns:o}=this;if(o){this._teardowns=null;for(const i of o)try{du(i)}catch(s){n=n??[],s instanceof $o?n=[...n,...s.errors]:n.push(s)}}if(n)throw new $o(n)}}add(n){var t;if(n&&n!==this)if(this.closed)du(n);else{if(n instanceof Tt){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._teardowns=null!==(t=this._teardowns)&&void 0!==t?t:[]).push(n)}}_hasParent(n){const{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){const{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&Rr(t,n)}remove(n){const{_teardowns:t}=this;t&&Rr(t,n),n instanceof Tt&&n._removeParent(this)}}Tt.EMPTY=(()=>{const e=new Tt;return e.closed=!0,e})();const cu=Tt.EMPTY;function uu(e){return e instanceof Tt||e&&"closed"in e&&me(e.remove)&&me(e.add)&&me(e.unsubscribe)}function du(e){me(e)?e():e.unsubscribe()}const wn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Uo={setTimeout(...e){const{delegate:n}=Uo;return(n?.setTimeout||setTimeout)(...e)},clearTimeout(e){const{delegate:n}=Uo;return(n?.clearTimeout||clearTimeout)(e)},delegate:void 0};function fu(e){Uo.setTimeout(()=>{const{onUnhandledError:n}=wn;if(!n)throw e;n(e)})}function zo(){}const cv=As("C",void 0,void 0);function As(e,n,t){return{kind:e,value:n,error:t}}let bn=null;function Go(e){if(wn.useDeprecatedSynchronousErrorHandling){const n=!bn;if(n&&(bn={errorThrown:!1,error:null}),e(),n){const{errorThrown:t,error:r}=bn;if(bn=null,t)throw r}}else e()}class Ts extends Tt{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,uu(n)&&n.add(this)):this.destination=hv}static create(n,t,r){return new xs(n,t,r)}next(n){this.isStopped?Fs(function dv(e){return As("N",e,void 0)}(n),this):this._next(n)}error(n){this.isStopped?Fs(function uv(e){return As("E",void 0,e)}(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Fs(cv,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}class xs extends Ts{constructor(n,t,r){let o;if(super(),me(n))o=n;else if(n){let i;({next:o,error:t,complete:r}=n),this&&wn.useDeprecatedNextContext?(i=Object.create(n),i.unsubscribe=()=>this.unsubscribe()):i=n,o=o?.bind(i),t=t?.bind(i),r=r?.bind(i)}this.destination={next:o?Ns(o):zo,error:Ns(t??hu),complete:r?Ns(r):zo}}}function Ns(e,n){return(...t)=>{try{e(...t)}catch(r){wn.useDeprecatedSynchronousErrorHandling?function fv(e){wn.useDeprecatedSynchronousErrorHandling&&bn&&(bn.errorThrown=!0,bn.error=e)}(r):fu(r)}}}function hu(e){throw e}function Fs(e,n){const{onStoppedNotification:t}=wn;t&&Uo.setTimeout(()=>t(e,n))}const hv={closed:!0,next:zo,error:hu,complete:zo},Os="function"==typeof Symbol&&Symbol.observable||"@@observable";function pu(e){return e}let ze=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const r=new e;return r.source=this,r.operator=t,r}subscribe(t,r,o){const i=function gv(e){return e&&e instanceof Ts||function pv(e){return e&&me(e.next)&&me(e.error)&&me(e.complete)}(e)&&uu(e)}(t)?t:new xs(t,r,o);return Go(()=>{const{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(t){try{return this._subscribe(t)}catch(r){t.error(r)}}forEach(t,r){return new(r=mu(r))((o,i)=>{let s;s=this.subscribe(a=>{try{t(a)}catch(l){i(l),s?.unsubscribe()}},i,o)})}_subscribe(t){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(t)}[Os](){return this}pipe(...t){return function gu(e){return 0===e.length?pu:1===e.length?e[0]:function(t){return e.reduce((r,o)=>o(r),t)}}(t)(this)}toPromise(t){return new(t=mu(t))((r,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>r(i))})}}return e.create=n=>new e(n),e})();function mu(e){var n;return null!==(n=e??wn.Promise)&&void 0!==n?n:Promise}const mv=jo(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Rs=(()=>{class e extends ze{constructor(){super(),this.closed=!1,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const r=new _u(this,this);return r.operator=t,r}_throwIfClosed(){if(this.closed)throw new mv}next(t){Go(()=>{if(this._throwIfClosed(),!this.isStopped){const r=this.observers.slice();for(const o of r)o.next(t)}})}error(t){Go(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:r}=this;for(;r.length;)r.shift().error(t)}})}complete(){Go(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:r,isStopped:o,observers:i}=this;return r||o?cu:(i.push(t),new Tt(()=>Rr(i,t)))}_checkFinalizedStatuses(t){const{hasError:r,thrownError:o,isStopped:i}=this;r?t.error(o):i&&t.complete()}asObservable(){const t=new ze;return t.source=this,t}}return e.create=(n,t)=>new _u(n,t),e})();class _u extends Rs{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,n)}error(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,n)}complete(){var n,t;null===(t=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===t||t.call(n)}_subscribe(n){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(n))&&void 0!==r?r:cu}}function zn(e){return n=>{if(function _v(e){return me(e?.lift)}(n))return n.lift(function(t){try{return e(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}class Gn extends Ts{constructor(n,t,r,o,i){super(n),this.onFinalize=i,this._next=t?function(s){try{t(s)}catch(a){n.error(a)}}:super._next,this._error=o?function(s){try{o(s)}catch(a){n.error(a)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(s){n.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;const{closed:t}=this;super.unsubscribe(),!t&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}function Ps(e,n){return zn((t,r)=>{let o=0;t.subscribe(new Gn(r,i=>{r.next(e.call(n,i,o++))}))})}function En(e){return this instanceof En?(this.v=e,this):new En(e)}function Cv(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=t.apply(e,n||[]),i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(h){r[h]&&(o[h]=function(p){return new Promise(function(m,D){i.push([h,p,m,D])>1||a(h,p)})})}function a(h,p){try{!function l(h){h.value instanceof En?Promise.resolve(h.value.v).then(c,u):d(i[0][2],h)}(r[h](p))}catch(m){d(i[0][3],m)}}function c(h){a("next",h)}function u(h){a("throw",h)}function d(h,p){h(p),i.shift(),i.length&&a(i[0][0],i[0][1])}}function Dv(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function Cu(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(s){return new Promise(function(a,l){!function o(i,s,a,l){Promise.resolve(l).then(function(c){i({value:c,done:a})},s)}(a,l,(s=e[i](s)).done,s.value)})}}}const Du=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function wu(e){return me(e?.then)}function bu(e){return me(e[Os])}function Eu(e){return Symbol.asyncIterator&&me(e?.[Symbol.asyncIterator])}function Iu(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Mu=function bv(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Su(e){return me(e?.[Mu])}function Au(e){return Cv(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:r,done:o}=yield En(t.read());if(o)return yield En(void 0);yield yield En(r)}}finally{t.releaseLock()}})}function Tu(e){return me(e?.getReader)}function In(e){if(e instanceof ze)return e;if(null!=e){if(bu(e))return function Ev(e){return new ze(n=>{const t=e[Os]();if(me(t.subscribe))return t.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(Du(e))return function Iv(e){return new ze(n=>{for(let t=0;t{e.then(t=>{n.closed||(n.next(t),n.complete())},t=>n.error(t)).then(null,fu)})}(e);if(Eu(e))return xu(e);if(Su(e))return function Sv(e){return new ze(n=>{for(const t of e)if(n.next(t),n.closed)return;n.complete()})}(e);if(Tu(e))return function Av(e){return xu(Au(e))}(e)}throw Iu(e)}function xu(e){return new ze(n=>{(function Tv(e,n){var t,r,o,i;return function vv(e,n,t,r){return new(t||(t=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):function o(i){return i instanceof t?i:new t(function(s){s(i)})}(u.value).then(a,l)}c((r=r.apply(e,n||[])).next())})}(this,void 0,void 0,function*(){try{for(t=Dv(e);!(r=yield t.next()).done;)if(n.next(r.value),n.closed)return}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=t.return)&&(yield i.call(t))}finally{if(o)throw o.error}}n.complete()})})(e,n).catch(t=>n.error(t))})}function rn(e,n,t,r=0,o=!1){const i=n.schedule(function(){t(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function Nu(e,n,t=1/0){return me(n)?Nu((r,o)=>Ps((i,s)=>n(r,i,o,s))(In(e(r,o))),t):("number"==typeof n&&(t=n),zn((r,o)=>function xv(e,n,t,r,o,i,s,a){const l=[];let c=0,u=0,d=!1;const h=()=>{d&&!l.length&&!c&&n.complete()},p=D=>c{i&&n.next(D),c++;let I=!1;In(t(D,u++)).subscribe(new Gn(n,S=>{o?.(S),i?p(S):n.next(S)},()=>{I=!0},void 0,()=>{if(I)try{for(c--;l.length&&cm(S)):m(S)}h()}catch(S){n.error(S)}}))};return e.subscribe(new Gn(n,p,()=>{d=!0,h()})),()=>{a?.()}}(r,o,e,t)))}const Ls=new ze(e=>e.complete());function Vs(e){return e[e.length-1]}function Fu(e,n=0){return zn((t,r)=>{t.subscribe(new Gn(r,o=>rn(r,e,()=>r.next(o),n),()=>rn(r,e,()=>r.complete(),n),o=>rn(r,e,()=>r.error(o),n)))})}function Ou(e,n=0){return zn((t,r)=>{r.add(e.schedule(()=>t.subscribe(r),n))})}function Ru(e,n){if(!e)throw new Error("Iterable cannot be null");return new ze(t=>{rn(t,n,()=>{const r=e[Symbol.asyncIterator]();rn(t,n,()=>{r.next().then(o=>{o.done?t.complete():t.next(o.value)})},0,!0)})})}function Bs(e,n){return n?function $v(e,n){if(null!=e){if(bu(e))return function Lv(e,n){return In(e).pipe(Ou(n),Fu(n))}(e,n);if(Du(e))return function Bv(e,n){return new ze(t=>{let r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}(e,n);if(wu(e))return function Vv(e,n){return In(e).pipe(Ou(n),Fu(n))}(e,n);if(Eu(e))return Ru(e,n);if(Su(e))return function Hv(e,n){return new ze(t=>{let r;return rn(t,n,()=>{r=e[Mu](),rn(t,n,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){return void t.error(s)}i?t.complete():t.next(o)},0,!0)}),()=>me(r?.return)&&r.return()})}(e,n);if(Tu(e))return function jv(e,n){return Ru(Au(e),n)}(e,n)}throw Iu(e)}(e,n):In(e)}function Uv(...e){const n=function Pv(e){return function Ov(e){return e&&me(e.schedule)}(Vs(e))?e.pop():void 0}(e),t=function kv(e,n){return"number"==typeof Vs(e)?e.pop():n}(e,1/0),r=e;return r.length?1===r.length?In(r[0]):function Nv(e=1/0){return Nu(pu,e)}(t)(Bs(r,n)):Ls}function Hs(e,n,...t){return!0===n?(e(),null):!1===n?null:n(...t).pipe(function zv(e){return e<=0?()=>Ls:zn((n,t)=>{let r=0;n.subscribe(new Gn(t,o=>{++r<=e&&(t.next(o),e<=r&&t.complete())}))})}(1)).subscribe(()=>e())}function ae(e){for(let n in e)if(e[n]===ae)return n;throw Error("Could not find renamed property on target object.")}function js(e,n){for(const t in n)n.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function ce(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(ce).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const n=e.toString();if(null==n)return""+n;const t=n.indexOf("\n");return-1===t?n:n.substring(0,t)}function $s(e,n){return null==e||""===e?null===n?"":n:null==n||""===n?e:e+" "+n}const Wv=ae({__forward_ref__:ae});function ue(e){return e.__forward_ref__=ue,e.toString=function(){return ce(this())},e}function P(e){return Us(e)?e():e}function Us(e){return"function"==typeof e&&e.hasOwnProperty(Wv)&&e.__forward_ref__===ue}function zs(e){return e&&!!e.\u0275providers}const Pu="https://g.co/ng/security#xss";class A extends Error{constructor(n,t){super(function Wo(e,n){return`NG0${Math.abs(e)}${n?": "+n.trim():""}`}(n,t)),this.code=n}}function j(e){return"string"==typeof e?e:null==e?"":String(e)}function qo(e,n){throw new A(-201,!1)}function ut(e,n){null==e&&function re(e,n,t,r){throw new Error(`ASSERTION ERROR: ${e}`+(null==r?"":` [Expected=> ${t} ${r} ${n} <=Actual]`))}(n,e,null,"!=")}function de(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function $t(e){return{providers:e.providers||[],imports:e.imports||[]}}function Zo(e){return ku(e,Qo)||ku(e,Vu)}function ku(e,n){return e.hasOwnProperty(n)?e[n]:null}function Lu(e){return e&&(e.hasOwnProperty(Gs)||e.hasOwnProperty(ey))?e[Gs]:null}const Qo=ae({\u0275prov:ae}),Gs=ae({\u0275inj:ae}),Vu=ae({ngInjectableDef:ae}),ey=ae({ngInjectorDef:ae});var B=(()=>((B=B||{})[B.Default=0]="Default",B[B.Host=1]="Host",B[B.Self=2]="Self",B[B.SkipSelf=4]="SkipSelf",B[B.Optional=8]="Optional",B))();let Ws;function dt(e){const n=Ws;return Ws=e,n}function Bu(e,n,t){const r=Zo(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&B.Optional?null:void 0!==n?n:void qo(ce(e))}const fe=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),Pr={},qs="__NG_DI_FLAG__",Yo="ngTempTokenPath",ry=/\n/gm,Hu="__source";let kr;function Wn(e){const n=kr;return kr=e,n}function iy(e,n=B.Default){if(void 0===kr)throw new A(-203,!1);return null===kr?Bu(e,void 0,n):kr.get(e,n&B.Optional?null:void 0,n)}function oe(e,n=B.Default){return(function ty(){return Ws}()||iy)(P(e),n)}function Ko(e){return typeof e>"u"||"number"==typeof e?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Zs(e){const n=[];for(let t=0;t((_t=_t||{})[_t.OnPush=0]="OnPush",_t[_t.Default=1]="Default",_t))(),xt=(()=>{return(e=xt||(xt={}))[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",xt;var e})();const Ut={},te=[],Jo=ae({\u0275cmp:ae}),Qs=ae({\u0275dir:ae}),Ys=ae({\u0275pipe:ae}),$u=ae({\u0275mod:ae}),zt=ae({\u0275fac:ae}),Vr=ae({__NG_ELEMENT_ID__:ae});let uy=0;function Nt(e){return sn(()=>{const t=!0===e.standalone,r={},o={type:e.type,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:r,inputs:null,outputs:null,exportAs:e.exportAs||null,onPush:e.changeDetection===_t.OnPush,directiveDefs:null,pipeDefs:null,standalone:t,dependencies:t&&e.dependencies||null,getStandaloneInjector:null,selectors:e.selectors||te,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||xt.Emulated,id:"c"+uy++,styles:e.styles||te,_:null,setInput:null,schemas:e.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},i=e.dependencies,s=e.features;return o.inputs=Gu(e.inputs,r),o.outputs=Gu(e.outputs),s&&s.forEach(a=>a(o)),o.directiveDefs=i?()=>("function"==typeof i?i():i).map(Uu).filter(zu):null,o.pipeDefs=i?()=>("function"==typeof i?i():i).map(Ge).filter(zu):null,o})}function Uu(e){return ie(e)||ke(e)}function zu(e){return null!==e}function an(e){return sn(()=>({type:e.type,bootstrap:e.bootstrap||te,declarations:e.declarations||te,imports:e.imports||te,exports:e.exports||te,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Gu(e,n){if(null==e)return Ut;const t={};for(const r in e)if(e.hasOwnProperty(r)){let o=e[r],i=o;Array.isArray(o)&&(i=o[1],o=o[0]),t[o]=r,n&&(n[o]=i)}return t}const $=Nt;function Je(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function ie(e){return e[Jo]||null}function ke(e){return e[Qs]||null}function Ge(e){return e[Ys]||null}const Z=11;function ot(e){return Array.isArray(e)&&"object"==typeof e[1]}function yt(e){return Array.isArray(e)&&!0===e[1]}function Xs(e){return 0!=(4&e.flags)}function Ur(e){return e.componentOffset>-1}function ri(e){return 1==(1&e.flags)}function Ct(e){return null!==e.template}function hy(e){return 0!=(256&e[2])}function Sn(e,n){return e.hasOwnProperty(zt)?e[zt]:null}class my{constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function Wt(){return Ku}function Ku(e){return e.type.prototype.ngOnChanges&&(e.setInput=vy),_y}function _y(){const e=Xu(this),n=e?.current;if(n){const t=e.previous;if(t===Ut)e.previous=n;else for(let r in n)t[r]=n[r];e.current=null,this.ngOnChanges(n)}}function vy(e,n,t,r){const o=this.declaredInputs[t],i=Xu(e)||function yy(e,n){return e[Ju]=n}(e,{previous:Ut,current:null}),s=i.current||(i.current={}),a=i.previous,l=a[o];s[o]=new my(l&&l.currentValue,n,a===Ut),e[r]=n}Wt.ngInherit=!0;const Ju="__ngSimpleChanges__";function Xu(e){return e[Ju]||null}function Re(e){for(;Array.isArray(e);)e=e[0];return e}function oi(e,n){return Re(n[e])}function it(e,n){return Re(n[e.index])}function nd(e,n){return e.data[n]}function st(e,n){const t=n[e];return ot(t)?t:t[0]}function ii(e){return 64==(64&e[2])}function ln(e,n){return null==n?null:e[n]}function rd(e){e[18]=0}function ta(e,n){e[5]+=n;let t=e,r=e[3];for(;null!==r&&(1===n&&1===t[5]||-1===n&&0===t[5]);)r[5]+=n,t=r,r=r[3]}const U={lFrame:hd(null),bindingsEnabled:!0};function id(){return U.bindingsEnabled}function E(){return U.lFrame.lView}function ee(){return U.lFrame.tView}function Q(e){return U.lFrame.contextLView=e,e[8]}function Y(e){return U.lFrame.contextLView=null,e}function Pe(){let e=sd();for(;null!==e&&64===e.type;)e=e.parent;return e}function sd(){return U.lFrame.currentTNode}function Ot(e,n){const t=U.lFrame;t.currentTNode=e,t.isParent=n}function na(){return U.lFrame.isParent}function ra(){U.lFrame.isParent=!1}function qe(){const e=U.lFrame;let n=e.bindingRootIndex;return-1===n&&(n=e.bindingRootIndex=e.tView.bindingStartIndex),n}function Jn(){return U.lFrame.bindingIndex++}function Zt(e){const n=U.lFrame,t=n.bindingIndex;return n.bindingIndex=n.bindingIndex+e,t}function Fy(e,n){const t=U.lFrame;t.bindingIndex=t.bindingRootIndex=e,oa(n)}function oa(e){U.lFrame.currentDirectiveIndex=e}function sa(e){U.lFrame.currentQueryIndex=e}function Ry(e){const n=e[1];return 2===n.type?n.declTNode:1===n.type?e[6]:null}function dd(e,n,t){if(t&B.SkipSelf){let o=n,i=e;for(;!(o=o.parent,null!==o||t&B.Host||(o=Ry(i),null===o||(i=i[15],10&o.type))););if(null===o)return!1;n=o,e=i}const r=U.lFrame=fd();return r.currentTNode=n,r.lView=e,!0}function aa(e){const n=fd(),t=e[1];U.lFrame=n,n.currentTNode=t.firstChild,n.lView=e,n.tView=t,n.contextLView=e,n.bindingIndex=t.bindingStartIndex,n.inI18n=!1}function fd(){const e=U.lFrame,n=null===e?null:e.child;return null===n?hd(e):n}function hd(e){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=n),n}function pd(){const e=U.lFrame;return U.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const gd=pd;function la(){const e=pd();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Ze(){return U.lFrame.selectedIndex}function An(e){U.lFrame.selectedIndex=e}function _e(){const e=U.lFrame;return nd(e.tView,e.selectedIndex)}function si(e,n){for(let t=n.directiveStart,r=n.directiveEnd;t=r)break}else n[l]<0&&(e[18]+=65536),(a>11>16&&(3&e[2])===n){e[2]+=2048;try{i.call(a)}finally{}}}else try{i.call(a)}finally{}}class Gr{constructor(n,t,r){this.factory=n,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}function da(e,n,t){let r=0;for(;rn){s=i-1;break}}}for(;i>16}(e),r=n;for(;t>0;)r=r[15],t--;return r}let fa=!0;function di(e){const n=fa;return fa=e,n}let qy=0;const Rt={};function fi(e,n){const t=Ed(e,n);if(-1!==t)return t;const r=n[1];r.firstCreatePass&&(e.injectorIndex=n.length,ha(r.data,e),ha(n,null),ha(r.blueprint,null));const o=pa(e,n),i=e.injectorIndex;if(Dd(o)){const s=ci(o),a=ui(o,n),l=a[1].data;for(let c=0;c<8;c++)n[i+c]=a[s+c]|l[s+c]}return n[i+8]=o,i}function ha(e,n){e.push(0,0,0,0,0,0,0,0,n)}function Ed(e,n){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===n[e.injectorIndex+8]?-1:e.injectorIndex}function pa(e,n){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,r=null,o=n;for(;null!==o;){if(r=Nd(o),null===r)return-1;if(t++,o=o[15],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return-1}function ga(e,n,t){!function Zy(e,n,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(Vr)&&(r=t[Vr]),null==r&&(r=t[Vr]=qy++);const o=255&r;n.data[e+(o>>5)]|=1<=0?255&n:Jy:n}(t);if("function"==typeof i){if(!dd(n,e,r))return r&B.Host?Id(o,0,r):Md(n,t,r,o);try{const s=i(r);if(null!=s||r&B.Optional)return s;qo()}finally{gd()}}else if("number"==typeof i){let s=null,a=Ed(e,n),l=-1,c=r&B.Host?n[16][6]:null;for((-1===a||r&B.SkipSelf)&&(l=-1===a?pa(e,n):n[a+8],-1!==l&&xd(r,!1)?(s=n[1],a=ci(l),n=ui(l,n)):a=-1);-1!==a;){const u=n[1];if(Td(i,a,u.data)){const d=Yy(a,n,t,s,r,c);if(d!==Rt)return d}l=n[a+8],-1!==l&&xd(r,n[1].data[a+8]===c)&&Td(i,a,n)?(s=u,a=ci(l),n=ui(l,n)):a=-1}}return o}function Yy(e,n,t,r,o,i){const s=n[1],a=s.data[e+8],u=function hi(e,n,t,r,o){const i=e.providerIndexes,s=n.data,a=1048575&i,l=e.directiveStart,u=i>>20,h=o?a+u:e.directiveEnd;for(let p=r?a:a+u;p=l&&m.type===t)return p}if(o){const p=s[l];if(p&&Ct(p)&&p.type===t)return l}return null}(a,s,t,null==r?Ur(a)&&fa:r!=s&&0!=(3&a.type),o&B.Host&&i===a);return null!==u?Tn(n,s,u,a):Rt}function Tn(e,n,t,r){let o=e[t];const i=n.data;if(function Uy(e){return e instanceof Gr}(o)){const s=o;s.resolving&&function qv(e,n){const t=n?`. Dependency path: ${n.join(" > ")} > ${e}`:"";throw new A(-200,`Circular dependency in DI detected for ${e}${t}`)}(function ne(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():j(e)}(i[t]));const a=di(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?dt(s.injectImpl):null;dd(e,r,B.Default);try{o=e[t]=s.factory(void 0,i,e,r),n.firstCreatePass&&t>=r.directiveStart&&function jy(e,n,t){const{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=n.type.prototype;if(r){const s=Ku(n);(t.preOrderHooks||(t.preOrderHooks=[])).push(e,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(e,s)}o&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-e,o),i&&((t.preOrderHooks||(t.preOrderHooks=[])).push(e,i),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(e,i))}(t,i[t],n)}finally{null!==l&&dt(l),di(a),s.resolving=!1,gd()}}return o}function Td(e,n,t){return!!(t[n+(e>>5)]&1<{const n=e.prototype.constructor,t=n[zt]||ma(n),r=Object.prototype;let o=Object.getPrototypeOf(e.prototype).constructor;for(;o&&o!==r;){const i=o[zt]||ma(o);if(i&&i!==t)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function ma(e){return Us(e)?()=>{const n=ma(P(e));return n&&n()}:Sn(e)}function Nd(e){const n=e[1],t=n.type;return 2===t?n.declTNode:1===t?e[6]:null}const nr="__parameters__";function or(e,n,t){return sn(()=>{const r=function va(e){return function(...t){if(e){const r=e(...t);for(const o in r)this[o]=r[o]}}}(n);function o(...i){if(this instanceof o)return r.apply(this,i),this;const s=new o(...i);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(nr)?l[nr]:Object.defineProperty(l,nr,{value:[]})[nr];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return t&&(o.prototype=Object.create(t.prototype)),o.prototype.ngMetadataName=e,o.annotationCls=o,o})}class H{constructor(n,t){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=de({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function xn(e,n){e.forEach(t=>Array.isArray(t)?xn(t,n):n(t))}function Od(e,n,t){n>=e.length?e.push(t):e.splice(n,0,t)}function pi(e,n){return n>=e.length-1?e.pop():e.splice(n,1)[0]}function at(e,n,t){let r=ir(e,n);return r>=0?e[1|r]=t:(r=~r,function rC(e,n,t,r){let o=e.length;if(o==n)e.push(t,r);else if(1===o)e.push(r,e[0]),e[0]=t;else{for(o--,e.push(e[o-1],e[o]);o>n;)e[o]=e[o-2],o--;e[n]=t,e[n+1]=r}}(e,r,n,t)),r}function Ca(e,n){const t=ir(e,n);if(t>=0)return e[1|t]}function ir(e,n){return function Rd(e,n,t){let r=0,o=e.length>>t;for(;o!==r;){const i=r+(o-r>>1),s=e[i<n?o=i:r=i+1}return~(o<((Xe=Xe||{})[Xe.Important=1]="Important",Xe[Xe.DashCase=2]="DashCase",Xe))();const Ma=new Map;let IC=0;const Aa="__ngContext__";function He(e,n){ot(n)?(e[Aa]=n[20],function SC(e){Ma.set(e[20],e)}(n)):e[Aa]=n}function xa(e,n){return undefined(e,n)}function Xr(e){const n=e[3];return yt(n)?n[3]:n}function Na(e){return ef(e[13])}function Fa(e){return ef(e[4])}function ef(e){for(;null!==e&&!yt(e);)e=e[4];return e}function ar(e,n,t,r,o){if(null!=r){let i,s=!1;yt(r)?i=r:ot(r)&&(s=!0,r=r[0]);const a=Re(r);0===e&&null!==t?null==o?af(n,t,a):Nn(n,t,a,o||null,!0):1===e&&null!==t?Nn(n,t,a,o||null,!0):2===e?function Ba(e,n,t){const r=Ci(e,n);r&&function qC(e,n,t,r){e.removeChild(n,t,r)}(e,r,n,t)}(n,a,s):3===e&&n.destroyNode(a),null!=i&&function YC(e,n,t,r,o){const i=t[7];i!==Re(t)&&ar(n,e,r,i,o);for(let a=10;a0&&(e[t-1][4]=r[4]);const i=pi(e,10+n);!function BC(e,n){eo(e,n,n[Z],2,null,null),n[0]=null,n[6]=null}(r[1],r);const s=i[19];null!==s&&s.detachView(i[1]),r[3]=null,r[4]=null,r[2]&=-65}return r}function rf(e,n){if(!(128&n[2])){const t=n[Z];t.destroyNode&&eo(e,n,t,3,null,null),function $C(e){let n=e[13];if(!n)return ka(e[1],e);for(;n;){let t=null;if(ot(n))t=n[13];else{const r=n[10];r&&(t=r)}if(!t){for(;n&&!n[4]&&n!==e;)ot(n)&&ka(n[1],n),n=n[3];null===n&&(n=e),ot(n)&&ka(n[1],n),t=n&&n[4]}n=t}}(n)}}function ka(e,n){if(!(128&n[2])){n[2]&=-65,n[2]|=128,function WC(e,n){let t;if(null!=e&&null!=(t=e.destroyHooks))for(let r=0;r=0?r[o=s]():r[o=-s].unsubscribe(),i+=2}else{const s=r[o=t[i+1]];t[i].call(s)}if(null!==r){for(let i=o+1;i-1){const{encapsulation:i}=e.data[r.directiveStart+o];if(i===xt.None||i===xt.Emulated)return null}return it(r,t)}}(e,n.parent,t)}function Nn(e,n,t,r,o){e.insertBefore(n,t,r,o)}function af(e,n,t){e.appendChild(n,t)}function lf(e,n,t,r,o){null!==r?Nn(e,n,t,r,o):af(e,n,t)}function Ci(e,n){return e.parentNode(n)}let $a,df=function uf(e,n,t){return 40&e.type?it(e,t):null};function Di(e,n,t,r){const o=of(e,r,n),i=n[Z],a=function cf(e,n,t){return df(e,n,t)}(r.parent||n[6],r,n);if(null!=o)if(Array.isArray(t))for(let l=0;l((Me=Me||{})[Me.NONE=0]="NONE",Me[Me.HTML=1]="HTML",Me[Me.STYLE=2]="STYLE",Me[Me.SCRIPT=3]="SCRIPT",Me[Me.URL=4]="URL",Me[Me.RESOURCE_URL=5]="RESOURCE_URL",Me))();function un(e){const n=function ro(){const e=E();return e&&e[12]}();return n?n.sanitize(Me.URL,e)||"":function to(e,n){const t=function lD(e){return e instanceof Df&&e.getTypeName()||null}(e);if(null!=t&&t!==n){if("ResourceURL"===t&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${t} (see ${Pu})`)}return t===n}(e,"URL")?cn(e):function za(e){return(e=String(e)).match(fD)?e:"unsafe:"+e}(j(e))}const Tf=new H("ENVIRONMENT_INITIALIZER"),xf=new H("INJECTOR",-1),Nf=new H("INJECTOR_DEF_TYPES");class Ff{get(n,t=Pr){if(t===Pr){const r=new Error(`NullInjectorError: No provider for ${ce(n)}!`);throw r.name="NullInjectorError",r}return t}}function MD(...e){return{\u0275providers:Of(0,e),\u0275fromNgModule:!0}}function Of(e,...n){const t=[],r=new Set;let o;return xn(n,i=>{const s=i;Za(s,t,[],r)&&(o||(o=[]),o.push(s))}),void 0!==o&&Rf(o,t),t}function Rf(e,n){for(let t=0;t{n.push(i)})}}function Za(e,n,t,r){if(!(e=P(e)))return!1;let o=null,i=Lu(e);const s=!i&&ie(e);if(i||s){if(s&&!s.standalone)return!1;o=e}else{const l=e.ngModule;if(i=Lu(l),!i)return!1;o=l}const a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)Za(c,n,t,r)}}else{if(!i)return!1;{if(null!=i.imports&&!a){let c;r.add(o);try{xn(i.imports,u=>{Za(u,n,t,r)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&Rf(c,n)}if(!a){const c=Sn(o)||(()=>new o);n.push({provide:o,useFactory:c,deps:te},{provide:Nf,useValue:o,multi:!0},{provide:Tf,useValue:()=>oe(o),multi:!0})}const l=i.providers;null==l||a||Qa(l,u=>{n.push(u)})}}return o!==e&&void 0!==e.providers}function Qa(e,n){for(let t of e)zs(t)&&(t=t.\u0275providers),Array.isArray(t)?Qa(t,n):n(t)}const SD=ae({provide:String,useValue:ae});function Ya(e){return null!==e&&"object"==typeof e&&SD in e}function On(e){return"function"==typeof e}const Ka=new H("Set Injector scope."),Mi={},TD={};let Ja;function Si(){return void 0===Ja&&(Ja=new Ff),Ja}class lr{}class Lf extends lr{get destroyed(){return this._destroyed}constructor(n,t,r,o){super(),this.parent=t,this.source=r,this.scopes=o,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,el(n,s=>this.processProvider(s)),this.records.set(xf,cr(void 0,this)),o.has("environment")&&this.records.set(lr,cr(void 0,this));const i=this.records.get(Ka);null!=i&&"string"==typeof i.value&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Nf.multi,te,B.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const t=Wn(this),r=dt(void 0);try{return n()}finally{Wn(t),dt(r)}}get(n,t=Pr,r=B.Default){this.assertNotDestroyed(),r=Ko(r);const o=Wn(this),i=dt(void 0);try{if(!(r&B.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function RD(e){return"function"==typeof e||"object"==typeof e&&e instanceof H}(n)&&Zo(n);a=l&&this.injectableDefInScope(l)?cr(Xa(n),Mi):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(r&B.Self?Si():this.parent).get(n,t=r&B.Optional&&t===Pr?null:t)}catch(s){if("NullInjectorError"===s.name){if((s[Yo]=s[Yo]||[]).unshift(ce(n)),o)throw s;return function ly(e,n,t,r){const o=e[Yo];throw n[Hu]&&o.unshift(n[Hu]),e.message=function cy(e,n,t,r=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let o=ce(n);if(Array.isArray(n))o=n.map(ce).join(" -> ");else if("object"==typeof n){let i=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];i.push(s+":"+("string"==typeof a?JSON.stringify(a):ce(a)))}o=`{${i.join(", ")}}`}return`${t}${r?"("+r+")":""}[${o}]: ${e.replace(ry,"\n ")}`}("\n"+e.message,o,t,r),e.ngTokenPath=o,e[Yo]=null,e}(s,n,"R3InjectorError",this.source)}throw s}finally{dt(i),Wn(o)}}resolveInjectorInitializers(){const n=Wn(this),t=dt(void 0);try{const r=this.get(Tf.multi,te,B.Self);for(const o of r)o()}finally{Wn(n),dt(t)}}toString(){const n=[],t=this.records;for(const r of t.keys())n.push(ce(r));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new A(205,!1)}processProvider(n){let t=On(n=P(n))?n:P(n&&n.provide);const r=function ND(e){return Ya(e)?cr(void 0,e.useValue):cr(Vf(e),Mi)}(n);if(On(n)||!0!==n.multi)this.records.get(t);else{let o=this.records.get(t);o||(o=cr(void 0,Mi,!0),o.factory=()=>Zs(o.multi),this.records.set(t,o)),t=n,o.multi.push(n)}this.records.set(t,r)}hydrate(n,t){return t.value===Mi&&(t.value=TD,t.value=t.factory()),"object"==typeof t.value&&t.value&&function OD(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}injectableDefInScope(n){if(!n.providedIn)return!1;const t=P(n.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}}function Xa(e){const n=Zo(e),t=null!==n?n.factory:Sn(e);if(null!==t)return t;if(e instanceof H)throw new A(204,!1);if(e instanceof Function)return function xD(e){const n=e.length;if(n>0)throw function Qr(e,n){const t=[];for(let r=0;rt.factory(e):()=>new e}(e);throw new A(204,!1)}function Vf(e,n,t){let r;if(On(e)){const o=P(e);return Sn(o)||Xa(o)}if(Ya(e))r=()=>P(e.useValue);else if(function kf(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...Zs(e.deps||[]));else if(function Pf(e){return!(!e||!e.useExisting)}(e))r=()=>oe(P(e.useExisting));else{const o=P(e&&(e.useClass||e.provide));if(!function FD(e){return!!e.deps}(e))return Sn(o)||Xa(o);r=()=>new o(...Zs(e.deps))}return r}function cr(e,n,t=!1){return{factory:e,value:n,multi:t?[]:void 0}}function el(e,n){for(const t of e)Array.isArray(t)?el(t,n):t&&zs(t)?el(t.\u0275providers,n):n(t)}class PD{}class Bf{}class LD{resolveComponentFactory(n){throw function kD(e){const n=Error(`No component factory found for ${ce(e)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=e,n}(n)}}let Ai=(()=>{class e{}return e.NULL=new LD,e})();function VD(){return ur(Pe(),E())}function ur(e,n){return new Dt(it(e,n))}let Dt=(()=>{class e{constructor(t){this.nativeElement=t}}return e.__NG_ELEMENT_ID__=VD,e})();class jf{}let Rn=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>function HD(){const e=E(),t=st(Pe().index,e);return(ot(t)?t:e)[Z]}(),e})(),jD=(()=>{class e{}return e.\u0275prov=de({token:e,providedIn:"root",factory:()=>null}),e})();class Ti{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const $D=new Ti("15.1.2"),tl={};function rl(e){return e.ngOriginalError}class dr{constructor(){this._console=console}handleError(n){const t=this._findOriginalError(n);this._console.error("ERROR",n),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(n){let t=n&&rl(n);for(;t&&rl(t);)t=rl(t);return t||null}}function ol(e){return e.ownerDocument.defaultView}function Uf(e,n,t){let r=e.length;for(;;){const o=e.indexOf(n,t);if(-1===o)return o;if(0===o||e.charCodeAt(o-1)<=32){const i=n.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}t=o+1}}const zf="ng-template";function JD(e,n,t){let r=0;for(;ri?"":o[d+1].toLowerCase();const p=8&r?h:null;if(p&&-1!==Uf(p,c,0)||2&r&&c!==h){if(wt(r))return!1;s=!0}}}}else{if(!s&&!wt(r)&&!wt(l))return!1;if(s&&wt(l))continue;s=!1,r=l|1&r}}return wt(r)||s}function wt(e){return 0==(1&e)}function tw(e,n,t,r){if(null===n)return-1;let o=0;if(r||!t){let i=!1;for(;o-1)for(t++;t0?'="'+a+'"':"")+"]"}else 8&r?o+="."+s:4&r&&(o+=" "+s);else""!==o&&!wt(s)&&(n+=qf(i,o),o=""),r=s,i=i||!wt(r);t++}return""!==o&&(n+=qf(i,o)),n}const z={};function f(e){Zf(ee(),E(),Ze()+e,!1)}function Zf(e,n,t,r){if(!r)if(3==(3&n[2])){const i=e.preOrderCheckHooks;null!==i&&ai(n,i,t)}else{const i=e.preOrderHooks;null!==i&&li(n,i,0,t)}An(t)}function Jf(e,n=null,t=null,r){const o=Xf(e,n,t,r);return o.resolveInjectorInitializers(),o}function Xf(e,n=null,t=null,r,o=new Set){const i=[t||te,MD(e)];return r=r||("object"==typeof e?void 0:ce(e)),new Lf(i,n||Si(),r||null,o)}let dn=(()=>{class e{static create(t,r){if(Array.isArray(t))return Jf({name:""},r,t,"");{const o=t.name??"";return Jf({name:o},t.parent,t.providers,o)}}}return e.THROW_IF_NOT_FOUND=Pr,e.NULL=new Ff,e.\u0275prov=de({token:e,providedIn:"any",factory:()=>oe(xf)}),e.__NG_ELEMENT_ID__=-1,e})();function M(e,n=B.Default){const t=E();return null===t?oe(e,n):Sd(Pe(),t,P(e),n)}function sh(e,n){const t=e.contentQueries;if(null!==t)for(let r=0;r22&&Zf(e,n,22,!1),t(r,o)}finally{An(i)}}function dl(e,n,t){if(Xs(n)){const o=n.directiveEnd;for(let i=n.directiveStart;i0;){const t=e[--n];if("number"==typeof t&&t<0)return t}return 0})(s)!=a&&s.push(a),s.push(t,r,i)}}(e,n,r,oo(e,t,o.hostVars,z),o)}function Pt(e,n,t,r,o,i){const s=it(e,n);!function _l(e,n,t,r,o,i,s){if(null==i)e.removeAttribute(n,o,t);else{const a=null==s?j(i):s(i,r||"",o);e.setAttribute(n,o,a,t)}}(n[Z],s,i,e.value,t,r,o)}function qw(e,n,t,r,o,i){const s=i[n];if(null!==s){const a=r.setInput;for(let l=0;l0&&vl(t)}}function vl(e){for(let r=Na(e);null!==r;r=Fa(r))for(let o=10;o0&&vl(i)}const t=e[1].components;if(null!==t)for(let r=0;r0&&vl(o)}}function Jw(e,n){const t=st(n,e),r=t[1];(function Xw(e,n){for(let t=n.length;t-1&&(Pa(n,r),pi(t,r))}this._attachedToViewContainer=!1}rf(this._lView[1],this._lView)}onDestroy(n){!function ch(e,n,t,r){const o=mh(n);null===t?o.push(r):(o.push(t),e.firstCreatePass&&_h(e).push(r,o.length-1))}(this._lView[1],this._lView,null,n)}markForCheck(){yl(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){Ri(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new A(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function jC(e,n){eo(e,n,n[Z],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new A(902,!1);this._appRef=n}}class eb extends io{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;Ri(n[1],n,n[8],!1)}checkNoChanges(){}get context(){return null}}class Ch extends Ai{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const t=ie(n);return new so(t,this.ngModule)}}function Dh(e){const n=[];for(let t in e)e.hasOwnProperty(t)&&n.push({propName:e[t],templateName:t});return n}class nb{constructor(n,t){this.injector=n,this.parentInjector=t}get(n,t,r){r=Ko(r);const o=this.injector.get(n,tl,r);return o!==tl||t===tl?o:this.parentInjector.get(n,t,r)}}class so extends Bf{get inputs(){return Dh(this.componentDef.inputs)}get outputs(){return Dh(this.componentDef.outputs)}constructor(n,t){super(),this.componentDef=n,this.ngModule=t,this.componentType=n.type,this.selector=function aw(e){return e.map(sw).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!t}create(n,t,r,o){let i=(o=o||this.ngModule)instanceof lr?o:o?.injector;i&&null!==this.componentDef.getStandaloneInjector&&(i=this.componentDef.getStandaloneInjector(i)||i);const s=i?new nb(n,i):n,a=s.get(jf,null);if(null===a)throw new A(407,!1);const l=s.get(jD,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=r?function Fw(e,n,t){return e.selectRootElement(n,t===xt.ShadowDom)}(c,r,this.componentDef.encapsulation):Ra(c,u,function tb(e){const n=e.toLowerCase();return"svg"===n?"svg":"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,p=pl(0,null,null,1,0,null,null,null,null,null),m=Ni(null,p,null,h,null,null,a,c,l,s,null);let D,I;aa(m);try{const S=this.componentDef;let O,b=null;S.findHostDirectiveDefs?(O=[],b=new Map,S.findHostDirectiveDefs(S,O,b),O.push(S)):O=[S];const V=function ob(e,n){const t=e[1];return e[22]=n,pr(t,22,2,"#host",null)}(m,d),le=function ib(e,n,t,r,o,i,s,a){const l=o[1];!function sb(e,n,t,r){for(const o of e)n.mergedAttrs=Wr(n.mergedAttrs,o.hostAttrs);null!==n.mergedAttrs&&(Pi(n,n.mergedAttrs,!0),null!==t&&mf(r,t,n))}(r,e,n,s);const c=i.createRenderer(n,t),u=Ni(o,lh(t),null,t.onPush?32:16,o[e.index],e,i,c,a||null,null,null);return l.firstCreatePass&&ml(l,e,r.length-1),Oi(o,u),o[e.index]=u}(V,d,S,O,m,a,c);I=nd(p,22),d&&function lb(e,n,t,r){if(r)da(e,t,["ng-version",$D.full]);else{const{attrs:o,classes:i}=function lw(e){const n=[],t=[];let r=1,o=2;for(;r0&&gf(e,t,i.join(" "))}}(c,S,d,r),void 0!==t&&function cb(e,n,t){const r=e.projection=[];for(let o=0;o=0;r--){const o=e[r];o.hostVars=n+=o.hostVars,o.hostAttrs=Wr(o.hostAttrs,t=Wr(t,o.hostAttrs))}}(r)}function wl(e){return e===Ut?{}:e===te?[]:e}function fb(e,n){const t=e.viewQuery;e.viewQuery=t?(r,o)=>{n(r,o),t(r,o)}:n}function hb(e,n){const t=e.contentQueries;e.contentQueries=t?(r,o,i)=>{n(r,o,i),t(r,o,i)}:n}function pb(e,n){const t=e.hostBindings;e.hostBindings=t?(r,o)=>{n(r,o),t(r,o)}:n}let Li=null;function Pn(){if(!Li){const e=fe.Symbol;if(e&&e.iterator)Li=e.iterator;else{const n=Object.getOwnPropertyNames(Map.prototype);for(let t=0;ts(Re(V[r.index])):r.index;let b=null;if(!s&&a&&(b=function Tb(e,n,t,r){const o=e.cleanup;if(null!=o)for(let i=0;il?a[l]:null}"string"==typeof s&&(i+=2)}return null}(e,n,o,r.index)),null!==b)(b.__ngLastListenerFn__||b).__ngNextListenerFn__=i,b.__ngLastListenerFn__=i,h=!1;else{i=jh(r,n,u,i,!1);const V=t.listen(I,o,i);d.push(i,V),c&&c.push(o,O,S,S+1)}}else i=jh(r,n,u,i,!1);const p=r.outputs;let m;if(h&&null!==p&&(m=p[o])){const D=m.length;if(D)for(let I=0;I-1?st(e.index,n):n);let l=Hh(n,0,r,s),c=i.__ngNextListenerFn__;for(;c;)l=Hh(n,0,c,s)&&l,c=c.__ngNextListenerFn__;return o&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function _(e=1){return function Py(e){return(U.lFrame.contextLView=function ky(e,n){for(;e>0;)n=n[15],e--;return n}(e,U.lFrame.contextLView))[8]}(e)}function fn(e,n,t){return Il(e,"",n,"",t),fn}function Il(e,n,t,r,o){const i=E(),s=mr(i,n,t,r);return s!==z&<(ee(),_e(),i,e,s,i[Z],o,!1),Il}function ji(e,n){return e<<17|n<<2}function hn(e){return e>>17&32767}function Ml(e){return 2|e}function Ln(e){return(131068&e)>>2}function Sl(e,n){return-131069&e|n<<2}function Al(e){return 1|e}function Yh(e,n,t,r,o){const i=e[t+1],s=null===n;let a=r?hn(i):Ln(i),l=!1;for(;0!==a&&(!1===l||s);){const u=e[a+1];Vb(e[a],n)&&(l=!0,e[a+1]=r?Al(u):Ml(u)),a=r?hn(u):Ln(u)}l&&(e[t+1]=r?Ml(i):Al(i))}function Vb(e,n){return null===e||null==n||(Array.isArray(e)?e[1]:e)===n||!(!Array.isArray(e)||"string"!=typeof n)&&ir(e,n)>=0}const xe={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Kh(e){return e.substring(xe.key,xe.keyEnd)}function Jh(e,n){const t=xe.textEnd;return t===n?-1:(n=xe.keyEnd=function $b(e,n,t){for(;n32;)n++;return n}(e,xe.key=n,t),Er(e,n,t))}function Er(e,n,t){for(;n=0;t=Jh(n,t))at(e,Kh(n),!0)}function op(e,n){return n>=e.expandoStartIndex}function ip(e,n,t,r){const o=e.data;if(null===o[t+1]){const i=o[Ze()],s=op(e,t);cp(i,r)&&null===n&&!s&&(n=!1),n=function qb(e,n,t,r){const o=function ia(e){const n=U.lFrame.currentDirectiveIndex;return-1===n?null:e[n]}(e);let i=r?n.residualClasses:n.residualStyles;if(null===o)0===(r?n.classBindings:n.styleBindings)&&(t=lo(t=Tl(null,e,n,t,r),n.attrs,r),i=null);else{const s=n.directiveStylingLast;if(-1===s||e[s]!==o)if(t=Tl(o,e,n,t,r),null===i){let l=function Zb(e,n,t){const r=t?n.classBindings:n.styleBindings;if(0!==Ln(r))return e[hn(r)]}(e,n,r);void 0!==l&&Array.isArray(l)&&(l=Tl(null,e,n,l[1],r),l=lo(l,n.attrs,r),function Qb(e,n,t,r){e[hn(t?n.classBindings:n.styleBindings)]=r}(e,n,r,l))}else i=function Yb(e,n,t){let r;const o=n.directiveEnd;for(let i=1+n.directiveStylingLast;i0)&&(c=!0)):u=t,o)if(0!==l){const h=hn(e[a+1]);e[r+1]=ji(h,a),0!==h&&(e[h+1]=Sl(e[h+1],r)),e[a+1]=function Rb(e,n){return 131071&e|n<<17}(e[a+1],r)}else e[r+1]=ji(a,0),0!==a&&(e[a+1]=Sl(e[a+1],r)),a=r;else e[r+1]=ji(l,0),0===a?a=r:e[l+1]=Sl(e[l+1],r),l=r;c&&(e[r+1]=Ml(e[r+1])),Yh(e,u,r,!0),Yh(e,u,r,!1),function Lb(e,n,t,r,o){const i=o?e.residualClasses:e.residualStyles;null!=i&&"string"==typeof n&&ir(i,n)>=0&&(t[r+1]=Al(t[r+1]))}(n,u,e,r,i),s=ji(a,l),i?n.classBindings=s:n.styleBindings=s}(o,i,n,t,s,r)}}function Tl(e,n,t,r,o){let i=null;const s=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a0;){const l=e[o],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=t[o+1];h===z&&(h=d?te:void 0);let p=d?Ca(h,r):u===r?h:void 0;if(c&&!Ui(p)&&(p=Ca(l,r)),Ui(p)&&(a=p,s))return a;const m=e[o+1];o=s?hn(m):Ln(m)}if(null!==n){let l=i?n.residualClasses:n.residualStyles;null!=l&&(a=Ca(l,r))}return a}function Ui(e){return void 0!==e}function cp(e,n){return 0!=(e.flags&(n?8:16))}function w(e,n=""){const t=E(),r=ee(),o=e+22,i=r.firstCreatePass?pr(r,o,1,n,null):r.data[o],s=t[o]=function Oa(e,n){return e.createText(n)}(t[Z],n);Di(r,t,s,i),Ot(i,!1)}function F(e){return G("",e,""),F}function G(e,n,t){const r=E(),o=mr(r,e,n,t);return o!==z&&function Kt(e,n,t){const r=oi(n,e);!function tf(e,n,t){e.setValue(n,t)}(e[Z],r,t)}(r,Ze(),o),G}function Bt(e,n,t){!function It(e,n,t,r){const o=ee(),i=Zt(2);o.firstUpdatePass&&ip(o,null,i,r);const s=E();if(t!==z&&je(s,i,t)){const a=o.data[Ze()];if(cp(a,r)&&!op(o,i)){let l=r?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(t=$s(l,t||"")),El(o,a,s,t,r)}else!function Jb(e,n,t,r,o,i,s,a){o===z&&(o=te);let l=0,c=0,u=0>20;if(On(e)||!e.multi){const p=new Gr(l,o,M),m=Rl(a,n,o?u:u+h,d);-1===m?(ga(fi(c,s),i,a),Ol(i,e,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,o&&(c.providerIndexes+=1048576),t.push(p),s.push(p)):(t[m]=p,s[m]=p)}else{const p=Rl(a,n,u+h,d),m=Rl(a,n,u,u+h),I=m>=0&&t[m];if(o&&!I||!o&&!(p>=0&&t[p])){ga(fi(c,s),i,a);const S=function _E(e,n,t,r,o){const i=new Gr(e,t,M);return i.multi=[],i.index=n,i.componentProviders=0,ng(i,o,r&&!t),i}(o?mE:gE,t.length,o,r,l);!o&&I&&(t[m].providerFactory=S),Ol(i,e,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,o&&(c.providerIndexes+=1048576),t.push(S),s.push(S)}else Ol(i,e,p>-1?p:m,ng(t[o?m:p],l,!o&&r));!o&&r&&I&&t[m].componentProviders++}}}function Ol(e,n,t,r){const o=On(n),i=function AD(e){return!!e.useClass}(n);if(o||i){const l=(i?P(n.useClass):n).prototype.ngOnDestroy;if(l){const c=e.destroyHooks||(e.destroyHooks=[]);if(!o&&n.multi){const u=c.indexOf(t);-1===u?c.push(t,[r,l]):c[u+1].push(r,l)}else c.push(t,l)}}}function ng(e,n,t){return t&&e.componentProviders++,e.multi.push(n)-1}function Rl(e,n,t,r){for(let o=t;o{t.providersResolver=(r,o)=>function pE(e,n,t){const r=ee();if(r.firstCreatePass){const o=Ct(e);Fl(t,r.data,r.blueprint,o,!0),Fl(n,r.data,r.blueprint,o,!1)}}(r,o?o(e):e,n)}}class Sr{}class vE{}class rg extends Sr{constructor(n,t){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new Ch(this);const r=function rt(e,n){const t=e[$u]||null;if(!t&&!0===n)throw new Error(`Type ${ce(e)} does not have '\u0275mod' property.`);return t}(n);this._bootstrapComponents=function Yt(e){return e instanceof Function?e():e}(r.bootstrap),this._r3Injector=Xf(n,t,[{provide:Sr,useValue:this},{provide:Ai,useValue:this.componentFactoryResolver}],ce(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class kl extends vE{constructor(n){super(),this.moduleType=n}create(n){return new rg(this.moduleType,n)}}function Zi(e,n,t,r){return function dg(e,n,t,r,o,i){const s=n+t;return je(e,s,o)?kt(e,s+1,i?r.call(i,o):r(o)):go(e,s+1)}(E(),qe(),e,n,t,r)}function Vl(e,n,t,r,o){return function fg(e,n,t,r,o,i,s){const a=n+t;return kn(e,a,o,i)?kt(e,a+2,s?r.call(s,o,i):r(o,i)):go(e,a+2)}(E(),qe(),e,n,t,r,o)}function Oe(e,n,t,r,o,i){return hg(E(),qe(),e,n,t,r,o,i)}function go(e,n){const t=e[n];return t===z?void 0:t}function hg(e,n,t,r,o,i,s,a){const l=n+t;return function Bi(e,n,t,r,o){const i=kn(e,n,t,r);return je(e,n+2,o)||i}(e,l,o,i,s)?kt(e,l+3,a?r.call(a,o,i,s):r(o,i,s)):go(e,l+3)}function Bl(e){return n=>{setTimeout(e,void 0,n)}}const be=class UE extends Rs{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,t,r){let o=n,i=t||(()=>null),s=r;if(n&&"object"==typeof n){const l=n;o=l.next?.bind(l),i=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(i=Bl(i),o&&(o=Bl(o)),s&&(s=Bl(s)));const a=super.subscribe({next:o,error:i,complete:s});return n instanceof Tt&&n.add(a),a}};let Jt=(()=>{class e{}return e.__NG_ELEMENT_ID__=qE,e})();const GE=Jt,WE=class extends GE{constructor(n,t,r){super(),this._declarationLView=n,this._declarationTContainer=t,this.elementRef=r}createEmbeddedView(n,t){const r=this._declarationTContainer.tViews,o=Ni(this._declarationLView,r,n,16,null,r.declTNode,null,null,null,null,t||null);o[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(o[19]=s.createEmbeddedView(r)),ul(r,o,n),new io(o)}};function qE(){return function Qi(e,n){return 4&e.type?new WE(n,e,ur(e,n)):null}(Pe(),E())}let Ht=(()=>{class e{}return e.__NG_ELEMENT_ID__=ZE,e})();function ZE(){return function Cg(e,n){let t;const r=n[e.index];if(yt(r))t=r;else{let o;if(8&e.type)o=Re(r);else{const i=n[Z];o=i.createComment("");const s=it(e,n);Nn(i,Ci(i,s),o,function ZC(e,n){return e.nextSibling(n)}(i,s),!1)}n[e.index]=t=gh(r,n,o,e),Oi(n,t)}return new vg(t,e,n)}(Pe(),E())}const QE=Ht,vg=class extends QE{constructor(n,t,r){super(),this._lContainer=n,this._hostTNode=t,this._hostLView=r}get element(){return ur(this._hostTNode,this._hostLView)}get injector(){return new er(this._hostTNode,this._hostLView)}get parentInjector(){const n=pa(this._hostTNode,this._hostLView);if(Dd(n)){const t=ui(n,this._hostLView),r=ci(n);return new er(t[1].data[r+8],t)}return new er(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const t=yg(this._lContainer);return null!==t&&t[n]||null}get length(){return this._lContainer.length-10}createEmbeddedView(n,t,r){let o,i;"number"==typeof r?o=r:null!=r&&(o=r.index,i=r.injector);const s=n.createEmbeddedView(t||{},i);return this.insert(s,o),s}createComponent(n,t,r,o,i){const s=n&&!function Zr(e){return"function"==typeof e}(n);let a;if(s)a=t;else{const d=t||{};a=d.index,r=d.injector,o=d.projectableNodes,i=d.environmentInjector||d.ngModuleRef}const l=s?n:new so(ie(n)),c=r||this.parentInjector;if(!i&&null==l.ngModule){const h=(s?c:this.parentInjector).get(lr,null);h&&(i=h)}const u=l.create(c,o,void 0,i);return this.insert(u.hostView,a),u}insert(n,t){const r=n._lView,o=r[1];if(function Ey(e){return yt(e[3])}(r)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=r[3],h=new vg(d,d[6],d[3]);h.detach(h.indexOf(n))}}const i=this._adjustIndex(t),s=this._lContainer;!function UC(e,n,t,r){const o=10+r,i=t.length;r>0&&(t[o-1][4]=n),r{class e{constructor(t){this.appInits=t,this.resolve=Ki,this.reject=Ki,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,o)=>{this.resolve=r,this.reject=o})}runInitializers(){if(this.initialized)return;const t=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let o=0;o{i.subscribe({complete:a,error:l})});t.push(s)}}Promise.all(t).then(()=>{r()}).catch(o=>{this.reject(o)}),0===t.length&&r(),this.initialized=!0}}return e.\u0275fac=function(t){return new(t||e)(oe(zg,8))},e.\u0275prov=de({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const vo=new H("AppId",{providedIn:"root",factory:function Gg(){return`${Kl()}${Kl()}${Kl()}`}});function Kl(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Wg=new H("Platform Initializer"),qg=new H("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),M1=new H("appBootstrapListener"),Xt=new H("LocaleId",{providedIn:"root",factory:()=>function sy(e,n=B.Default){return oe(e,Ko(n))}(Xt,B.Optional|B.SkipSelf)||function S1(){return typeof $localize<"u"&&$localize.locale||Mr}()}),F1=(()=>Promise.resolve(0))();function Jl(e){typeof Zone>"u"?F1.then(()=>{e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}class $e{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new be(!1),this.onMicrotaskEmpty=new be(!1),this.onStable=new be(!1),this.onError=new be(!1),typeof Zone>"u")throw new A(908,!1);Zone.assertZonePatched();const o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!r&&t,o.shouldCoalesceRunChangeDetection=r,o.lastRequestAnimationFrameId=-1,o.nativeRequestAnimationFrame=function O1(){let e=fe.requestAnimationFrame,n=fe.cancelAnimationFrame;if(typeof Zone<"u"&&e&&n){const t=e[Zone.__symbol__("OriginalDelegate")];t&&(e=t);const r=n[Zone.__symbol__("OriginalDelegate")];r&&(n=r)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function k1(e){const n=()=>{!function P1(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(fe,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,ec(e),e.isCheckStableRunning=!0,Xl(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),ec(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,o,i,s,a)=>{try{return Yg(e),t.invokeTask(o,i,s,a)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===i.type||e.shouldCoalesceRunChangeDetection)&&n(),Kg(e)}},onInvoke:(t,r,o,i,s,a,l)=>{try{return Yg(e),t.invoke(o,i,s,a,l)}finally{e.shouldCoalesceRunChangeDetection&&n(),Kg(e)}},onHasTask:(t,r,o,i)=>{t.hasTask(o,i),r===o&&("microTask"==i.change?(e._hasPendingMicrotasks=i.microTask,ec(e),Xl(e)):"macroTask"==i.change&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,r,o,i)=>(t.handleError(o,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}(o)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!$e.isInAngularZone())throw new A(909,!1)}static assertNotInAngularZone(){if($e.isInAngularZone())throw new A(909,!1)}run(n,t,r){return this._inner.run(n,t,r)}runTask(n,t,r,o){const i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,n,R1,Ki,Ki);try{return i.runTask(s,t,r)}finally{i.cancelTask(s)}}runGuarded(n,t,r){return this._inner.runGuarded(n,t,r)}runOutsideAngular(n){return this._outer.run(n)}}const R1={};function Xl(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function ec(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function Yg(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Kg(e){e._nesting--,Xl(e)}class L1{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new be,this.onMicrotaskEmpty=new be,this.onStable=new be,this.onError=new be}run(n,t,r){return n.apply(t,r)}runGuarded(n,t,r){return n.apply(t,r)}runOutsideAngular(n){return n()}runTask(n,t,r,o){return n.apply(t,r)}}const Jg=new H(""),Xi=new H("");let rc,tc=(()=>{class e{constructor(t,r,o){this._ngZone=t,this.registry=r,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,rc||(function V1(e){rc=e}(o),o.addToWindow(r)),this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{$e.assertNotInAngularZone(),Jl(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Jl(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(t)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,r,o){let i=-1;r&&r>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==i),t(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:o})}whenStable(t,r,o){if(o&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,r,o),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,r,o){return[]}}return e.\u0275fac=function(t){return new(t||e)(oe($e),oe(nc),oe(Xi))},e.\u0275prov=de({token:e,factory:e.\u0275fac}),e})(),nc=(()=>{class e{constructor(){this._applications=new Map}registerApplication(t,r){this._applications.set(t,r)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,r=!0){return rc?.findTestabilityInTree(this,t,r)??null}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=de({token:e,factory:e.\u0275fac,providedIn:"platform"}),e})(),pn=null;const Xg=new H("AllowMultipleToken"),oc=new H("PlatformDestroyListeners");function tm(e,n,t=[]){const r=`Platform: ${n}`,o=new H(r);return(i=[])=>{let s=ic();if(!s||s.injector.get(Xg,!1)){const a=[...t,...i,{provide:o,useValue:!0}];e?e(a):function j1(e){if(pn&&!pn.get(Xg,!1))throw new A(400,!1);pn=e;const n=e.get(rm);(function em(e){const n=e.get(Wg,null);n&&n.forEach(t=>t())})(e)}(function nm(e=[],n){return dn.create({name:n,providers:[{provide:Ka,useValue:"platform"},{provide:oc,useValue:new Set([()=>pn=null])},...e]})}(a,r))}return function U1(e){const n=ic();if(!n)throw new A(401,!1);return n}()}}function ic(){return pn?.get(rm)??null}let rm=(()=>{class e{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,r){const o=function im(e,n){let t;return t="noop"===e?new L1:("zone.js"===e?void 0:e)||new $e(n),t}(r?.ngZone,function om(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!e||!e.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!e||!e.ngZoneRunCoalescing)||!1}}(r)),i=[{provide:$e,useValue:o}];return o.run(()=>{const s=dn.create({providers:i,parent:this.injector,name:t.moduleType.name}),a=t.create(s),l=a.injector.get(dr,null);if(!l)throw new A(402,!1);return o.runOutsideAngular(()=>{const c=o.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{es(this._modules,a),c.unsubscribe()})}),function sm(e,n,t){try{const r=t();return Hi(r)?r.catch(o=>{throw n.runOutsideAngular(()=>e.handleError(o)),o}):r}catch(r){throw n.runOutsideAngular(()=>e.handleError(r)),r}}(l,o,()=>{const c=a.injector.get(Ji);return c.runInitializers(),c.donePromise.then(()=>(function Fp(e){ut(e,"Expected localeId to be defined"),"string"==typeof e&&(Np=e.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Xt,Mr)||Mr),this._moduleDoBootstrap(a),a))})})}bootstrapModule(t,r=[]){const o=am({},r);return function B1(e,n,t){const r=new kl(t);return Promise.resolve(r)}(0,0,t).then(i=>this.bootstrapModuleFactory(i,o))}_moduleDoBootstrap(t){const r=t.injector.get(sc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(o=>r.bootstrap(o));else{if(!t.instance.ngDoBootstrap)throw new A(-403,!1);t.instance.ngDoBootstrap(r)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new A(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());const t=this._injector.get(oc,null);t&&(t.forEach(r=>r()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return e.\u0275fac=function(t){return new(t||e)(oe(dn))},e.\u0275prov=de({token:e,factory:e.\u0275fac,providedIn:"platform"}),e})();function am(e,n){return Array.isArray(n)?n.reduce(am,e):{...e,...n}}let sc=(()=>{class e{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(t,r,o){this._zone=t,this._injector=r,this._exceptionHandler=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const i=new ze(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new ze(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{$e.assertNotInAngularZone(),Jl(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{$e.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Uv(i,s.pipe(function Gv(e={}){const{connector:n=(()=>new Rs),resetOnError:t=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s=null,a=null,l=null,c=0,u=!1,d=!1;const h=()=>{a?.unsubscribe(),a=null},p=()=>{h(),s=l=null,u=d=!1},m=()=>{const D=s;p(),D?.unsubscribe()};return zn((D,I)=>{c++,!d&&!u&&h();const S=l=l??n();I.add(()=>{c--,0===c&&!d&&!u&&(a=Hs(m,o))}),S.subscribe(I),s||(s=new xs({next:O=>S.next(O),error:O=>{d=!0,h(),a=Hs(p,t,O),S.error(O)},complete:()=>{u=!0,h(),a=Hs(p,r),S.complete()}}),Bs(D).subscribe(s))})(i)}}()))}bootstrap(t,r){const o=t instanceof Bf;if(!this._injector.get(Ji).done)throw!o&&function Br(e){const n=ie(e)||ke(e)||Ge(e);return null!==n&&n.standalone}(t),new A(405,false);let s;s=o?t:this._injector.get(Ai).resolveComponentFactory(t),this.componentTypes.push(s.componentType);const a=function H1(e){return e.isBoundToModule}(s)?void 0:this._injector.get(Sr),c=s.create(dn.NULL,[],r||s.selector,a),u=c.location.nativeElement,d=c.injector.get(Jg,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),es(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new A(101,!1);try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;es(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const r=this._injector.get(M1,[]);r.push(...this._bootstrapListeners),r.forEach(o=>o(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>es(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new A(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return e.\u0275fac=function(t){return new(t||e)(oe($e),oe(lr),oe(dr))},e.\u0275prov=de({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function es(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}let um=(()=>{class e{}return e.__NG_ELEMENT_ID__=G1,e})();function G1(e){return function W1(e,n,t){if(Ur(e)&&!t){const r=st(e.index,n);return new io(r,r)}return 47&e.type?new io(n[16],n):null}(Pe(),E(),16==(16&e))}class hm{constructor(){}supports(n){return Vi(n)}create(n){return new J1(n)}}const K1=(e,n)=>n;class J1{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||K1}forEachItem(n){let t;for(t=this._itHead;null!==t;t=t._next)n(t)}forEachOperation(n){let t=this._itHead,r=this._removalsHead,o=0,i=null;for(;t||r;){const s=!r||t&&t.currentIndex{s=this._trackByFn(o,a),null!==t&&Object.is(t.trackById,s)?(r&&(t=this._verifyReinsertion(t,a,s,o)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,s,o),r=!0),t=t._next,o++}),this.length=o;return this._truncate(t),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,t,r,o){let i;return null===n?i=this._itTail:(i=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._reinsertAfter(n,i,o)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(r,o))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._moveAfter(n,i,o)):n=this._addAfter(new X1(t,r),i,o),n}_verifyReinsertion(n,t,r,o){let i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==i?n=this._reinsertAfter(i,n._prev,o):n.currentIndex!=o&&(n.currentIndex=o,this._addToMoves(n,o)),n}_truncate(n){for(;null!==n;){const t=n._next;this._addToRemovals(this._unlink(n)),n=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const o=n._prevRemoved,i=n._nextRemoved;return null===o?this._removalsHead=i:o._nextRemoved=i,null===i?this._removalsTail=o:i._prevRemoved=o,this._insertAfter(n,t,r),this._addToMoves(n,r),n}_moveAfter(n,t,r){return this._unlink(n),this._insertAfter(n,t,r),this._addToMoves(n,r),n}_addAfter(n,t,r){return this._insertAfter(n,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,t,r){const o=null===t?this._itHead:t._next;return n._next=o,n._prev=t,null===o?this._itTail=n:o._prev=n,null===t?this._itHead=n:t._next=n,null===this._linkedRecords&&(this._linkedRecords=new pm),this._linkedRecords.put(n),n.currentIndex=r,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const t=n._prev,r=n._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,n}_addToMoves(n,t){return n.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new pm),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,t){return n.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class X1{constructor(n,t){this.item=n,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class eI{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,n))return r;return null}remove(n){const t=n._prevDup,r=n._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class pm{constructor(){this.map=new Map}put(n){const t=n.trackById;let r=this.map.get(t);r||(r=new eI,this.map.set(t,r)),r.add(n)}get(n,t){const o=this.map.get(n);return o?o.get(n,t):null}remove(n){const t=n.trackById;return this.map.get(t).remove(n)&&this.map.delete(t),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function gm(e,n,t){const r=e.previousIndex;if(null===r)return r;let o=0;return t&&r{if(t&&t.key===o)this._maybeAddToChanges(t,r),this._appendAfter=t,t=t._next;else{const i=this._getOrCreateRecordForKey(o,r);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let r=t;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,t){if(n){const r=n._prev;return t._next=n,t._prev=r,n._prev=t,r&&(r._next=t),n===this._mapHead&&(this._mapHead=t),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(n,t){if(this._records.has(n)){const o=this._records.get(n);this._maybeAddToChanges(o,t);const i=o._prev,s=o._next;return i&&(i._next=s),s&&(s._prev=i),o._next=null,o._prev=null,o}const r=new nI(n);return this._records.set(n,r),r.currentValue=t,this._addToAdditions(r),r}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,t){Object.is(t,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=t,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,t){n instanceof Map?n.forEach(t):Object.keys(n).forEach(r=>t(n[r],r))}}class nI{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function _m(){return new rs([new hm])}let rs=(()=>{class e{constructor(t){this.factories=t}static create(t,r){if(null!=r){const o=r.factories.slice();t=t.concat(o)}return new e(t)}static extend(t){return{provide:e,useFactory:r=>e.create(t,r||_m()),deps:[[e,new _i,new mi]]}}find(t){const r=this.factories.find(o=>o.supports(t));if(null!=r)return r;throw new A(901,!1)}}return e.\u0275prov=de({token:e,providedIn:"root",factory:_m}),e})();function vm(){return new yo([new mm])}let yo=(()=>{class e{constructor(t){this.factories=t}static create(t,r){if(r){const o=r.factories.slice();t=t.concat(o)}return new e(t)}static extend(t){return{provide:e,useFactory:r=>e.create(t,r||vm()),deps:[[e,new _i,new mi]]}}find(t){const r=this.factories.find(o=>o.supports(t));if(r)return r;throw new A(901,!1)}}return e.\u0275prov=de({token:e,providedIn:"root",factory:vm}),e})();const iI=tm(null,"core",[]);let sI=(()=>{class e{constructor(t){}}return e.\u0275fac=function(t){return new(t||e)(oe(sc))},e.\u0275mod=an({type:e}),e.\u0275inj=$t({}),e})();let fc=null;function Hn(){return fc}class cI{}const tn=new H("DocumentToken"),wc=/\s+/,Am=[];let wo=(()=>{class e{constructor(t,r,o,i){this._iterableDiffers=t,this._keyValueDiffers=r,this._ngEl=o,this._renderer=i,this.initialClasses=Am,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(wc):Am}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(wc):t}ngDoCheck(){for(const r of this.initialClasses)this._updateState(r,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const r of t)this._updateState(r,!0);else if(null!=t)for(const r of Object.keys(t))this._updateState(r,Boolean(t[r]));this._applyStateDiff()}_updateState(t,r){const o=this.stateMap.get(t);void 0!==o?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(t,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const r=t[0],o=t[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(t,r){(t=t.trim()).length>0&&t.split(wc).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}}return e.\u0275fac=function(t){return new(t||e)(M(rs),M(yo),M(Dt),M(Rn))},e.\u0275dir=$({type:e,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),e})();class YI{constructor(n,t,r,o){this.$implicit=n,this.ngForOf=t,this.index=r,this.count=o}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let xr=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,r,o){this._viewContainer=t,this._template=r,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=this._viewContainer;t.forEachOperation((o,i,s)=>{if(null==o.previousIndex)r.createEmbeddedView(this._template,new YI(o.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)r.remove(null===i?void 0:i);else if(null!==i){const a=r.get(i);r.move(a,s),Nm(a,o)}});for(let o=0,i=r.length;o{Nm(r.get(o.currentIndex),o)})}static ngTemplateContextGuard(t,r){return!0}}return e.\u0275fac=function(t){return new(t||e)(M(Ht),M(Jt),M(rs))},e.\u0275dir=$({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),e})();function Nm(e,n){e.context.$implicit=n.item}let jn=(()=>{class e{constructor(t,r){this._viewContainer=t,this._context=new JI,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Fm("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Fm("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,r){return!0}}return e.\u0275fac=function(t){return new(t||e)(M(Ht),M(Jt))},e.\u0275dir=$({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),e})();class JI{constructor(){this.$implicit=null,this.ngIf=null}}function Fm(e,n){if(n&&!n.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${ce(n)}'.`)}let Pm=(()=>{class e{transform(t,r,o){if(null==t)return null;if(!this.supports(t))throw function At(e,n){return new A(2100,!1)}();return t.slice(r,o)}supports(t){return"string"==typeof t||Array.isArray(t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=Je({name:"slice",type:e,pure:!1,standalone:!0}),e})(),bM=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=an({type:e}),e.\u0275inj=$t({}),e})();class tS extends cI{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class Tc extends tS{static makeCurrent(){!function lI(e){fc||(fc=e)}(new Tc)}onAndCancel(n,t,r){return n.addEventListener(t,r,!1),()=>{n.removeEventListener(t,r,!1)}}dispatchEvent(n,t){n.dispatchEvent(t)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,t){return(t=t||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,t){return"window"===t?window:"document"===t?n:"body"===t?n.body:null}getBaseHref(n){const t=function nS(){return Eo=Eo||document.querySelector("base"),Eo?Eo.getAttribute("href"):null}();return null==t?null:function rS(e){ps=ps||document.createElement("a"),ps.setAttribute("href",e);const n=ps.pathname;return"/"===n.charAt(0)?n:`/${n}`}(t)}resetBaseElement(){Eo=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return function ZI(e,n){n=encodeURIComponent(n);for(const t of e.split(";")){const r=t.indexOf("="),[o,i]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(o.trim()===n)return decodeURIComponent(i)}return null}(document.cookie,n)}}let ps,Eo=null;const Um=new H("TRANSITION_ID"),iS=[{provide:zg,useFactory:function oS(e,n,t){return()=>{t.get(Ji).donePromise.then(()=>{const r=Hn(),o=n.querySelectorAll(`style[ng-transition="${e}"]`);for(let i=0;i{class e{build(){return new XMLHttpRequest}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=de({token:e,factory:e.\u0275fac}),e})();const gs=new H("EventManagerPlugins");let ms=(()=>{class e{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(o=>o.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,r,o){return this._findPluginFor(r).addEventListener(t,r,o)}addGlobalEventListener(t,r,o){return this._findPluginFor(r).addGlobalEventListener(t,r,o)}getZone(){return this._zone}_findPluginFor(t){const r=this._eventNameToPlugin.get(t);if(r)return r;const o=this._plugins;for(let i=0;i{class e{constructor(){this._stylesSet=new Set}addStyles(t){const r=new Set;t.forEach(o=>{this._stylesSet.has(o)||(this._stylesSet.add(o),r.add(o))}),this.onStylesAdded(r)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=de({token:e,factory:e.\u0275fac}),e})(),Io=(()=>{class e extends Gm{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,r,o){t.forEach(i=>{const s=this._doc.createElement("style");s.textContent=i,o.push(r.appendChild(s))})}addHost(t){const r=[];this._addStylesToHost(this._stylesSet,t,r),this._hostNodes.set(t,r)}removeHost(t){const r=this._hostNodes.get(t);r&&r.forEach(Wm),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((r,o)=>{this._addStylesToHost(t,o,r)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(Wm))}}return e.\u0275fac=function(t){return new(t||e)(oe(tn))},e.\u0275prov=de({token:e,factory:e.\u0275fac}),e})();function Wm(e){Hn().remove(e)}const xc={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},Nc=/%COMP%/g;function Fc(e,n){return n.flat(100).map(t=>t.replace(Nc,e))}function Qm(e){return n=>{if("__ngUnwrap__"===n)return e;!1===e(n)&&(n.preventDefault(),n.returnValue=!1)}}let Oc=(()=>{class e{constructor(t,r,o){this.eventManager=t,this.sharedStylesHost=r,this.appId=o,this.rendererByCompId=new Map,this.defaultRenderer=new Rc(t)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;switch(r.encapsulation){case xt.Emulated:{let o=this.rendererByCompId.get(r.id);return o||(o=new hS(this.eventManager,this.sharedStylesHost,r,this.appId),this.rendererByCompId.set(r.id,o)),o.applyToHost(t),o}case xt.ShadowDom:return new pS(this.eventManager,this.sharedStylesHost,t,r);default:if(!this.rendererByCompId.has(r.id)){const o=Fc(r.id,r.styles);this.sharedStylesHost.addStyles(o),this.rendererByCompId.set(r.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return e.\u0275fac=function(t){return new(t||e)(oe(ms),oe(Io),oe(vo))},e.\u0275prov=de({token:e,factory:e.\u0275fac}),e})();class Rc{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,t){return t?document.createElementNS(xc[t]||t,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,t){(Km(n)?n.content:n).appendChild(t)}insertBefore(n,t,r){n&&(Km(n)?n.content:n).insertBefore(t,r)}removeChild(n,t){n&&n.removeChild(t)}selectRootElement(n,t){let r="string"==typeof n?document.querySelector(n):n;if(!r)throw new Error(`The selector "${n}" did not match any elements`);return t||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,t,r,o){if(o){t=o+":"+t;const i=xc[o];i?n.setAttributeNS(i,t,r):n.setAttribute(t,r)}else n.setAttribute(t,r)}removeAttribute(n,t,r){if(r){const o=xc[r];o?n.removeAttributeNS(o,t):n.removeAttribute(`${r}:${t}`)}else n.removeAttribute(t)}addClass(n,t){n.classList.add(t)}removeClass(n,t){n.classList.remove(t)}setStyle(n,t,r,o){o&(Xe.DashCase|Xe.Important)?n.style.setProperty(t,r,o&Xe.Important?"important":""):n.style[t]=r}removeStyle(n,t,r){r&Xe.DashCase?n.style.removeProperty(t):n.style[t]=""}setProperty(n,t,r){n[t]=r}setValue(n,t){n.nodeValue=t}listen(n,t,r){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,t,Qm(r)):this.eventManager.addEventListener(n,t,Qm(r))}}function Km(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class hS extends Rc{constructor(n,t,r,o){super(n),this.component=r;const i=Fc(o+"-"+r.id,r.styles);t.addStyles(i),this.contentAttr=function uS(e){return"_ngcontent-%COMP%".replace(Nc,e)}(o+"-"+r.id),this.hostAttr=function dS(e){return"_nghost-%COMP%".replace(Nc,e)}(o+"-"+r.id)}applyToHost(n){super.setAttribute(n,this.hostAttr,"")}createElement(n,t){const r=super.createElement(n,t);return super.setAttribute(r,this.contentAttr,""),r}}class pS extends Rc{constructor(n,t,r,o){super(n),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const i=Fc(o.id,o.styles);for(let s=0;s{class e extends zm{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,o){return t.addEventListener(r,o,!1),()=>this.removeEventListener(t,r,o)}removeEventListener(t,r,o){return t.removeEventListener(r,o)}}return e.\u0275fac=function(t){return new(t||e)(oe(tn))},e.\u0275prov=de({token:e,factory:e.\u0275fac}),e})();const Jm=["alt","control","meta","shift"],mS={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},_S={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let vS=(()=>{class e extends zm{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,r,o){const i=e.parseEventName(r),s=e.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Hn().onAndCancel(t,i.domEventName,s))}static parseEventName(t){const r=t.toLowerCase().split("."),o=r.shift();if(0===r.length||"keydown"!==o&&"keyup"!==o)return null;const i=e._normalizeKey(r.pop());let s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Jm.forEach(c=>{const u=r.indexOf(c);u>-1&&(r.splice(u,1),s+=c+".")}),s+=i,0!=r.length||0===i.length)return null;const l={};return l.domEventName=o,l.fullKey=s,l}static matchEventFullKeyCode(t,r){let o=mS[t.key]||t.key,i="";return r.indexOf("code.")>-1&&(o=t.code,i="code."),!(null==o||!o)&&(o=o.toLowerCase()," "===o?o="space":"."===o&&(o="dot"),Jm.forEach(s=>{s!==o&&(0,_S[s])(t)&&(i+=s+".")}),i+=o,i===r)}static eventCallback(t,r,o){return i=>{e.matchEventFullKeyCode(i,t)&&o.runGuarded(()=>r(i))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return e.\u0275fac=function(t){return new(t||e)(oe(tn))},e.\u0275prov=de({token:e,factory:e.\u0275fac}),e})();const wS=tm(iI,"browser",[{provide:qg,useValue:"browser"},{provide:Wg,useValue:function yS(){Tc.makeCurrent()},multi:!0},{provide:tn,useFactory:function DS(){return function nD(e){$a=e}(document),document},deps:[]}]),t_=new H(""),n_=[{provide:Xi,useClass:class sS{addToWindow(n){fe.getAngularTestability=(r,o=!0)=>{const i=n.findTestabilityInTree(r,o);if(null==i)throw new Error("Could not find testability for element.");return i},fe.getAllAngularTestabilities=()=>n.getAllTestabilities(),fe.getAllAngularRootElements=()=>n.getAllRootElements(),fe.frameworkStabilizers||(fe.frameworkStabilizers=[]),fe.frameworkStabilizers.push(r=>{const o=fe.getAllAngularTestabilities();let i=o.length,s=!1;const a=function(l){s=s||l,i--,0==i&&r(s)};o.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,t,r){return null==t?null:n.getTestability(t)??(r?Hn().isShadowRoot(t)?this.findTestabilityInTree(n,t.host,!0):this.findTestabilityInTree(n,t.parentElement,!0):null)}},deps:[]},{provide:Jg,useClass:tc,deps:[$e,nc,Xi]},{provide:tc,useClass:tc,deps:[$e,nc,Xi]}],r_=[{provide:Ka,useValue:"root"},{provide:dr,useFactory:function CS(){return new dr},deps:[]},{provide:gs,useClass:gS,multi:!0,deps:[tn,$e,qg]},{provide:gs,useClass:vS,multi:!0,deps:[tn]},{provide:Oc,useClass:Oc,deps:[ms,Io,vo]},{provide:jf,useExisting:Oc},{provide:Gm,useExisting:Io},{provide:Io,useClass:Io,deps:[tn]},{provide:ms,useClass:ms,deps:[gs,$e]},{provide:class AM{},useClass:aS,deps:[]},[]];let bS=(()=>{class e{constructor(t){}static withServerTransition(t){return{ngModule:e,providers:[{provide:vo,useValue:t.appId},{provide:Um,useExisting:vo},iS]}}}return e.\u0275fac=function(t){return new(t||e)(oe(t_,12))},e.\u0275mod=an({type:e}),e.\u0275inj=$t({providers:[...r_,...n_],imports:[bM,sI]}),e})();typeof window<"u"&&window;const{isArray:OS}=Array,{getPrototypeOf:RS,prototype:PS,keys:kS}=Object;const{isArray:BS}=Array;function $S(e,n){return e.reduce((t,r,o)=>(t[r]=n[o],t),{})}function US(...e){const n=function Rv(e){return me(Vs(e))?e.pop():void 0}(e),{args:t,keys:r}=function LS(e){if(1===e.length){const n=e[0];if(OS(n))return{args:n,keys:null};if(function VS(e){return e&&"object"==typeof e&&RS(e)===PS}(n)){const t=kS(n);return{args:t.map(r=>n[r]),keys:t}}}return{args:e,keys:null}}(e),o=new ze(i=>{const{length:s}=t;if(!s)return void i.complete();const a=new Array(s);let l=s,c=s;for(let u=0;u{d||(d=!0,c--),a[u]=h},()=>l--,void 0,()=>{(!l||!d)&&(c||i.next(r?$S(r,a):a),i.complete())}))}});return n?o.pipe(function jS(e){return Ps(n=>function HS(e,n){return BS(n)?e(...n):e(n)}(e,n))}(n)):o}let s_=(()=>{class e{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return e.\u0275fac=function(t){return new(t||e)(M(Rn),M(Dt))},e.\u0275dir=$({type:e}),e})(),$n=(()=>{class e extends s_{}return e.\u0275fac=function(){let n;return function(r){return(n||(n=Be(e)))(r||e)}}(),e.\u0275dir=$({type:e,features:[se]}),e})();const jt=new H("NgValueAccessor"),zS={provide:jt,useExisting:ue(()=>Lc),multi:!0};let Lc=(()=>{class e extends $n{writeValue(t){this.setProperty("checked",t)}}return e.\u0275fac=function(){let n;return function(r){return(n||(n=Be(e)))(r||e)}}(),e.\u0275dir=$({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,r){1&t&&k("change",function(i){return r.onChange(i.target.checked)})("blur",function(){return r.onTouched()})},features:[ge([zS]),se]}),e})();const GS={provide:jt,useExisting:ue(()=>Mo),multi:!0},qS=new H("CompositionEventMode");let Mo=(()=>{class e extends s_{constructor(t,r,o){super(t,r),this._compositionMode=o,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function WS(){const e=Hn()?Hn().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return e.\u0275fac=function(t){return new(t||e)(M(Rn),M(Dt),M(qS,8))},e.\u0275dir=$({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,r){1&t&&k("input",function(i){return r._handleInput(i.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(i){return r._compositionEnd(i.target.value)})},features:[ge([GS]),se]}),e})();const Ue=new H("NgValidators"),_n=new H("NgAsyncValidators");function m_(e){return null!=e}function __(e){return Hi(e)?Bs(e):e}function v_(e){let n={};return e.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function y_(e,n){return n.map(t=>t(e))}function C_(e){return e.map(n=>function YS(e){return!e.validate}(n)?n:t=>n.validate(t))}function Vc(e){return null!=e?function D_(e){if(!e)return null;const n=e.filter(m_);return 0==n.length?null:function(t){return v_(y_(t,n))}}(C_(e)):null}function Bc(e){return null!=e?function w_(e){if(!e)return null;const n=e.filter(m_);return 0==n.length?null:function(t){return US(y_(t,n).map(__)).pipe(Ps(v_))}}(C_(e)):null}function b_(e,n){return null===e?[n]:Array.isArray(e)?[...e,n]:[e,n]}function Hc(e){return e?Array.isArray(e)?e:[e]:[]}function vs(e,n){return Array.isArray(e)?e.includes(n):e===n}function M_(e,n){const t=Hc(n);return Hc(e).forEach(o=>{vs(t,o)||t.push(o)}),t}function S_(e,n){return Hc(n).filter(t=>!vs(e,t))}class A_{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=Vc(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=Bc(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class Ke extends A_{get formDirective(){return null}get path(){return null}}class vn extends A_{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class T_{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let ys=(()=>{class e extends T_{constructor(t){super(t)}}return e.\u0275fac=function(t){return new(t||e)(M(vn,2))},e.\u0275dir=$({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,r){2&t&&$i("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[se]}),e})();const So="VALID",Ds="INVALID",Nr="PENDING",Ao="DISABLED";function ws(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class O_{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===So}get invalid(){return this.status===Ds}get pending(){return this.status==Nr}get disabled(){return this.status===Ao}get enabled(){return this.status!==Ao}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(M_(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(M_(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(S_(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(S_(n,this._rawAsyncValidators))}hasValidator(n){return vs(this._rawValidators,n)}hasAsyncValidator(n){return vs(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Nr,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=Ao,this.errors=null,this._forEachChild(r=>{r.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=So,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===So||this.status===Nr)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ao:So}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Nr,this._hasOwnPendingAsyncValidator=!0;const t=__(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((r,o)=>r&&r._find(o),this)}getError(n,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new be,this.statusChanges=new be}_calculateStatus(){return this._allControlsDisabled()?Ao:this.errors?Ds:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Nr)?Nr:this._anyControlsHaveStatus(Ds)?Ds:So}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){ws(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function oA(e){return Array.isArray(e)?Vc(e):e||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function iA(e){return Array.isArray(e)?Bc(e):e||null}(this._rawAsyncValidators)}}const To=new H("CallSetDisabledState",{providedIn:"root",factory:()=>qc}),qc="always";function xo(e,n,t=qc){(function Zc(e,n){const t=function E_(e){return e._rawValidators}(e);null!==n.validator?e.setValidators(b_(t,n.validator)):"function"==typeof t&&e.setValidators([t]);const r=function I_(e){return e._rawAsyncValidators}(e);null!==n.asyncValidator?e.setAsyncValidators(b_(r,n.asyncValidator)):"function"==typeof r&&e.setAsyncValidators([r]);const o=()=>e.updateValueAndValidity();Is(n._rawValidators,o),Is(n._rawAsyncValidators,o)})(e,n),n.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(e.disabled),function lA(e,n){n.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&R_(e,n)})}(e,n),function uA(e,n){const t=(r,o)=>{n.valueAccessor.writeValue(r),o&&n.viewToModelUpdate(r)};e.registerOnChange(t),n._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,n),function cA(e,n){n.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&R_(e,n),"submit"!==e.updateOn&&e.markAsTouched()})}(e,n),function aA(e,n){if(n.valueAccessor.setDisabledState){const t=r=>{n.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(t),n._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,n)}function Is(e,n){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function R_(e,n){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function L_(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function V_(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}const B_=class extends O_{constructor(n=null,t,r){super(function zc(e){return(ws(e)?e.validators:e)||null}(t),function Gc(e,n){return(ws(n)?n.asyncValidators:e)||null}(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ws(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=V_(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){L_(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){L_(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){V_(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},vA={provide:vn,useExisting:ue(()=>Fo)},$_=(()=>Promise.resolve())();let Fo=(()=>{class e extends vn{constructor(t,r,o,i,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new B_,this._registered=!1,this.update=new be,this._parent=t,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=function Kc(e,n){if(!n)return null;let t,r,o;return Array.isArray(n),n.forEach(i=>{i.constructor===Mo?t=i:function hA(e){return Object.getPrototypeOf(e.constructor)===$n}(i)?r=i:o=i}),o||r||t||null}(0,i)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),function Yc(e,n){if(!e.hasOwnProperty("model"))return!1;const t=e.model;return!!t.isFirstChange()||!Object.is(n,t.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){xo(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){$_.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const r=t.isDisabled.currentValue,o=0!==r&&function dc(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}(r);$_.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?function bs(e,n){return[...n.path,e]}(t,this._parent):[t]}}return e.\u0275fac=function(t){return new(t||e)(M(Ke,9),M(Ue,10),M(_n,10),M(jt,10),M(um,8),M(To,8))},e.\u0275dir=$({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[ge([vA]),se,Wt]}),e})(),z_=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=an({type:e}),e.\u0275inj=$t({}),e})();const bA={provide:jt,useExisting:ue(()=>Xc),multi:!0};let Xc=(()=>{class e extends $n{writeValue(t){this.setProperty("value",parseFloat(t))}registerOnChange(t){this.onChange=r=>{t(""==r?null:parseFloat(r))}}}return e.\u0275fac=function(){let n;return function(r){return(n||(n=Be(e)))(r||e)}}(),e.\u0275dir=$({type:e,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,r){1&t&&k("change",function(i){return r.onChange(i.target.value)})("input",function(i){return r.onChange(i.target.value)})("blur",function(){return r.onTouched()})},features:[ge([bA]),se]}),e})();const TA={provide:jt,useExisting:ue(()=>Oo),multi:!0};function Y_(e,n){return null==e?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${e}: ${n}`.slice(0,50))}let Oo=(()=>{class e extends $n{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const o=Y_(this._getOptionId(t),t);this.setProperty("value",o)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){const r=function xA(e){return e.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r):t}}return e.\u0275fac=function(){let n;return function(r){return(n||(n=Be(e)))(r||e)}}(),e.\u0275dir=$({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,r){1&t&&k("change",function(i){return r.onChange(i.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[ge([TA]),se]}),e})(),ru=(()=>{class e{constructor(t,r,o){this._element=t,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Y_(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return e.\u0275fac=function(t){return new(t||e)(M(Dt),M(Rn),M(Oo,9))},e.\u0275dir=$({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),e})();const NA={provide:jt,useExisting:ue(()=>ou),multi:!0};function K_(e,n){return null==e?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${e}: ${n}`.slice(0,50))}let ou=(()=>{class e extends $n{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let r;if(this.value=t,Array.isArray(t)){const o=t.map(i=>this._getOptionId(i));r=(i,s)=>{i._setSelected(o.indexOf(s.toString())>-1)}}else r=(o,i)=>{o._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{const o=[],i=r.selectedOptions;if(void 0!==i){const s=i;for(let a=0;a{class e{constructor(t,r,o){this._element=t,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(K_(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(K_(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return e.\u0275fac=function(t){return new(t||e)(M(Dt),M(Rn),M(ou,9))},e.\u0275dir=$({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),e})(),jA=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=an({type:e}),e.\u0275inj=$t({imports:[z_]}),e})(),UA=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:To,useValue:t.callSetDisabledState??qc}]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=an({type:e}),e.\u0275inj=$t({imports:[jA]}),e})();class av{constructor(){this.riskHotspotsSettings=null,this.coverageInfoSettings=null}}class zA{constructor(){this.showLineCoverage=!0,this.showBranchCoverage=!0,this.showMethodCoverage=!0,this.visibleMetrics=[],this.groupingMaximum=0,this.grouping=0,this.historyComparisionDate="",this.historyComparisionType="",this.filter="",this.sortBy="name",this.sortOrder="asc",this.collapseStates=[]}}class GA{constructor(n){this.et="",this.et=n.et,this.cl=n.cl,this.ucl=n.ucl,this.cal=n.cal,this.tl=n.tl,this.lcq=n.lcq,this.cb=n.cb,this.tb=n.tb,this.bcq=n.bcq,this.cm=n.cm,this.tm=n.tm,this.mcq=n.mcq}get coverageRatioText(){return 0===this.tl?"-":this.cl+"/"+this.cal}get branchCoverageRatioText(){return 0===this.tb?"-":this.cb+"/"+this.tb}get methodCoverageRatioText(){return 0===this.tm?"-":this.cm+"/"+this.tm}}class yn{static roundNumber(n,t){return Math.floor(n*Math.pow(10,t))/Math.pow(10,t)}static getNthOrLastIndexOf(n,t,r){let o=0,i=-1,s=-1;for(;o{this.historicCoverages.push(new GA(r))}),this.metrics=n.metrics}get coverage(){return 0===this.coverableLines?NaN:yn.roundNumber(100*this.coveredLines/this.coverableLines,1)}visible(n,t){if(""!==n&&-1===this.name.toLowerCase().indexOf(n.toLowerCase()))return!1;if(""===t||null===this.currentHistoricCoverage)return!0;if("allChanges"===t){if(this.coveredLines===this.currentHistoricCoverage.cl&&this.uncoveredLines===this.currentHistoricCoverage.ucl&&this.coverableLines===this.currentHistoricCoverage.cal&&this.totalLines===this.currentHistoricCoverage.tl&&this.coveredBranches===this.currentHistoricCoverage.cb&&this.totalBranches===this.currentHistoricCoverage.tb&&this.coveredMethods===this.currentHistoricCoverage.cm&&this.totalMethods===this.currentHistoricCoverage.tm)return!1}else if("lineCoverageIncreaseOnly"===t){let r=this.coverage;if(isNaN(r)||r<=this.currentHistoricCoverage.lcq)return!1}else if("lineCoverageDecreaseOnly"===t){let r=this.coverage;if(isNaN(r)||r>=this.currentHistoricCoverage.lcq)return!1}else if("branchCoverageIncreaseOnly"===t){let r=this.branchCoverage;if(isNaN(r)||r<=this.currentHistoricCoverage.bcq)return!1}else if("branchCoverageDecreaseOnly"===t){let r=this.branchCoverage;if(isNaN(r)||r>=this.currentHistoricCoverage.bcq)return!1}else if("methodCoverageIncreaseOnly"===t){let r=this.methodCoverage;if(isNaN(r)||r<=this.currentHistoricCoverage.mcq)return!1}else if("methodCoverageDecreaseOnly"===t){let r=this.methodCoverage;if(isNaN(r)||r>=this.currentHistoricCoverage.mcq)return!1}return!0}updateCurrentHistoricCoverage(n){if(this.currentHistoricCoverage=null,""!==n)for(let t=0;t-1&&null===t}visible(n,t){if(""!==n&&this.name.toLowerCase().indexOf(n.toLowerCase())>-1)return!0;for(let r=0;rt.name===n.name)}toggleMetric(n){let t=this.visibleMetrics.find(r=>r.name===n.name);t?this.visibleMetrics.splice(this.visibleMetrics.indexOf(t),1):this.visibleMetrics.push(n),this.visibleMetrics=[...this.visibleMetrics],this.visibleMetricsChange.emit(this.visibleMetrics)}close(){this.visible=!1,this.visibleChange.emit(this.visible)}cancelEvent(n){n.stopPropagation()}}function XA(e,n){1&e&&N(0,"td",3)}function eT(e,n){1&e&&N(0,"td"),2&e&&Bt("green ",_().greenClass,"")}function tT(e,n){1&e&&N(0,"td"),2&e&&Bt("red ",_().redClass,"")}Po.\u0275fac=function(n){return new(n||Po)},Po.\u0275cmp=Nt({type:Po,selectors:[["popup"]],inputs:{visible:"visible",translations:"translations",branchCoverageAvailable:"branchCoverageAvailable",methodCoverageAvailable:"methodCoverageAvailable",metrics:"metrics",showLineCoverage:"showLineCoverage",showBranchCoverage:"showBranchCoverage",showMethodCoverage:"showMethodCoverage",visibleMetrics:"visibleMetrics"},outputs:{visibleChange:"visibleChange",showLineCoverageChange:"showLineCoverageChange",showBranchCoverageChange:"showBranchCoverageChange",showMethodCoverageChange:"showMethodCoverageChange",visibleMetricsChange:"visibleMetricsChange"},decls:17,vars:9,consts:[[1,"popup-container",3,"click"],[1,"popup",3,"click"],[1,"close",3,"click"],[1,"mt-1"],["type","checkbox",3,"ngModel","ngModelChange","change"],["class","mt-1",4,"ngIf"],["type","checkbox",3,"ngModel","disabled","ngModelChange","change"],[3,"translations",4,"ngIf"],[4,"ngIf"],[3,"translations"],["class","mt-1",4,"ngFor","ngForOf"],["type","checkbox",3,"checked","disabled","change"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"href"],[1,"icon-info-circled"]],template:function(n,t){1&n&&(y(0,"div",0),k("click",function(){return t.close()}),y(1,"div",1),k("click",function(o){return t.cancelEvent(o)}),y(2,"div",2),k("click",function(){return t.close()}),w(3,"X"),v(),y(4,"b"),w(5),v(),y(6,"div",3)(7,"label")(8,"input",4),k("ngModelChange",function(o){return t.showLineCoverage=o})("change",function(){return t.showLineCoverageChange.emit(t.showLineCoverage)}),v(),w(9),v()(),C(10,qA,4,2,"div",5),y(11,"div",3)(12,"label")(13,"input",6),k("ngModelChange",function(o){return t.showMethodCoverage=o})("change",function(){return t.showMethodCoverageChange.emit(t.showMethodCoverage)}),v(),w(14),v(),C(15,ZA,1,1,"pro-button",7),v(),C(16,JA,7,3,"ng-container",8),v()()),2&n&&(f(5),F(t.translations.coverageTypes),f(3),g("ngModel",t.showLineCoverage),f(1),G(" ",t.translations.coverage,""),f(1),g("ngIf",t.branchCoverageAvailable),f(3),g("ngModel",t.showMethodCoverage)("disabled",!t.methodCoverageAvailable),f(1),G(" ",t.translations.methodCoverage,""),f(1),g("ngIf",!t.methodCoverageAvailable),f(1),g("ngIf",t.metrics.length>0))},dependencies:[xr,jn,Lc,ys,Fo,Ro],encapsulation:2});class Fr{constructor(){this.grayVisible=!0,this.greenVisible=!1,this.redVisible=!1,this.greenClass="",this.redClass="",this._percentage=NaN}get percentage(){return this._percentage}set percentage(n){this._percentage=n,this.grayVisible=isNaN(n),this.greenVisible=!isNaN(n)&&Math.round(n)>0,this.redVisible=!isNaN(n)&&100-Math.round(n)>0,this.greenClass="covered"+Math.round(n),this.redClass="covered"+(100-Math.round(n))}}function rT(e,n){if(1&e&&(y(0,"th",5),w(1),v()),2&e){const t=_();f(1),F(t.element.coveredLines)}}function oT(e,n){if(1&e&&(y(0,"th",5),w(1),v()),2&e){const t=_();f(1),F(t.element.uncoveredLines)}}function iT(e,n){if(1&e&&(y(0,"th",5),w(1),v()),2&e){const t=_();f(1),F(t.element.coverableLines)}}function sT(e,n){if(1&e&&(y(0,"th",5),w(1),v()),2&e){const t=_();f(1),F(t.element.totalLines)}}function aT(e,n){if(1&e&&(y(0,"th",6),w(1),v()),2&e){const t=_();g("title",t.element.coverageRatioText),f(1),F(t.element.coveragePercentage)}}function lT(e,n){if(1&e&&(y(0,"th",5),N(1,"coverage-bar",7),v()),2&e){const t=_();f(1),g("percentage",t.element.coverage)}}function cT(e,n){if(1&e&&(y(0,"th",5),w(1),v()),2&e){const t=_();f(1),F(t.element.coveredBranches)}}function uT(e,n){if(1&e&&(y(0,"th",5),w(1),v()),2&e){const t=_();f(1),F(t.element.totalBranches)}}function dT(e,n){if(1&e&&(y(0,"th",6),w(1),v()),2&e){const t=_();g("title",t.element.branchCoverageRatioText),f(1),F(t.element.branchCoveragePercentage)}}function fT(e,n){if(1&e&&(y(0,"th",5),N(1,"coverage-bar",7),v()),2&e){const t=_();f(1),g("percentage",t.element.branchCoverage)}}function hT(e,n){if(1&e&&(y(0,"th",5),w(1),v()),2&e){const t=_();f(1),F(t.element.coveredMethods)}}function pT(e,n){if(1&e&&(y(0,"th",5),w(1),v()),2&e){const t=_();f(1),F(t.element.totalMethods)}}function gT(e,n){if(1&e&&(y(0,"th",6),w(1),v()),2&e){const t=_();g("title",t.element.methodCoverageRatioText),f(1),F(t.element.methodCoveragePercentage)}}function mT(e,n){if(1&e&&(y(0,"th",5),N(1,"coverage-bar",7),v()),2&e){const t=_();f(1),g("percentage",t.element.methodCoverage)}}function _T(e,n){1&e&&N(0,"th",5)}Fr.\u0275fac=function(n){return new(n||Fr)},Fr.\u0275cmp=Nt({type:Fr,selectors:[["coverage-bar"]],inputs:{percentage:"percentage"},decls:4,vars:3,consts:[[1,"coverage"],["class","gray covered100",4,"ngIf"],[3,"class",4,"ngIf"],[1,"gray","covered100"]],template:function(n,t){1&n&&(y(0,"table",0),C(1,XA,1,0,"td",1),C(2,eT,1,3,"td",2),C(3,tT,1,3,"td",2),v()),2&n&&(f(1),g("ngIf",t.grayVisible),f(1),g("ngIf",t.greenVisible),f(1),g("ngIf",t.redVisible))},dependencies:[jn],encapsulation:2,changeDetection:0});const vT=function(e,n){return{"icon-plus":e,"icon-minus":n}};class ko{constructor(){this.collapsed=!1,this.lineCoverageAvailable=!1,this.branchCoverageAvailable=!1,this.methodCoverageAvailable=!1,this.visibleMetrics=[]}}ko.\u0275fac=function(n){return new(n||ko)},ko.\u0275cmp=Nt({type:ko,selectors:[["","codeelement-row",""]],inputs:{element:"element",collapsed:"collapsed",lineCoverageAvailable:"lineCoverageAvailable",branchCoverageAvailable:"branchCoverageAvailable",methodCoverageAvailable:"methodCoverageAvailable",visibleMetrics:"visibleMetrics"},attrs:["codeelement-row",""],decls:19,vars:20,consts:[["href","#",3,"click"],[3,"ngClass"],["class","right",4,"ngIf"],["class","right",3,"title",4,"ngIf"],["class","right",4,"ngFor","ngForOf"],[1,"right"],[1,"right",3,"title"],[3,"percentage"]],template:function(n,t){1&n&&(y(0,"th")(1,"a",0),k("click",function(o){return t.element.toggleCollapse(o)}),N(2,"i",1),w(3),v()(),C(4,rT,2,1,"th",2),C(5,oT,2,1,"th",2),C(6,iT,2,1,"th",2),C(7,sT,2,1,"th",2),C(8,aT,2,2,"th",3),C(9,lT,2,1,"th",2),C(10,cT,2,1,"th",2),C(11,uT,2,1,"th",2),C(12,dT,2,2,"th",3),C(13,fT,2,1,"th",2),C(14,hT,2,1,"th",2),C(15,pT,2,1,"th",2),C(16,gT,2,2,"th",3),C(17,mT,2,1,"th",2),C(18,_T,1,0,"th",4)),2&n&&(f(2),g("ngClass",Vl(17,vT,t.element.collapsed,!t.element.collapsed)),f(1),G(" ",t.element.name,""),f(1),g("ngIf",t.lineCoverageAvailable),f(1),g("ngIf",t.lineCoverageAvailable),f(1),g("ngIf",t.lineCoverageAvailable),f(1),g("ngIf",t.lineCoverageAvailable),f(1),g("ngIf",t.lineCoverageAvailable),f(1),g("ngIf",t.lineCoverageAvailable),f(1),g("ngIf",t.branchCoverageAvailable),f(1),g("ngIf",t.branchCoverageAvailable),f(1),g("ngIf",t.branchCoverageAvailable),f(1),g("ngIf",t.branchCoverageAvailable),f(1),g("ngIf",t.methodCoverageAvailable),f(1),g("ngIf",t.methodCoverageAvailable),f(1),g("ngIf",t.methodCoverageAvailable),f(1),g("ngIf",t.methodCoverageAvailable),f(1),g("ngForOf",t.visibleMetrics))},dependencies:[wo,xr,jn,Fr],encapsulation:2,changeDetection:0});class Lo{constructor(){this.path=null,this._historicCoverages=[]}get historicCoverages(){return this._historicCoverages}set historicCoverages(n){if(this._historicCoverages=n,n.length>1){let t="";for(let r=0;r1),f(1),g("ngIf",null!==t.clazz.currentHistoricCoverage),f(1),g("ngIf",null===t.clazz.currentHistoricCoverage)}}function BT(e,n){if(1&e&&(y(0,"td",6),N(1,"coverage-bar",12),v()),2&e){const t=_();f(1),g("percentage",t.clazz.coverage)}}function HT(e,n){if(1&e&&(J(0),y(1,"div"),w(2),v(),y(3,"div",7),w(4),v(),X()),2&e){const t=_(2);f(1),Bt("currenthistory ",t.getClassName(t.clazz.coveredBranches,t.clazz.currentHistoricCoverage.cb),""),f(1),G(" ",t.clazz.coveredBranches," "),f(1),g("title",t.clazz.currentHistoricCoverage.et),f(1),G(" ",t.clazz.currentHistoricCoverage.cb," ")}}function jT(e,n){if(1&e&&(J(0),w(1),X()),2&e){const t=_(2);f(1),G(" ",t.clazz.coveredBranches," ")}}function $T(e,n){if(1&e&&(y(0,"td",6),C(1,HT,5,6,"ng-container",1),C(2,jT,2,1,"ng-container",1),v()),2&e){const t=_();f(1),g("ngIf",null!==t.clazz.currentHistoricCoverage),f(1),g("ngIf",null===t.clazz.currentHistoricCoverage)}}function UT(e,n){if(1&e&&(J(0),y(1,"div",8),w(2),v(),y(3,"div",7),w(4),v(),X()),2&e){const t=_(2);f(2),F(t.clazz.totalBranches),f(1),g("title",t.clazz.currentHistoricCoverage.et),f(1),F(t.clazz.currentHistoricCoverage.tb)}}function zT(e,n){if(1&e&&(J(0),w(1),X()),2&e){const t=_(2);f(1),G(" ",t.clazz.totalBranches," ")}}function GT(e,n){if(1&e&&(y(0,"td",6),C(1,UT,5,3,"ng-container",1),C(2,zT,2,1,"ng-container",1),v()),2&e){const t=_();f(1),g("ngIf",null!==t.clazz.currentHistoricCoverage),f(1),g("ngIf",null===t.clazz.currentHistoricCoverage)}}function WT(e,n){if(1&e&&N(0,"div",14),2&e){const t=_(2);fn("title",t.translations.history+": "+t.translations.branchCoverage),g("historicCoverages",t.clazz.branchCoverageHistory)("ngClass",Zi(3,lu,null!==t.clazz.currentHistoricCoverage))}}function qT(e,n){if(1&e&&(J(0),y(1,"div"),w(2),v(),y(3,"div",7),w(4),v(),X()),2&e){const t=_(2);f(1),Bt("currenthistory ",t.getClassName(t.clazz.branchCoverage,t.clazz.currentHistoricCoverage.bcq),""),f(1),G(" ",t.clazz.branchCoveragePercentage," "),f(1),g("title",t.clazz.currentHistoricCoverage.et+": "+t.clazz.currentHistoricCoverage.branchCoverageRatioText),f(1),G("",t.clazz.currentHistoricCoverage.bcq,"%")}}function ZT(e,n){if(1&e&&(J(0),w(1),X()),2&e){const t=_(2);f(1),G(" ",t.clazz.branchCoveragePercentage," ")}}function QT(e,n){if(1&e&&(y(0,"td",9),C(1,WT,1,5,"div",13),C(2,qT,5,6,"ng-container",1),C(3,ZT,2,1,"ng-container",1),v()),2&e){const t=_();g("title",t.clazz.branchCoverageRatioText),f(1),g("ngIf",t.clazz.branchCoverageHistory.length>1),f(1),g("ngIf",null!==t.clazz.currentHistoricCoverage),f(1),g("ngIf",null===t.clazz.currentHistoricCoverage)}}function YT(e,n){if(1&e&&(y(0,"td",6),N(1,"coverage-bar",12),v()),2&e){const t=_();f(1),g("percentage",t.clazz.branchCoverage)}}function KT(e,n){if(1&e&&(J(0),y(1,"div"),w(2),v(),y(3,"div",7),w(4),v(),X()),2&e){const t=_(2);f(1),Bt("currenthistory ",t.getClassName(t.clazz.coveredMethods,t.clazz.currentHistoricCoverage.cm),""),f(1),G(" ",t.clazz.coveredMethods," "),f(1),g("title",t.clazz.currentHistoricCoverage.et),f(1),G(" ",t.clazz.currentHistoricCoverage.cm," ")}}function JT(e,n){if(1&e&&(J(0),w(1),X()),2&e){const t=_(2);f(1),G(" ",t.clazz.coveredMethods," ")}}function XT(e,n){if(1&e&&(y(0,"td",6),C(1,KT,5,6,"ng-container",1),C(2,JT,2,1,"ng-container",1),v()),2&e){const t=_();f(1),g("ngIf",null!==t.clazz.currentHistoricCoverage),f(1),g("ngIf",null===t.clazz.currentHistoricCoverage)}}function ex(e,n){if(1&e&&(J(0),y(1,"div",8),w(2),v(),y(3,"div",7),w(4),v(),X()),2&e){const t=_(2);f(2),F(t.clazz.totalMethods),f(1),g("title",t.clazz.currentHistoricCoverage.et),f(1),F(t.clazz.currentHistoricCoverage.tm)}}function tx(e,n){if(1&e&&(J(0),w(1),X()),2&e){const t=_(2);f(1),G(" ",t.clazz.totalMethods," ")}}function nx(e,n){if(1&e&&(y(0,"td",6),C(1,ex,5,3,"ng-container",1),C(2,tx,2,1,"ng-container",1),v()),2&e){const t=_();f(1),g("ngIf",null!==t.clazz.currentHistoricCoverage),f(1),g("ngIf",null===t.clazz.currentHistoricCoverage)}}function rx(e,n){if(1&e&&N(0,"div",16),2&e){const t=_(2);fn("title",t.translations.history+": "+t.translations.methodCoverage),g("historicCoverages",t.clazz.methodCoverageHistory)("ngClass",Zi(3,lu,null!==t.clazz.currentHistoricCoverage))}}function ox(e,n){if(1&e&&(J(0),y(1,"div"),w(2),v(),y(3,"div",7),w(4),v(),X()),2&e){const t=_(2);f(1),Bt("currenthistory ",t.getClassName(t.clazz.methodCoverage,t.clazz.currentHistoricCoverage.mcq),""),f(1),G(" ",t.clazz.methodCoveragePercentage," "),f(1),g("title",t.clazz.currentHistoricCoverage.et+": "+t.clazz.currentHistoricCoverage.methodCoverageRatioText),f(1),G("",t.clazz.currentHistoricCoverage.mcq,"%")}}function ix(e,n){if(1&e&&(J(0),w(1),X()),2&e){const t=_(2);f(1),G(" ",t.clazz.methodCoveragePercentage," ")}}function sx(e,n){if(1&e&&(y(0,"td",9),C(1,rx,1,5,"div",15),C(2,ox,5,6,"ng-container",1),C(3,ix,2,1,"ng-container",1),v()),2&e){const t=_();g("title",t.clazz.methodCoverageRatioText),f(1),g("ngIf",t.clazz.methodCoverageHistory.length>1),f(1),g("ngIf",null!==t.clazz.currentHistoricCoverage),f(1),g("ngIf",null===t.clazz.currentHistoricCoverage)}}function ax(e,n){if(1&e&&(y(0,"td",6),N(1,"coverage-bar",12),v()),2&e){const t=_();f(1),g("percentage",t.clazz.methodCoverage)}}function lx(e,n){if(1&e&&(y(0,"td",6),w(1),v()),2&e){const t=n.$implicit,r=_();f(1),F(r.clazz.metrics[t.abbreviation])}}class Vo{constructor(){this.translations={},this.lineCoverageAvailable=!1,this.branchCoverageAvailable=!1,this.methodCoverageAvailable=!1,this.visibleMetrics=[],this.historyComparisionDate=""}getClassName(n,t){return n>t?"lightgreen":n0),f(2),G(" ",t.translations.grouping," "),f(1),g("max",t.settings.groupingMaximum)("ngModel",t.settings.grouping),f(2),g("ngIf",t.historicCoverageExecutionTimes.length>0),f(5),F(t.metrics.length>0?t.translations.selectCoverageTypesAndMetrics:t.translations.selectCoverageTypes),f(4),G("",t.translations.filter," "),f(1),g("ngModel",t.settings.filter),f(5),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.branchCoverageAvailable&&t.settings.showBranchCoverage),f(1),g("ngIf",t.branchCoverageAvailable&&t.settings.showBranchCoverage),f(1),g("ngIf",t.branchCoverageAvailable&&t.settings.showBranchCoverage),f(1),g("ngIf",t.branchCoverageAvailable&&t.settings.showBranchCoverage),f(1),g("ngIf",t.methodCoverageAvailable&&t.settings.showMethodCoverage),f(1),g("ngIf",t.methodCoverageAvailable&&t.settings.showMethodCoverage),f(1),g("ngIf",t.methodCoverageAvailable&&t.settings.showMethodCoverage),f(1),g("ngIf",t.methodCoverageAvailable&&t.settings.showMethodCoverage),f(1),g("ngForOf",t.settings.visibleMetrics),f(4),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.branchCoverageAvailable&&t.settings.showBranchCoverage),f(1),g("ngIf",t.methodCoverageAvailable&&t.settings.showMethodCoverage),f(1),g("ngIf",t.settings.visibleMetrics.length>0),f(4),g("ngClass",Oe(47,ct,"name"===t.settings.sortBy&&"desc"===t.settings.sortOrder,"name"===t.settings.sortBy&&"asc"===t.settings.sortOrder,"name"!==t.settings.sortBy)),f(1),F(t.translations.name),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.settings.showLineCoverage),f(1),g("ngIf",t.branchCoverageAvailable&&t.settings.showBranchCoverage),f(1),g("ngIf",t.branchCoverageAvailable&&t.settings.showBranchCoverage),f(1),g("ngIf",t.branchCoverageAvailable&&t.settings.showBranchCoverage),f(1),g("ngIf",t.methodCoverageAvailable&&t.settings.showMethodCoverage),f(1),g("ngIf",t.methodCoverageAvailable&&t.settings.showMethodCoverage),f(1),g("ngIf",t.methodCoverageAvailable&&t.settings.showMethodCoverage),f(1),g("ngForOf",t.settings.visibleMetrics),f(2),g("ngForOf",t.codeElements)}}class Bo{constructor(n){this.queryString="",this.historicCoverageExecutionTimes=[],this.branchCoverageAvailable=!1,this.methodCoverageAvailable=!1,this.metrics=[],this.codeElements=[],this.translations={},this.popupVisible=!1,this.settings=new zA,this.window=n.nativeWindow}ngOnInit(){this.historicCoverageExecutionTimes=this.window.historicCoverageExecutionTimes,this.branchCoverageAvailable=this.window.branchCoverageAvailable,this.methodCoverageAvailable=this.window.methodCoverageAvailable,this.metrics=this.window.metrics,this.translations=this.window.translations;let n=!1;if(void 0!==this.window.history&&void 0!==this.window.history.replaceState&&null!==this.window.history.state&&null!=this.window.history.state.coverageInfoSettings)console.log("Coverage info: Restoring from history",this.window.history.state.coverageInfoSettings),n=!0,this.settings=JSON.parse(JSON.stringify(this.window.history.state.coverageInfoSettings));else{let r=0,o=this.window.assemblies;for(let i=0;i-1&&(this.queryString=window.location.href.substring(t)),this.updateCoverageInfo(),n&&this.restoreCollapseState()}onBeforeUnload(){if(this.saveCollapseState(),void 0!==this.window.history&&void 0!==this.window.history.replaceState){console.log("Coverage info: Updating history",this.settings);let n=new av;null!==window.history.state&&(n=JSON.parse(JSON.stringify(this.window.history.state))),n.coverageInfoSettings=JSON.parse(JSON.stringify(this.settings)),window.history.replaceState(n,"")}}updateCoverageInfo(){let n=(new Date).getTime(),t=this.window.assemblies,r=[],o=0;if(0===this.settings.grouping)for(let a=0;a{for(let r=0;r{for(let o=0;on&&(r[o].collapsed=this.settings.collapseStates[n]),n++,t(r[o].subElements)};t(this.codeElements)}}Bo.\u0275fac=function(n){return new(n||Bo)(M(Dn))},Bo.\u0275cmp=Nt({type:Bo,selectors:[["coverage-info"]],hostBindings:function(n,t){1&n&&k("beforeunload",function(){return t.onBeforeUnload()},0,ol)},decls:1,vars:1,consts:[[4,"ngIf"],[3,"visible","translations","branchCoverageAvailable","methodCoverageAvailable","metrics","showLineCoverage","showBranchCoverage","showMethodCoverage","visibleMetrics","visibleChange","showLineCoverageChange","showBranchCoverageChange","showMethodCoverageChange","visibleMetricsChange",4,"ngIf"],[1,"customizebox"],["href","#",3,"click"],[1,"center"],["type","range","step","1","min","-1",3,"max","ngModel","ngModelChange"],[1,"right"],["type","button",3,"click"],[1,"icon-cog"],["type","text",3,"ngModel","ngModelChange"],[1,"table-responsive"],[1,"overview","table-fixed","stripped"],[1,"column-min-200"],["class","column90",4,"ngIf"],["class","column105",4,"ngIf"],["class","column100",4,"ngIf"],["class","column70",4,"ngIf"],["class","column98",4,"ngIf"],["class","column112",4,"ngIf"],["class","column112",4,"ngFor","ngForOf"],[1,"header"],["class","center","colspan","6",4,"ngIf"],["class","center","colspan","4",4,"ngIf"],["class","center",4,"ngIf"],[1,"icon-down-dir",3,"ngClass"],["class","right",4,"ngIf"],["class","center","colspan","2",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"visible","translations","branchCoverageAvailable","methodCoverageAvailable","metrics","showLineCoverage","showBranchCoverage","showMethodCoverage","visibleMetrics","visibleChange","showLineCoverageChange","showBranchCoverageChange","showMethodCoverageChange","visibleMetricsChange"],[3,"ngModel","ngModelChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["value","allChanges"],["value","lineCoverageIncreaseOnly"],["value","lineCoverageDecreaseOnly"],["value","branchCoverageIncreaseOnly",4,"ngIf"],["value","branchCoverageDecreaseOnly",4,"ngIf"],["value","methodCoverageIncreaseOnly",4,"ngIf"],["value","methodCoverageDecreaseOnly",4,"ngIf"],["value","branchCoverageIncreaseOnly"],["value","branchCoverageDecreaseOnly"],["value","methodCoverageIncreaseOnly"],["value","methodCoverageDecreaseOnly"],[1,"column90"],[1,"column105"],[1,"column100"],[1,"column70"],[1,"column98"],[1,"column112"],["colspan","6",1,"center"],["colspan","4",1,"center"],["colspan","2",1,"center"],["target","_blank",3,"href"],[1,"icon-info-circled"],["codeelement-row","",3,"element","collapsed","lineCoverageAvailable","branchCoverageAvailable","methodCoverageAvailable","visibleMetrics",4,"ngIf"],["codeelement-row","",3,"element","collapsed","lineCoverageAvailable","branchCoverageAvailable","methodCoverageAvailable","visibleMetrics"],["class-row","",3,"clazz","translations","lineCoverageAvailable","branchCoverageAvailable","methodCoverageAvailable","visibleMetrics","historyComparisionDate",4,"ngIf"],["class-row","",3,"clazz","translations","lineCoverageAvailable","branchCoverageAvailable","methodCoverageAvailable","visibleMetrics","historyComparisionDate"],["codeelement-row","",1,"namespace",3,"element","collapsed","lineCoverageAvailable","branchCoverageAvailable","methodCoverageAvailable","visibleMetrics"],["class","namespace","class-row","",3,"clazz","translations","lineCoverageAvailable","branchCoverageAvailable","methodCoverageAvailable","visibleMetrics","historyComparisionDate",4,"ngIf"],["class-row","",1,"namespace",3,"clazz","translations","lineCoverageAvailable","branchCoverageAvailable","methodCoverageAvailable","visibleMetrics","historyComparisionDate"]],template:function(n,t){1&n&&C(0,sN,73,51,"div",0),2&n&&g("ngIf",t.codeElements.length>0)},dependencies:[wo,xr,jn,ru,iu,Mo,Xc,Oo,ys,Fo,Po,ko,Vo],encapsulation:2});class aN{constructor(){this.assembly="",this.numberOfRiskHotspots=10,this.filter="",this.sortBy="",this.sortOrder="asc"}}function lN(e,n){if(1&e&&(y(0,"option",15),w(1),v()),2&e){const t=n.$implicit;g("value",t),f(1),F(t)}}function cN(e,n){if(1&e&&(y(0,"span"),w(1),v()),2&e){const t=_(2);f(1),F(t.translations.top)}}function uN(e,n){1&e&&(y(0,"option",22),w(1,"20"),v())}function dN(e,n){1&e&&(y(0,"option",23),w(1,"50"),v())}function fN(e,n){1&e&&(y(0,"option",24),w(1,"100"),v())}function hN(e,n){if(1&e&&(y(0,"option",15),w(1),v()),2&e){const t=_(3);g("value",t.totalNumberOfRiskHotspots),f(1),F(t.translations.all)}}function pN(e,n){if(1&e){const t=Ce();y(0,"select",16),k("ngModelChange",function(o){return Q(t),Y(_(2).settings.numberOfRiskHotspots=o)}),y(1,"option",17),w(2,"10"),v(),C(3,uN,2,0,"option",18),C(4,dN,2,0,"option",19),C(5,fN,2,0,"option",20),C(6,hN,2,2,"option",21),v()}if(2&e){const t=_(2);g("ngModel",t.settings.numberOfRiskHotspots),f(3),g("ngIf",t.totalNumberOfRiskHotspots>10),f(1),g("ngIf",t.totalNumberOfRiskHotspots>20),f(1),g("ngIf",t.totalNumberOfRiskHotspots>50),f(1),g("ngIf",t.totalNumberOfRiskHotspots>100)}}function gN(e,n){1&e&&N(0,"col",25)}const Ss=function(e,n,t){return{"icon-up-dir_active":e,"icon-down-dir_active":n,"icon-down-dir":t}};function mN(e,n){if(1&e){const t=Ce();y(0,"th")(1,"a",12),k("click",function(o){const s=Q(t).index;return Y(_(2).updateSorting(""+s,o))}),N(2,"i",13),w(3),v(),y(4,"a",26),N(5,"i",27),v()()}if(2&e){const t=n.$implicit,r=n.index,o=_(2);f(2),g("ngClass",Oe(3,Ss,o.settings.sortBy===""+r&&"desc"===o.settings.sortOrder,o.settings.sortBy===""+r&&"asc"===o.settings.sortOrder,o.settings.sortBy!==""+r)),f(1),F(t.name),f(1),fn("href",t.explanationUrl,un)}}const _N=function(e,n){return{lightred:e,lightgreen:n}};function vN(e,n){if(1&e&&(y(0,"td",31),w(1),v()),2&e){const t=n.$implicit;g("ngClass",Vl(2,_N,t.exceeded,!t.exceeded)),f(1),F(t.value)}}function yN(e,n){if(1&e&&(y(0,"tr")(1,"td"),w(2),v(),y(3,"td")(4,"a",28),w(5),v()(),y(6,"td",29)(7,"a",28),w(8),v()(),C(9,vN,2,5,"td",30),v()),2&e){const t=n.$implicit,r=_(2);f(2),F(t.assembly),f(2),g("href",t.reportPath+r.queryString,un),f(1),F(t.class),f(1),g("title",t.methodName),f(1),g("href",t.reportPath+r.queryString+"#file"+t.fileIndex+"_line"+t.line,un),f(1),G(" ",t.methodShortName," "),f(1),g("ngForOf",t.metrics)}}function CN(e,n){if(1&e){const t=Ce();y(0,"div")(1,"div",1)(2,"div")(3,"select",2),k("ngModelChange",function(o){return Q(t),Y(_().settings.assembly=o)})("ngModelChange",function(){return Q(t),Y(_().updateRiskHotpots())}),y(4,"option",3),w(5),v(),C(6,lN,2,2,"option",4),v()(),y(7,"div",5),C(8,cN,2,1,"span",0),C(9,pN,7,5,"select",6),v(),N(10,"div",5),y(11,"div",7)(12,"span"),w(13),v(),y(14,"input",8),k("ngModelChange",function(o){return Q(t),Y(_().settings.filter=o)})("ngModelChange",function(){return Q(t),Y(_().updateRiskHotpots())}),v()()(),y(15,"div",9)(16,"table",10)(17,"colgroup"),N(18,"col")(19,"col")(20,"col"),C(21,gN,1,0,"col",11),v(),y(22,"thead")(23,"tr")(24,"th")(25,"a",12),k("click",function(o){return Q(t),Y(_().updateSorting("assembly",o))}),N(26,"i",13),w(27),v()(),y(28,"th")(29,"a",12),k("click",function(o){return Q(t),Y(_().updateSorting("class",o))}),N(30,"i",13),w(31),v()(),y(32,"th")(33,"a",12),k("click",function(o){return Q(t),Y(_().updateSorting("method",o))}),N(34,"i",13),w(35),v()(),C(36,mN,6,7,"th",14),v()(),y(37,"tbody"),C(38,yN,10,7,"tr",14),function mg(e,n){const t=ee();let r;const o=e+22;t.firstCreatePass?(r=function VE(e,n){if(n)for(let t=n.length-1;t>=0;t--){const r=n[t];if(e===r.name)return r}}(n,t.pipeRegistry),t.data[o]=r,r.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(o,r.onDestroy)):r=t.data[o];const i=r.factory||(r.factory=Sn(r.type)),s=dt(M);try{const a=di(!1),l=i();return di(a),function Ib(e,n,t,r){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),n[t]=r}(t,E(),o,l),l}finally{dt(s)}}(39,"slice"),v()()()()}if(2&e){const t=_();f(3),g("ngModel",t.settings.assembly),f(2),F(t.translations.assembly),f(1),g("ngForOf",t.assemblies),f(2),g("ngIf",t.totalNumberOfRiskHotspots>10),f(1),g("ngIf",t.totalNumberOfRiskHotspots>10),f(4),G("",t.translations.filter," "),f(1),g("ngModel",t.settings.filter),f(7),g("ngForOf",t.riskHotspotMetrics),f(5),g("ngClass",Oe(20,Ss,"assembly"===t.settings.sortBy&&"desc"===t.settings.sortOrder,"assembly"===t.settings.sortBy&&"asc"===t.settings.sortOrder,"assembly"!==t.settings.sortBy)),f(1),F(t.translations.assembly),f(3),g("ngClass",Oe(24,Ss,"class"===t.settings.sortBy&&"desc"===t.settings.sortOrder,"class"===t.settings.sortBy&&"asc"===t.settings.sortOrder,"class"!==t.settings.sortBy)),f(1),F(t.translations.class),f(3),g("ngClass",Oe(28,Ss,"method"===t.settings.sortBy&&"desc"===t.settings.sortOrder,"method"===t.settings.sortBy&&"asc"===t.settings.sortOrder,"method"!==t.settings.sortBy)),f(1),F(t.translations.method),f(1),g("ngForOf",t.riskHotspotMetrics),f(2),g("ngForOf",function _g(e,n,t,r,o){const i=e+22,s=E(),a=function Kn(e,n){return e[n]}(s,i);return function mo(e,n){return e[1].data[n].pure}(s,i)?hg(s,qe(),n,a.transform,t,r,o,a):a.transform(t,r,o)}(39,16,t.riskHotspots,0,t.settings.numberOfRiskHotspots))}}class Ho{constructor(n){this.queryString="",this.riskHotspotMetrics=[],this.riskHotspots=[],this.totalNumberOfRiskHotspots=0,this.assemblies=[],this.translations={},this.settings=new aN,this.window=n.nativeWindow}ngOnInit(){this.riskHotspotMetrics=this.window.riskHotspotMetrics,this.translations=this.window.translations,void 0!==this.window.history&&void 0!==this.window.history.replaceState&&null!==this.window.history.state&&null!=this.window.history.state.riskHotspotsSettings&&(console.log("Risk hotspots: Restoring from history",this.window.history.state.riskHotspotsSettings),this.settings=JSON.parse(JSON.stringify(this.window.history.state.riskHotspotsSettings)));const n=window.location.href.indexOf("?");n>-1&&(this.queryString=window.location.href.substring(n)),this.updateRiskHotpots()}onDonBeforeUnlodad(){if(void 0!==this.window.history&&void 0!==this.window.history.replaceState){console.log("Risk hotspots: Updating history",this.settings);let n=new av;null!==window.history.state&&(n=JSON.parse(JSON.stringify(this.window.history.state))),n.riskHotspotsSettings=JSON.parse(JSON.stringify(this.settings)),window.history.replaceState(n,"")}}updateRiskHotpots(){const n=this.window.riskHotspots;if(this.totalNumberOfRiskHotspots=n.length,0===this.assemblies.length){let i=[];for(let s=0;s0)},dependencies:[wo,xr,jn,ru,iu,Mo,Oo,ys,Fo,Pm],encapsulation:2});class Or{}Or.\u0275fac=function(n){return new(n||Or)},Or.\u0275mod=an({type:Or,bootstrap:[Ho,Bo]}),Or.\u0275inj=$t({providers:[Dn],imports:[bS,UA]}),wS().bootstrapModule(Or).catch(e=>console.error(e))}},me=>{me(me.s=938)}]); \ No newline at end of file diff --git a/BlazorShop.UnitTests/codecoverage/report.css b/BlazorShop.UnitTests/codecoverage/report.css deleted file mode 100644 index 920d89ab..00000000 --- a/BlazorShop.UnitTests/codecoverage/report.css +++ /dev/null @@ -1,772 +0,0 @@ -html { font-family: sans-serif; margin: 0; padding: 0; font-size: 0.9em; background-color: #d6d6d6; height: 100%; } -body { margin: 0; padding: 0; height: 100%; color: #000; } -h1 { font-family: 'Century Gothic', sans-serif; font-size: 1.2em; font-weight: normal; color: #fff; background-color: #6f6f6f; padding: 10px; margin: 20px -20px 20px -20px; } -h1:first-of-type { margin-top: 0; } -h2 { font-size: 1.0em; font-weight: bold; margin: 10px 0 15px 0; padding: 0; } -h3 { font-size: 1.0em; font-weight: bold; margin: 0 0 10px 0; padding: 0; display: inline-block; } -input, select, button { border: 1px solid #767676; border-radius: 0; } -button { background-color: #ddd; cursor: pointer; } -a { color: #c00; text-decoration: none; } -a:hover { color: #000; text-decoration: none; } -h1 a.back { color: #fff; background-color: #949494; display: inline-block; margin: -12px 5px -10px -10px; padding: 10px; border-right: 1px solid #fff; } -h1 a.back:hover { background-color: #ccc; } -h1 a.button { color: #000; background-color: #bebebe; margin: -5px 0 0 10px; padding: 5px 8px 5px 8px; border: 1px solid #fff; font-size: 0.9em; border-radius: 3px; float:right; } -h1 a.button:hover { background-color: #ccc; } -h1 a.button i { position: relative; top: 1px; } - -.container { margin: auto; max-width: 1650px; width: 90%; background-color: #fff; display: flex; box-shadow: 0 0 60px #7d7d7d; min-height: 100%; } -.containerleft { padding: 0 20px 20px 20px; flex: 1; min-width: 1%; } -.containerright { width: 340px; min-width: 340px; background-color: #e5e5e5; height: 100%; } -.containerrightfixed { position: fixed; padding: 0 20px 20px 20px; border-left: 1px solid #6f6f6f; width: 300px; overflow-y: auto; height: 100%; top: 0; bottom: 0; } -.containerrightfixed h1 { background-color: #c00; } -.containerrightfixed label, .containerright a { white-space: nowrap; overflow: hidden; display: inline-block; width: 100%; max-width: 300px; text-overflow: ellipsis; } -.containerright a { margin-bottom: 3px; } - -@media screen and (max-width:1200px){ - .container { box-shadow: none; width: 100%; } - .containerright { display: none; } -} - -.popup-container { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background-color: rgb(0, 0, 0, 0.6); z-index: 100; } -.popup { position: absolute; top: 50%; right: 50%; transform: translate(50%,-50%); background-color: #fff; padding: 25px; border-radius: 15px; min-width: 300px; } -.popup .close { text-align: right; color: #979797; font-size: 25px;position: relative; left: 10px; bottom: 10px; cursor: pointer; } - -.footer { font-size: 0.7em; text-align: center; margin-top: 35px; } - -.card-group { display: flex; flex-wrap: wrap; margin-top: -15px; margin-left: -15px; } -.card-group + .card-group { margin-top: 0; } -.card-group .card { margin-top: 15px; margin-left: 15px; display: flex; flex-direction: column; background-color: #e4e4e4; background: radial-gradient(circle, #fefefe 0%, #f6f6f6 100%); border: 1px solid #c1c1c1; padding: 15px; color: #6f6f6f; max-width: 100% } -.card-group .card .card-header { font-size: 1.5rem; font-family: 'Century Gothic', sans-serif; margin-bottom: 15px; flex-grow: 1; } -.card-group .card .card-body { display: flex; flex-direction: row; gap: 15px; flex-grow: 1; } -.card-group .card .card-body div.table { display: flex; flex-direction: column; } -.card-group .card .large { font-size: 5rem; line-height: 5rem; font-weight: bold; align-self: flex-end; border-left-width: 4px; padding-left: 10px; } -.card-group .card table { align-self: flex-end; border-collapse: collapse; } -.card-group .card table tr { border-bottom: 1px solid #c1c1c1; } -.card-group .card table tr:hover { background-color: #c1c1c1; } -.card-group .card table tr:last-child { border-bottom: none; } -.card-group .card table th, .card-group .card table td { padding: 2px; } -.card-group td.limit-width { max-width: 200px; text-overflow: ellipsis; overflow: hidden; } -.card-group td.overflow-wrap { overflow-wrap: anywhere; } - -.pro-button { color: #fff; background-color: #20A0D2; background-image: linear-gradient(50deg, #1c7ed6 0%, #23b8cf 100%); padding: 10px; border-radius: 3px; font-weight: bold; display: inline-block; } -.pro-button:hover { color: #fff; background-color: #1C8EB7; background-image: linear-gradient(50deg, #1A6FBA 0%, #1EA1B5 100%); } -.pro-button-tiny { border-radius: 10px; padding: 3px 8px; } - -th { text-align: left; } -.table-fixed { table-layout: fixed; } -.table-responsive { overflow-x: auto; } -.table-responsive::-webkit-scrollbar { height: 20px; } -.table-responsive::-webkit-scrollbar-thumb { background-color: #6f6f6f; border-radius: 20px; border: 5px solid #fff; } -.overview { border: 1px solid #c1c1c1; border-collapse: collapse; width: 100%; word-wrap: break-word; } -.overview th { border: 1px solid #c1c1c1; border-collapse: collapse; padding: 2px 4px 2px 4px; background-color: #ddd; } -.overview tr.namespace th { background-color: #dcdcdc; } -.overview thead th { background-color: #d1d1d1; } -.overview th a { color: #000; } -.overview tr.namespace a { margin-left: 15px; display: block; } -.overview td { border: 1px solid #c1c1c1; border-collapse: collapse; padding: 2px 5px 2px 5px; } -.overview tr.header th { background-color: #d1d1d1; } -.overview tr.header th:nth-child(2n+1) { background-color: #ddd; } -.overview tr.header th:first-child { border-left: 1px solid #fff; border-top: 1px solid #fff; background-color: #fff; } -.overview tr:hover>td { background-color: #b0b0b0; } - -div.currenthistory { margin: -2px -5px 0 -5px; padding: 2px 5px 2px 5px; height: 16px; } -.coverage { border-collapse: collapse; font-size: 5px; height: 10px; } -.coverage td { padding: 0; border: none; } -.stripped tr:nth-child(2n+1) { background-color: #F3F3F3; } - -.customizebox { font-size: 0.75em; margin-bottom: 7px; } -.customizebox>div { width: 25%; display: inline-block; } -.customizebox div.right input { width: 150px; } -#namespaceslider { width: 200px; display: inline-block; margin-left: 8px; } - -.percentagebar { - padding-left: 3px; -} -a.percentagebar { - padding-left: 6px; -} -.percentagebarundefined { - border-left: 2px solid #fff; -} -.percentagebar0 { - border-left: 2px solid #c10909; -} -.percentagebar10 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 90%, #0aad0a 90%, #0aad0a 100%) 1; -} -.percentagebar20 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 80%, #0aad0a 80%, #0aad0a 100%) 1; -} -.percentagebar30 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 70%, #0aad0a 70%, #0aad0a 100%) 1; -} -.percentagebar40 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 60%, #0aad0a 60%, #0aad0a 100%) 1; -} -.percentagebar50 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 50%, #0aad0a 50%, #0aad0a 100%) 1; -} -.percentagebar60 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 40%, #0aad0a 40%, #0aad0a 100%) 1; -} -.percentagebar70 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 30%, #0aad0a 30%, #0aad0a 100%) 1; -} -.percentagebar80 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 20%, #0aad0a 20%, #0aad0a 100%) 1; -} -.percentagebar90 { - border-left: 2px solid; - border-image: linear-gradient(to bottom, #c10909 10%, #0aad0a 10%, #0aad0a 100%) 1; -} -.percentagebar100 { - border-left: 2px solid #0aad0a; -} - -.mt-1 { margin-top: 4px; } -.hidden, .ng-hide { display: none; } -.right { text-align: right; } -.center { text-align: center; } -.rightmargin { padding-right: 8px; } -.leftmargin { padding-left: 5px; } -.green { background-color: #0aad0a; } -.lightgreen { background-color: #dcf4dc; } -.red { background-color: #c10909; } -.lightred { background-color: #f7dede; } -.orange { background-color: #FFA500; } -.lightorange { background-color: #FFEFD5; } -.gray { background-color: #dcdcdc; } -.lightgray { color: #888888; } -.lightgraybg { background-color: #dadada; } - -code { font-family: Consolas, monospace; font-size: 0.9em; } - -.toggleZoom { text-align:right; } - -.ct-chart { position: relative; } -.ct-chart .ct-line { stroke-width: 2px !important; } -.ct-chart .ct-point { stroke-width: 6px !important; transition: stroke-width .2s; } -.ct-chart .ct-point:hover { stroke-width: 10px !important; } -.ct-chart .ct-series.ct-series-a .ct-line, .ct-chart .ct-series.ct-series-a .ct-point { stroke: #c00 !important;} -.ct-chart .ct-series.ct-series-b .ct-line, .ct-chart .ct-series.ct-series-b .ct-point { stroke: #1c2298 !important;} -.ct-chart .ct-series.ct-series-c .ct-line, .ct-chart .ct-series.ct-series-c .ct-point { stroke: #0aad0a !important;} - -.tinylinecoveragechart, .tinybranchcoveragechart, .tinymethodcoveragechart { background-color: #fff; margin-left: -3px; float: left; border: 1px solid #c1c1c1; width: 30px; height: 18px; } -.historiccoverageoffset { margin-top: 7px; } - -.tinylinecoveragechart .ct-line, .tinybranchcoveragechart .ct-line, .tinymethodcoveragechart .ct-line { stroke-width: 1px !important; } -.tinybranchcoveragechart .ct-series.ct-series-a .ct-line { stroke: #1c2298 !important; } -.tinymethodcoveragechart .ct-series.ct-series-a .ct-line { stroke: #0aad0a !important; } - -.linecoverage { background-color: #c00; width: 10px; height: 8px; border: 1px solid #000; display: inline-block; } -.branchcoverage { background-color: #1c2298; width: 10px; height: 8px; border: 1px solid #000; display: inline-block; } -.codeelementcoverage { background-color: #0aad0a; width: 10px; height: 8px; border: 1px solid #000; display: inline-block; } - -.tooltip { position: absolute; display: none; padding: 5px; background: #F4C63D; color: #453D3F; pointer-events: none; z-index: 1; min-width: 250px; } - -.column-min-200 { min-width: 200px; } -.column60 { width: 60px; } -.column70 { width: 70px; } -.column90 { width: 90px; } -.column98 { width: 98px; } -.column100 { width: 100px; } -.column105 { width: 105px; } -.column112 { width: 112px; } - -.cardpercentagebar { border-left-style: solid; } -.cardpercentagebar0 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 0%, #0aad0a 0%) 1; } -.cardpercentagebar1 { border-image: linear-gradient(to bottom, #c10909 1%, #c10909 1%, #0aad0a 1%) 1; } -.cardpercentagebar2 { border-image: linear-gradient(to bottom, #c10909 2%, #c10909 2%, #0aad0a 2%) 1; } -.cardpercentagebar3 { border-image: linear-gradient(to bottom, #c10909 3%, #c10909 3%, #0aad0a 3%) 1; } -.cardpercentagebar4 { border-image: linear-gradient(to bottom, #c10909 4%, #c10909 4%, #0aad0a 4%) 1; } -.cardpercentagebar5 { border-image: linear-gradient(to bottom, #c10909 5%, #c10909 5%, #0aad0a 5%) 1; } -.cardpercentagebar6 { border-image: linear-gradient(to bottom, #c10909 6%, #c10909 6%, #0aad0a 6%) 1; } -.cardpercentagebar7 { border-image: linear-gradient(to bottom, #c10909 7%, #c10909 7%, #0aad0a 7%) 1; } -.cardpercentagebar8 { border-image: linear-gradient(to bottom, #c10909 8%, #c10909 8%, #0aad0a 8%) 1; } -.cardpercentagebar9 { border-image: linear-gradient(to bottom, #c10909 9%, #c10909 9%, #0aad0a 9%) 1; } -.cardpercentagebar10 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 10%, #0aad0a 10%) 1; } -.cardpercentagebar11 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 11%, #0aad0a 11%) 1; } -.cardpercentagebar12 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 12%, #0aad0a 12%) 1; } -.cardpercentagebar13 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 13%, #0aad0a 13%) 1; } -.cardpercentagebar14 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 14%, #0aad0a 14%) 1; } -.cardpercentagebar15 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 15%, #0aad0a 15%) 1; } -.cardpercentagebar16 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 16%, #0aad0a 16%) 1; } -.cardpercentagebar17 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 17%, #0aad0a 17%) 1; } -.cardpercentagebar18 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 18%, #0aad0a 18%) 1; } -.cardpercentagebar19 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 19%, #0aad0a 19%) 1; } -.cardpercentagebar20 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 20%, #0aad0a 20%) 1; } -.cardpercentagebar21 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 21%, #0aad0a 21%) 1; } -.cardpercentagebar22 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 22%, #0aad0a 22%) 1; } -.cardpercentagebar23 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 23%, #0aad0a 23%) 1; } -.cardpercentagebar24 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 24%, #0aad0a 24%) 1; } -.cardpercentagebar25 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 25%, #0aad0a 25%) 1; } -.cardpercentagebar26 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 26%, #0aad0a 26%) 1; } -.cardpercentagebar27 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 27%, #0aad0a 27%) 1; } -.cardpercentagebar28 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 28%, #0aad0a 28%) 1; } -.cardpercentagebar29 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 29%, #0aad0a 29%) 1; } -.cardpercentagebar30 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 30%, #0aad0a 30%) 1; } -.cardpercentagebar31 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 31%, #0aad0a 31%) 1; } -.cardpercentagebar32 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 32%, #0aad0a 32%) 1; } -.cardpercentagebar33 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 33%, #0aad0a 33%) 1; } -.cardpercentagebar34 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 34%, #0aad0a 34%) 1; } -.cardpercentagebar35 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 35%, #0aad0a 35%) 1; } -.cardpercentagebar36 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 36%, #0aad0a 36%) 1; } -.cardpercentagebar37 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 37%, #0aad0a 37%) 1; } -.cardpercentagebar38 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 38%, #0aad0a 38%) 1; } -.cardpercentagebar39 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 39%, #0aad0a 39%) 1; } -.cardpercentagebar40 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 40%, #0aad0a 40%) 1; } -.cardpercentagebar41 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 41%, #0aad0a 41%) 1; } -.cardpercentagebar42 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 42%, #0aad0a 42%) 1; } -.cardpercentagebar43 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 43%, #0aad0a 43%) 1; } -.cardpercentagebar44 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 44%, #0aad0a 44%) 1; } -.cardpercentagebar45 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 45%, #0aad0a 45%) 1; } -.cardpercentagebar46 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 46%, #0aad0a 46%) 1; } -.cardpercentagebar47 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 47%, #0aad0a 47%) 1; } -.cardpercentagebar48 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 48%, #0aad0a 48%) 1; } -.cardpercentagebar49 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 49%, #0aad0a 49%) 1; } -.cardpercentagebar50 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 50%, #0aad0a 50%) 1; } -.cardpercentagebar51 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 51%, #0aad0a 51%) 1; } -.cardpercentagebar52 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 52%, #0aad0a 52%) 1; } -.cardpercentagebar53 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 53%, #0aad0a 53%) 1; } -.cardpercentagebar54 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 54%, #0aad0a 54%) 1; } -.cardpercentagebar55 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 55%, #0aad0a 55%) 1; } -.cardpercentagebar56 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 56%, #0aad0a 56%) 1; } -.cardpercentagebar57 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 57%, #0aad0a 57%) 1; } -.cardpercentagebar58 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 58%, #0aad0a 58%) 1; } -.cardpercentagebar59 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 59%, #0aad0a 59%) 1; } -.cardpercentagebar60 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 60%, #0aad0a 60%) 1; } -.cardpercentagebar61 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 61%, #0aad0a 61%) 1; } -.cardpercentagebar62 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 62%, #0aad0a 62%) 1; } -.cardpercentagebar63 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 63%, #0aad0a 63%) 1; } -.cardpercentagebar64 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 64%, #0aad0a 64%) 1; } -.cardpercentagebar65 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 65%, #0aad0a 65%) 1; } -.cardpercentagebar66 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 66%, #0aad0a 66%) 1; } -.cardpercentagebar67 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 67%, #0aad0a 67%) 1; } -.cardpercentagebar68 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 68%, #0aad0a 68%) 1; } -.cardpercentagebar69 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 69%, #0aad0a 69%) 1; } -.cardpercentagebar70 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 70%, #0aad0a 70%) 1; } -.cardpercentagebar71 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 71%, #0aad0a 71%) 1; } -.cardpercentagebar72 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 72%, #0aad0a 72%) 1; } -.cardpercentagebar73 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 73%, #0aad0a 73%) 1; } -.cardpercentagebar74 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 74%, #0aad0a 74%) 1; } -.cardpercentagebar75 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 75%, #0aad0a 75%) 1; } -.cardpercentagebar76 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 76%, #0aad0a 76%) 1; } -.cardpercentagebar77 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 77%, #0aad0a 77%) 1; } -.cardpercentagebar78 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 78%, #0aad0a 78%) 1; } -.cardpercentagebar79 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 79%, #0aad0a 79%) 1; } -.cardpercentagebar80 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 80%, #0aad0a 80%) 1; } -.cardpercentagebar81 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 81%, #0aad0a 81%) 1; } -.cardpercentagebar82 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 82%, #0aad0a 82%) 1; } -.cardpercentagebar83 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 83%, #0aad0a 83%) 1; } -.cardpercentagebar84 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 84%, #0aad0a 84%) 1; } -.cardpercentagebar85 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 85%, #0aad0a 85%) 1; } -.cardpercentagebar86 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 86%, #0aad0a 86%) 1; } -.cardpercentagebar87 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 87%, #0aad0a 87%) 1; } -.cardpercentagebar88 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 88%, #0aad0a 88%) 1; } -.cardpercentagebar89 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 89%, #0aad0a 89%) 1; } -.cardpercentagebar90 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 90%, #0aad0a 90%) 1; } -.cardpercentagebar91 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 91%, #0aad0a 91%) 1; } -.cardpercentagebar92 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 92%, #0aad0a 92%) 1; } -.cardpercentagebar93 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 93%, #0aad0a 93%) 1; } -.cardpercentagebar94 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 94%, #0aad0a 94%) 1; } -.cardpercentagebar95 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 95%, #0aad0a 95%) 1; } -.cardpercentagebar96 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 96%, #0aad0a 96%) 1; } -.cardpercentagebar97 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 97%, #0aad0a 97%) 1; } -.cardpercentagebar98 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 98%, #0aad0a 98%) 1; } -.cardpercentagebar99 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 99%, #0aad0a 99%) 1; } -.cardpercentagebar100 { border-image: linear-gradient(to bottom, #c10909 0%, #c10909 100%, #0aad0a 100%) 1; } - -.covered0 { width: 0px; } -.covered1 { width: 1px; } -.covered2 { width: 2px; } -.covered3 { width: 3px; } -.covered4 { width: 4px; } -.covered5 { width: 5px; } -.covered6 { width: 6px; } -.covered7 { width: 7px; } -.covered8 { width: 8px; } -.covered9 { width: 9px; } -.covered10 { width: 10px; } -.covered11 { width: 11px; } -.covered12 { width: 12px; } -.covered13 { width: 13px; } -.covered14 { width: 14px; } -.covered15 { width: 15px; } -.covered16 { width: 16px; } -.covered17 { width: 17px; } -.covered18 { width: 18px; } -.covered19 { width: 19px; } -.covered20 { width: 20px; } -.covered21 { width: 21px; } -.covered22 { width: 22px; } -.covered23 { width: 23px; } -.covered24 { width: 24px; } -.covered25 { width: 25px; } -.covered26 { width: 26px; } -.covered27 { width: 27px; } -.covered28 { width: 28px; } -.covered29 { width: 29px; } -.covered30 { width: 30px; } -.covered31 { width: 31px; } -.covered32 { width: 32px; } -.covered33 { width: 33px; } -.covered34 { width: 34px; } -.covered35 { width: 35px; } -.covered36 { width: 36px; } -.covered37 { width: 37px; } -.covered38 { width: 38px; } -.covered39 { width: 39px; } -.covered40 { width: 40px; } -.covered41 { width: 41px; } -.covered42 { width: 42px; } -.covered43 { width: 43px; } -.covered44 { width: 44px; } -.covered45 { width: 45px; } -.covered46 { width: 46px; } -.covered47 { width: 47px; } -.covered48 { width: 48px; } -.covered49 { width: 49px; } -.covered50 { width: 50px; } -.covered51 { width: 51px; } -.covered52 { width: 52px; } -.covered53 { width: 53px; } -.covered54 { width: 54px; } -.covered55 { width: 55px; } -.covered56 { width: 56px; } -.covered57 { width: 57px; } -.covered58 { width: 58px; } -.covered59 { width: 59px; } -.covered60 { width: 60px; } -.covered61 { width: 61px; } -.covered62 { width: 62px; } -.covered63 { width: 63px; } -.covered64 { width: 64px; } -.covered65 { width: 65px; } -.covered66 { width: 66px; } -.covered67 { width: 67px; } -.covered68 { width: 68px; } -.covered69 { width: 69px; } -.covered70 { width: 70px; } -.covered71 { width: 71px; } -.covered72 { width: 72px; } -.covered73 { width: 73px; } -.covered74 { width: 74px; } -.covered75 { width: 75px; } -.covered76 { width: 76px; } -.covered77 { width: 77px; } -.covered78 { width: 78px; } -.covered79 { width: 79px; } -.covered80 { width: 80px; } -.covered81 { width: 81px; } -.covered82 { width: 82px; } -.covered83 { width: 83px; } -.covered84 { width: 84px; } -.covered85 { width: 85px; } -.covered86 { width: 86px; } -.covered87 { width: 87px; } -.covered88 { width: 88px; } -.covered89 { width: 89px; } -.covered90 { width: 90px; } -.covered91 { width: 91px; } -.covered92 { width: 92px; } -.covered93 { width: 93px; } -.covered94 { width: 94px; } -.covered95 { width: 95px; } -.covered96 { width: 96px; } -.covered97 { width: 97px; } -.covered98 { width: 98px; } -.covered99 { width: 99px; } -.covered100 { width: 100px; } - - @media print { - html, body { background-color: #fff; } - .container { max-width: 100%; width: 100%; padding: 0; } - .overview colgroup col:first-child { width: 300px; } -} - -.icon-up-dir_active { - background-image: url(icon_up-dir.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiNjMDAiIGQ9Ik0xNDA4IDEyMTZxMCAyNi0xOSA0NXQtNDUgMTloLTg5NnEtMjYgMC00NS0xOXQtMTktNDUgMTktNDVsNDQ4LTQ0OHExOS0xOSA0NS0xOXQ0NSAxOWw0NDggNDQ4cTE5IDE5IDE5IDQ1eiIvPjwvc3ZnPg==); - background-repeat: no-repeat; - background-size: contain; - padding-left: 15px; - height: 0.9em; - display: inline-block; - position: relative; - top: 3px; -} -.icon-down-dir_active { - background-image: url(icon_up-dir_active.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiNjMDAiIGQ9Ik0xNDA4IDcwNHEwIDI2LTE5IDQ1bC00NDggNDQ4cS0xOSAxOS00NSAxOXQtNDUtMTlsLTQ0OC00NDhxLTE5LTE5LTE5LTQ1dDE5LTQ1IDQ1LTE5aDg5NnEyNiAwIDQ1IDE5dDE5IDQ1eiIvPjwvc3ZnPg==); - background-repeat: no-repeat; - background-size: contain; - padding-left: 15px; - height: 0.9em; - display: inline-block; - position: relative; - top: 3px; -} -.icon-down-dir { - background-image: url(icon_down-dir_active.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNDA4IDcwNHEwIDI2LTE5IDQ1bC00NDggNDQ4cS0xOSAxOS00NSAxOXQtNDUtMTlsLTQ0OC00NDhxLTE5LTE5LTE5LTQ1dDE5LTQ1IDQ1LTE5aDg5NnEyNiAwIDQ1IDE5dDE5IDQ1eiIvPjwvc3ZnPg==); - background-repeat: no-repeat; - background-size: contain; - padding-left: 15px; - height: 0.9em; - display: inline-block; - position: relative; - top: 3px; -} -.icon-info-circled { - background-image: url(icon_info-circled.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9Ijg5NiIgY3k9Ijg5NiIgcj0iNzUwIiBmaWxsPSIjZmZmIiAvPjxwYXRoIGZpbGw9IiMyOEE1RkYiIGQ9Ik0xMTUyIDEzNzZ2LTE2MHEwLTE0LTktMjN0LTIzLTloLTk2di01MTJxMC0xNC05LTIzdC0yMy05aC0zMjBxLTE0IDAtMjMgOXQtOSAyM3YxNjBxMCAxNCA5IDIzdDIzIDloOTZ2MzIwaC05NnEtMTQgMC0yMyA5dC05IDIzdjE2MHEwIDE0IDkgMjN0MjMgOWg0NDhxMTQgMCAyMy05dDktMjN6bS0xMjgtODk2di0xNjBxMC0xNC05LTIzdC0yMy05aC0xOTJxLTE0IDAtMjMgOXQtOSAyM3YxNjBxMCAxNCA5IDIzdDIzIDloMTkycTE0IDAgMjMtOXQ5LTIzem02NDAgNDE2cTAgMjA5LTEwMyAzODUuNXQtMjc5LjUgMjc5LjUtMzg1LjUgMTAzLTM4NS41LTEwMy0yNzkuNS0yNzkuNS0xMDMtMzg1LjUgMTAzLTM4NS41IDI3OS41LTI3OS41IDM4NS41LTEwMyAzODUuNSAxMDMgMjc5LjUgMjc5LjUgMTAzIDM4NS41eiIvPjwvc3ZnPg==); - background-repeat: no-repeat; - background-size: contain; - padding-left: 15px; - height: 0.9em; - display: inline-block; -} -.icon-plus { - background-image: url(icon_plus.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjAwIDczNnYxOTJxMCA0MC0yOCA2OHQtNjggMjhoLTQxNnY0MTZxMCA0MC0yOCA2OHQtNjggMjhoLTE5MnEtNDAgMC02OC0yOHQtMjgtNjh2LTQxNmgtNDE2cS00MCAwLTY4LTI4dC0yOC02OHYtMTkycTAtNDAgMjgtNjh0NjgtMjhoNDE2di00MTZxMC00MCAyOC02OHQ2OC0yOGgxOTJxNDAgMCA2OCAyOHQyOCA2OHY0MTZoNDE2cTQwIDAgNjggMjh0MjggNjh6Ii8+PC9zdmc+); - background-repeat: no-repeat; - background-size: contain; - padding-left: 15px; - height: 0.9em; - display: inline-block; - position: relative; - top: 3px; -} -.icon-minus { - background-image: url(icon_minus.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiNjMDAiIGQ9Ik0xNjAwIDczNnYxOTJxMCA0MC0yOCA2OHQtNjggMjhoLTEyMTZxLTQwIDAtNjgtMjh0LTI4LTY4di0xOTJxMC00MCAyOC02OHQ2OC0yOGgxMjE2cTQwIDAgNjggMjh0MjggNjh6Ii8+PC9zdmc+); - background-repeat: no-repeat; - background-size: contain; - padding-left: 15px; - height: 0.9em; - display: inline-block; - position: relative; - top: 3px; -} -.icon-wrench { - background-image: url(icon_wrench.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik00NDggMTQ3MnEwLTI2LTE5LTQ1dC00NS0xOS00NSAxOS0xOSA0NSAxOSA0NSA0NSAxOSA0NS0xOSAxOS00NXptNjQ0LTQyMGwtNjgyIDY4MnEtMzcgMzctOTAgMzctNTIgMC05MS0zN2wtMTA2LTEwOHEtMzgtMzYtMzgtOTAgMC01MyAzOC05MWw2ODEtNjgxcTM5IDk4IDExNC41IDE3My41dDE3My41IDExNC41em02MzQtNDM1cTAgMzktMjMgMTA2LTQ3IDEzNC0xNjQuNSAyMTcuNXQtMjU4LjUgODMuNXEtMTg1IDAtMzE2LjUtMTMxLjV0LTEzMS41LTMxNi41IDEzMS41LTMxNi41IDMxNi41LTEzMS41cTU4IDAgMTIxLjUgMTYuNXQxMDcuNSA0Ni41cTE2IDExIDE2IDI4dC0xNiAyOGwtMjkzIDE2OXYyMjRsMTkzIDEwN3E1LTMgNzktNDguNXQxMzUuNS04MSA3MC41LTM1LjVxMTUgMCAyMy41IDEwdDguNSAyNXoiLz48L3N2Zz4=); - background-repeat: no-repeat; - background-size: contain; - padding-left: 20px; - height: 0.9em; - display: inline-block; -} -.icon-cog { - background-image: url(icon_cog.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNDQ0Ljc4OCAyOTEuMWw0Mi42MTYgMjQuNTk5YzQuODY3IDIuODA5IDcuMTI2IDguNjE4IDUuNDU5IDEzLjk4NS0xMS4wNyAzNS42NDItMjkuOTcgNjcuODQyLTU0LjY4OSA5NC41ODZhMTIuMDE2IDEyLjAxNiAwIDAgMS0xNC44MzIgMi4yNTRsLTQyLjU4NC0yNC41OTVhMTkxLjU3NyAxOTEuNTc3IDAgMCAxLTYwLjc1OSAzNS4xM3Y0OS4xODJhMTIuMDEgMTIuMDEgMCAwIDEtOS4zNzcgMTEuNzE4Yy0zNC45NTYgNy44NS03Mi40OTkgOC4yNTYtMTA5LjIxOS4wMDctNS40OS0xLjIzMy05LjQwMy02LjA5Ni05LjQwMy0xMS43MjN2LTQ5LjE4NGExOTEuNTU1IDE5MS41NTUgMCAwIDEtNjAuNzU5LTM1LjEzbC00Mi41ODQgMjQuNTk1YTEyLjAxNiAxMi4wMTYgMCAwIDEtMTQuODMyLTIuMjU0Yy0yNC43MTgtMjYuNzQ0LTQzLjYxOS01OC45NDQtNTQuNjg5LTk0LjU4Ni0xLjY2Ny01LjM2Ni41OTItMTEuMTc1IDUuNDU5LTEzLjk4NUw2Ny4yMTIgMjkxLjFhMTkzLjQ4IDE5My40OCAwIDAgMSAwLTcwLjE5OWwtNDIuNjE2LTI0LjU5OWMtNC44NjctMi44MDktNy4xMjYtOC42MTgtNS40NTktMTMuOTg1IDExLjA3LTM1LjY0MiAyOS45Ny02Ny44NDIgNTQuNjg5LTk0LjU4NmExMi4wMTYgMTIuMDE2IDAgMCAxIDE0LjgzMi0yLjI1NGw0Mi41ODQgMjQuNTk1YTE5MS41NzcgMTkxLjU3NyAwIDAgMSA2MC43NTktMzUuMTNWMjUuNzU5YTEyLjAxIDEyLjAxIDAgMCAxIDkuMzc3LTExLjcxOGMzNC45NTYtNy44NSA3Mi40OTktOC4yNTYgMTA5LjIxOS0uMDA3IDUuNDkgMS4yMzMgOS40MDMgNi4wOTYgOS40MDMgMTEuNzIzdjQ5LjE4NGExOTEuNTU1IDE5MS41NTUgMCAwIDEgNjAuNzU5IDM1LjEzbDQyLjU4NC0yNC41OTVhMTIuMDE2IDEyLjAxNiAwIDAgMSAxNC44MzIgMi4yNTRjMjQuNzE4IDI2Ljc0NCA0My42MTkgNTguOTQ0IDU0LjY4OSA5NC41ODYgMS42NjcgNS4zNjYtLjU5MiAxMS4xNzUtNS40NTkgMTMuOTg1TDQ0NC43ODggMjIwLjlhMTkzLjQ4NSAxOTMuNDg1IDAgMCAxIDAgNzAuMnpNMzM2IDI1NmMwLTQ0LjExMi0zNS44ODgtODAtODAtODBzLTgwIDM1Ljg4OC04MCA4MCAzNS44ODggODAgODAgODAgODAtMzUuODg4IDgwLTgweiIvPjwvc3ZnPg==); - background-repeat: no-repeat; - background-size: contain; - padding-left: 16px; - height: 0.8em; - display: inline-block; -} -.icon-fork { - background-image: url(icon_fork.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHN0eWxlPSJmaWxsOiNmZmYiIC8+PHBhdGggZD0iTTY3MiAxNDcycTAtNDAtMjgtNjh0LTY4LTI4LTY4IDI4LTI4IDY4IDI4IDY4IDY4IDI4IDY4LTI4IDI4LTY4em0wLTExNTJxMC00MC0yOC02OHQtNjgtMjgtNjggMjgtMjggNjggMjggNjggNjggMjggNjgtMjggMjgtNjh6bTY0MCAxMjhxMC00MC0yOC02OHQtNjgtMjgtNjggMjgtMjggNjggMjggNjggNjggMjggNjgtMjggMjgtNjh6bTk2IDBxMCA1Mi0yNiA5Ni41dC03MCA2OS41cS0yIDI4Ny0yMjYgNDE0LTY3IDM4LTIwMyA4MS0xMjggNDAtMTY5LjUgNzF0LTQxLjUgMTAwdjI2cTQ0IDI1IDcwIDY5LjV0MjYgOTYuNXEwIDgwLTU2IDEzNnQtMTM2IDU2LTEzNi01Ni01Ni0xMzZxMC01MiAyNi05Ni41dDcwLTY5LjV2LTgyMHEtNDQtMjUtNzAtNjkuNXQtMjYtOTYuNXEwLTgwIDU2LTEzNnQxMzYtNTYgMTM2IDU2IDU2IDEzNnEwIDUyLTI2IDk2LjV0LTcwIDY5LjV2NDk3cTU0LTI2IDE1NC01NyA1NS0xNyA4Ny41LTI5LjV0NzAuNS0zMSA1OS0zOS41IDQwLjUtNTEgMjgtNjkuNSA4LjUtOTEuNXEtNDQtMjUtNzAtNjkuNXQtMjYtOTYuNXEwLTgwIDU2LTEzNnQxMzYtNTYgMTM2IDU2IDU2IDEzNnoiLz48L3N2Zz4=); - background-repeat: no-repeat; - background-size: contain; - padding-left: 20px; - height: 0.9em; - display: inline-block; -} -.icon-cube { - background-image: url(icon_cube.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04OTYgMTYyOWw2NDAtMzQ5di02MzZsLTY0MCAyMzN2NzUyem0tNjQtODY1bDY5OC0yNTQtNjk4LTI1NC02OTggMjU0em04MzItMjUydjc2OHEwIDM1LTE4IDY1dC00OSA0N2wtNzA0IDM4NHEtMjggMTYtNjEgMTZ0LTYxLTE2bC03MDQtMzg0cS0zMS0xNy00OS00N3QtMTgtNjV2LTc2OHEwLTQwIDIzLTczdDYxLTQ3bDcwNC0yNTZxMjItOCA0NC04dDQ0IDhsNzA0IDI1NnEzOCAxNCA2MSA0N3QyMyA3M3oiLz48L3N2Zz4=); - background-repeat: no-repeat; - background-size: contain; - padding-left: 20px; - height: 0.9em; - display: inline-block; -} -.icon-search-plus { - background-image: url(icon_search-plus.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiM2ZjZmNmYiIGQ9Ik0xMDg4IDgwMHY2NHEwIDEzLTkuNSAyMi41dC0yMi41IDkuNWgtMjI0djIyNHEwIDEzLTkuNSAyMi41dC0yMi41IDkuNWgtNjRxLTEzIDAtMjIuNS05LjV0LTkuNS0yMi41di0yMjRoLTIyNHEtMTMgMC0yMi41LTkuNXQtOS41LTIyLjV2LTY0cTAtMTMgOS41LTIyLjV0MjIuNS05LjVoMjI0di0yMjRxMC0xMyA5LjUtMjIuNXQyMi41LTkuNWg2NHExMyAwIDIyLjUgOS41dDkuNSAyMi41djIyNGgyMjRxMTMgMCAyMi41IDkuNXQ5LjUgMjIuNXptMTI4IDMycTAtMTg1LTEzMS41LTMxNi41dC0zMTYuNS0xMzEuNS0zMTYuNSAxMzEuNS0xMzEuNSAzMTYuNSAxMzEuNSAzMTYuNSAzMTYuNSAxMzEuNSAzMTYuNS0xMzEuNSAxMzEuNS0zMTYuNXptNTEyIDgzMnEwIDUzLTM3LjUgOTAuNXQtOTAuNSAzNy41cS01NCAwLTkwLTM4bC0zNDMtMzQycS0xNzkgMTI0LTM5OSAxMjQtMTQzIDAtMjczLjUtNTUuNXQtMjI1LTE1MC0xNTAtMjI1LTU1LjUtMjczLjUgNTUuNS0yNzMuNSAxNTAtMjI1IDIyNS0xNTAgMjczLjUtNTUuNSAyNzMuNSA1NS41IDIyNSAxNTAgMTUwIDIyNSA1NS41IDI3My41cTAgMjIwLTEyNCAzOTlsMzQzIDM0M3EzNyAzNyAzNyA5MHoiLz48L3N2Zz4=); - background-repeat: no-repeat; - background-size: contain; - padding-left: 20px; - height: 0.9em; - display: inline-block; -} -.icon-search-minus { - background-image: url(icon_search-minus.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiM2ZjZmNmYiIGQ9Ik0xMDg4IDgwMHY2NHEwIDEzLTkuNSAyMi41dC0yMi41IDkuNWgtNTc2cS0xMyAwLTIyLjUtOS41dC05LjUtMjIuNXYtNjRxMC0xMyA5LjUtMjIuNXQyMi41LTkuNWg1NzZxMTMgMCAyMi41IDkuNXQ5LjUgMjIuNXptMTI4IDMycTAtMTg1LTEzMS41LTMxNi41dC0zMTYuNS0xMzEuNS0zMTYuNSAxMzEuNS0xMzEuNSAzMTYuNSAxMzEuNSAzMTYuNSAzMTYuNSAxMzEuNSAzMTYuNS0xMzEuNSAxMzEuNS0zMTYuNXptNTEyIDgzMnEwIDUzLTM3LjUgOTAuNXQtOTAuNSAzNy41cS01NCAwLTkwLTM4bC0zNDMtMzQycS0xNzkgMTI0LTM5OSAxMjQtMTQzIDAtMjczLjUtNTUuNXQtMjI1LTE1MC0xNTAtMjI1LTU1LjUtMjczLjUgNTUuNS0yNzMuNSAxNTAtMjI1IDIyNS0xNTAgMjczLjUtNTUuNSAyNzMuNSA1NS41IDIyNSAxNTAgMTUwIDIyNSA1NS41IDI3My41cTAgMjIwLTEyNCAzOTlsMzQzIDM0M3EzNyAzNyAzNyA5MHoiLz48L3N2Zz4=); - background-repeat: no-repeat; - background-size: contain; - padding-left: 20px; - height: 0.9em; - display: inline-block; -} -.icon-star { - background-image: url(icon_star.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNzI4IDY0N3EwIDIyLTI2IDQ4bC0zNjMgMzU0IDg2IDUwMHExIDcgMSAyMCAwIDIxLTEwLjUgMzUuNXQtMzAuNSAxNC41cS0xOSAwLTQwLTEybC00NDktMjM2LTQ0OSAyMzZxLTIyIDEyLTQwIDEyLTIxIDAtMzEuNS0xNC41dC0xMC41LTM1LjVxMC02IDItMjBsODYtNTAwLTM2NC0zNTRxLTI1LTI3LTI1LTQ4IDAtMzcgNTYtNDZsNTAyLTczIDIyNS00NTVxMTktNDEgNDktNDF0NDkgNDFsMjI1IDQ1NSA1MDIgNzNxNTYgOSA1NiA0NnoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=); - background-repeat: no-repeat; - background-size: contain; - padding-left: 20px; - height: 0.9em; - display: inline-block; -} -.icon-sponsor { - background-image: url(icon_sponsor.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04OTYgMTY2NHEtMjYgMC00NC0xOGwtNjI0LTYwMnEtMTAtOC0yNy41LTI2dC01NS41LTY1LjUtNjgtOTcuNS01My41LTEyMS0yMy41LTEzOHEwLTIyMCAxMjctMzQ0dDM1MS0xMjRxNjIgMCAxMjYuNSAyMS41dDEyMCA1OCA5NS41IDY4LjUgNzYgNjhxMzYtMzYgNzYtNjh0OTUuNS02OC41IDEyMC01OCAxMjYuNS0yMS41cTIyNCAwIDM1MSAxMjR0MTI3IDM0NHEwIDIyMS0yMjkgNDUwbC02MjMgNjAwcS0xOCAxOC00NCAxOHoiIGZpbGw9IiNlYTRhYWEiLz48L3N2Zz4=); - background-repeat: no-repeat; - background-size: contain; - padding-left: 20px; - height: 0.9em; - display: inline-block; -} - - - -@media (prefers-color-scheme: dark) { - @media screen { - html { - background-color: #333; - color: #fff; - } - - body { - color: #fff; - } - - h1 { - background-color: #555453; - color: #fff; - } - - .container { - background-color: #333; - box-shadow: 0 0 60px #0c0c0c; - } - - .containerrightfixed { - background-color: #3D3C3C; - border-left: 1px solid #515050; - } - - .containerrightfixed h1 { - background-color: #484747; - } - - .popup-container { - background-color: rgb(80, 80, 80, 0.6); - } - - .popup { - background-color: #333; - } - - .card-group .card { - background-color: #333; - background: radial-gradient(circle, #444 0%, #333 100%); - border: 1px solid #545454; - color: #fff; - } - - .card-group .card table tr { - border-bottom: 1px solid #545454; - } - - .card-group .card table tr:hover { - background-color: #2E2D2C; - } - - .table-responsive::-webkit-scrollbar-thumb { - background-color: #555453; - border: 5px solid #333; - } - - .overview tr:hover > td { - background-color: #2E2D2C; - } - - .overview th { - background-color: #444; - border: 1px solid #3B3A39; - } - - .overview tr.namespace th { - background-color: #444; - } - - .overview thead th { - background-color: #444; - } - - .overview th a { - color: #fff; - color: rgba(255, 255, 255, 0.95); - } - - .overview th a:hover { - color: #0078d4; - } - - .overview td { - border: 1px solid #3B3A39; - } - - .overview .coverage td { - border: none; - } - - .overview tr.header th { - background-color: #444; - } - - .overview tr.header th:nth-child(2n+1) { - background-color: #3a3a3a; - } - - .overview tr.header th:first-child { - border-left: 1px solid #333; - border-top: 1px solid #333; - background-color: #333; - } - - .stripped tr:nth-child(2n+1) { - background-color: #3c3c3c; - } - - input, select, button { - background-color: #333; - color: #fff; - border: 1px solid #A19F9D; - } - - a { - color: #fff; - color: rgba(255, 255, 255, 0.95); - } - - a:hover { - color: #0078d4; - } - - h1 a.back { - background-color: #4a4846; - } - - h1 a.button { - color: #fff; - background-color: #565656; - border-color: #c1c1c1; - } - - h1 a.button:hover { - background-color: #8d8d8d; - } - - .gray { - background-color: #484747; - } - - .lightgray { - color: #ebebeb; - } - - .lightgraybg { - background-color: #474747; - } - - .lightgreen { - background-color: #406540; - } - - .lightorange { - background-color: #ab7f36; - } - - .lightred { - background-color: #954848; - } - - .ct-label { - color: #fff !important; - } - - .ct-grid { - stroke: #fff !important; - } - - .ct-chart .ct-series.ct-series-a .ct-line, .ct-chart .ct-series.ct-series-a .ct-point { - stroke: #0078D4 !important; - } - - .ct-chart .ct-series.ct-series-b .ct-line, .ct-chart .ct-series.ct-series-b .ct-point { - stroke: #6dc428 !important; - } - - .ct-chart .ct-series.ct-series-c .ct-line, .ct-chart .ct-series.ct-series-c .ct-point { - stroke: #e58f1d !important; - } - - .linecoverage { - background-color: #0078D4; - } - - .branchcoverage { - background-color: #6dc428; - } - .codeelementcoverage { - background-color: #e58f1d; - } - - .tinylinecoveragechart, .tinybranchcoveragechart, .tinymethodcoveragechart { - background-color: #333; - } - - .tinybranchcoveragechart .ct-series.ct-series-a .ct-line { - stroke: #6dc428 !important; - } - - .tinymethodcoveragechart .ct-series.ct-series-a .ct-line { - stroke: #e58f1d !important; - } - - .icon-down-dir { - background-image: url(icon_down-dir_active_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0JGQkZDMCIgZD0iTTE0MDggNzA0cTAgMjYtMTkgNDVsLTQ0OCA0NDhxLTE5IDE5LTQ1IDE5dC00NS0xOWwtNDQ4LTQ0OHEtMTktMTktMTktNDV0MTktNDUgNDUtMTloODk2cTI2IDAgNDUgMTl0MTkgNDV6Ii8+PC9zdmc+); - } - - .icon-info-circled { - background-image: url(icon_info-circled_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9Ijg5NiIgY3k9Ijg5NiIgcj0iNzUwIiBmaWxsPSIjZmZmIiAvPjxwYXRoIGZpbGw9IiMyOEE1RkYiIGQ9Ik0xMTUyIDEzNzZ2LTE2MHEwLTE0LTktMjN0LTIzLTloLTk2di01MTJxMC0xNC05LTIzdC0yMy05aC0zMjBxLTE0IDAtMjMgOXQtOSAyM3YxNjBxMCAxNCA5IDIzdDIzIDloOTZ2MzIwaC05NnEtMTQgMC0yMyA5dC05IDIzdjE2MHEwIDE0IDkgMjN0MjMgOWg0NDhxMTQgMCAyMy05dDktMjN6bS0xMjgtODk2di0xNjBxMC0xNC05LTIzdC0yMy05aC0xOTJxLTE0IDAtMjMgOXQtOSAyM3YxNjBxMCAxNCA5IDIzdDIzIDloMTkycTE0IDAgMjMtOXQ5LTIzem02NDAgNDE2cTAgMjA5LTEwMyAzODUuNXQtMjc5LjUgMjc5LjUtMzg1LjUgMTAzLTM4NS41LTEwMy0yNzkuNS0yNzkuNS0xMDMtMzg1LjUgMTAzLTM4NS41IDI3OS41LTI3OS41IDM4NS41LTEwMyAzODUuNSAxMDMgMjc5LjUgMjc5LjUgMTAzIDM4NS41eiIvPjwvc3ZnPg==); - } - - .icon-plus { - background-image: url(icon_plus_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0JGQkZDMCIgZD0iTTE2MDAgNzM2djE5MnEwIDQwLTI4IDY4dC02OCAyOGgtNDE2djQxNnEwIDQwLTI4IDY4dC02OCAyOGgtMTkycS00MCAwLTY4LTI4dC0yOC02OHYtNDE2aC00MTZxLTQwIDAtNjgtMjh0LTI4LTY4di0xOTJxMC00MCAyOC02OHQ2OC0yOGg0MTZ2LTQxNnEwLTQwIDI4LTY4dDY4LTI4aDE5MnE0MCAwIDY4IDI4dDI4IDY4djQxNmg0MTZxNDAgMCA2OCAyOHQyOCA2OHoiLz48L3N2Zz4=); - } - - .icon-minus { - background-image: url(icon_minus_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0JGQkZDMCIgZD0iTTE2MDAgNzM2djE5MnEwIDQwLTI4IDY4dC02OCAyOGgtMTIxNnEtNDAgMC02OC0yOHQtMjgtNjh2LTE5MnEwLTQwIDI4LTY4dDY4LTI4aDEyMTZxNDAgMCA2OCAyOHQyOCA2OHoiLz48L3N2Zz4=); - } - - .icon-wrench { - background-image: url(icon_wrench_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0JEQkRCRiIgZD0iTTQ0OCAxNDcycTAtMjYtMTktNDV0LTQ1LTE5LTQ1IDE5LTE5IDQ1IDE5IDQ1IDQ1IDE5IDQ1LTE5IDE5LTQ1em02NDQtNDIwbC02ODIgNjgycS0zNyAzNy05MCAzNy01MiAwLTkxLTM3bC0xMDYtMTA4cS0zOC0zNi0zOC05MCAwLTUzIDM4LTkxbDY4MS02ODFxMzkgOTggMTE0LjUgMTczLjV0MTczLjUgMTE0LjV6bTYzNC00MzVxMCAzOS0yMyAxMDYtNDcgMTM0LTE2NC41IDIxNy41dC0yNTguNSA4My41cS0xODUgMC0zMTYuNS0xMzEuNXQtMTMxLjUtMzE2LjUgMTMxLjUtMzE2LjUgMzE2LjUtMTMxLjVxNTggMCAxMjEuNSAxNi41dDEwNy41IDQ2LjVxMTYgMTEgMTYgMjh0LTE2IDI4bC0yOTMgMTY5djIyNGwxOTMgMTA3cTUtMyA3OS00OC41dDEzNS41LTgxIDcwLjUtMzUuNXExNSAwIDIzLjUgMTB0OC41IDI1eiIvPjwvc3ZnPg==); - } - - .icon-cog { - background-image: url(icon_cog_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjQkRCREJGIiBkPSJNNDQ0Ljc4OCAyOTEuMWw0Mi42MTYgMjQuNTk5YzQuODY3IDIuODA5IDcuMTI2IDguNjE4IDUuNDU5IDEzLjk4NS0xMS4wNyAzNS42NDItMjkuOTcgNjcuODQyLTU0LjY4OSA5NC41ODZhMTIuMDE2IDEyLjAxNiAwIDAgMS0xNC44MzIgMi4yNTRsLTQyLjU4NC0yNC41OTVhMTkxLjU3NyAxOTEuNTc3IDAgMCAxLTYwLjc1OSAzNS4xM3Y0OS4xODJhMTIuMDEgMTIuMDEgMCAwIDEtOS4zNzcgMTEuNzE4Yy0zNC45NTYgNy44NS03Mi40OTkgOC4yNTYtMTA5LjIxOS4wMDctNS40OS0xLjIzMy05LjQwMy02LjA5Ni05LjQwMy0xMS43MjN2LTQ5LjE4NGExOTEuNTU1IDE5MS41NTUgMCAwIDEtNjAuNzU5LTM1LjEzbC00Mi41ODQgMjQuNTk1YTEyLjAxNiAxMi4wMTYgMCAwIDEtMTQuODMyLTIuMjU0Yy0yNC43MTgtMjYuNzQ0LTQzLjYxOS01OC45NDQtNTQuNjg5LTk0LjU4Ni0xLjY2Ny01LjM2Ni41OTItMTEuMTc1IDUuNDU5LTEzLjk4NUw2Ny4yMTIgMjkxLjFhMTkzLjQ4IDE5My40OCAwIDAgMSAwLTcwLjE5OWwtNDIuNjE2LTI0LjU5OWMtNC44NjctMi44MDktNy4xMjYtOC42MTgtNS40NTktMTMuOTg1IDExLjA3LTM1LjY0MiAyOS45Ny02Ny44NDIgNTQuNjg5LTk0LjU4NmExMi4wMTYgMTIuMDE2IDAgMCAxIDE0LjgzMi0yLjI1NGw0Mi41ODQgMjQuNTk1YTE5MS41NzcgMTkxLjU3NyAwIDAgMSA2MC43NTktMzUuMTNWMjUuNzU5YTEyLjAxIDEyLjAxIDAgMCAxIDkuMzc3LTExLjcxOGMzNC45NTYtNy44NSA3Mi40OTktOC4yNTYgMTA5LjIxOS0uMDA3IDUuNDkgMS4yMzMgOS40MDMgNi4wOTYgOS40MDMgMTEuNzIzdjQ5LjE4NGExOTEuNTU1IDE5MS41NTUgMCAwIDEgNjAuNzU5IDM1LjEzbDQyLjU4NC0yNC41OTVhMTIuMDE2IDEyLjAxNiAwIDAgMSAxNC44MzIgMi4yNTRjMjQuNzE4IDI2Ljc0NCA0My42MTkgNTguOTQ0IDU0LjY4OSA5NC41ODYgMS42NjcgNS4zNjYtLjU5MiAxMS4xNzUtNS40NTkgMTMuOTg1TDQ0NC43ODggMjIwLjlhMTkzLjQ4NSAxOTMuNDg1IDAgMCAxIDAgNzAuMnpNMzM2IDI1NmMwLTQ0LjExMi0zNS44ODgtODAtODAtODBzLTgwIDM1Ljg4OC04MCA4MCAzNS44ODggODAgODAgODAgODAtMzUuODg4IDgwLTgweiIvPjwvc3ZnPg==); - } - - .icon-fork { - background-image: url(icon_fork_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0JGQkZDMCIgZD0iTTY3MiAxNDcycTAtNDAtMjgtNjh0LTY4LTI4LTY4IDI4LTI4IDY4IDI4IDY4IDY4IDI4IDY4LTI4IDI4LTY4em0wLTExNTJxMC00MC0yOC02OHQtNjgtMjgtNjggMjgtMjggNjggMjggNjggNjggMjggNjgtMjggMjgtNjh6bTY0MCAxMjhxMC00MC0yOC02OHQtNjgtMjgtNjggMjgtMjggNjggMjggNjggNjggMjggNjgtMjggMjgtNjh6bTk2IDBxMCA1Mi0yNiA5Ni41dC03MCA2OS41cS0yIDI4Ny0yMjYgNDE0LTY3IDM4LTIwMyA4MS0xMjggNDAtMTY5LjUgNzF0LTQxLjUgMTAwdjI2cTQ0IDI1IDcwIDY5LjV0MjYgOTYuNXEwIDgwLTU2IDEzNnQtMTM2IDU2LTEzNi01Ni01Ni0xMzZxMC01MiAyNi05Ni41dDcwLTY5LjV2LTgyMHEtNDQtMjUtNzAtNjkuNXQtMjYtOTYuNXEwLTgwIDU2LTEzNnQxMzYtNTYgMTM2IDU2IDU2IDEzNnEwIDUyLTI2IDk2LjV0LTcwIDY5LjV2NDk3cTU0LTI2IDE1NC01NyA1NS0xNyA4Ny41LTI5LjV0NzAuNS0zMSA1OS0zOS41IDQwLjUtNTEgMjgtNjkuNSA4LjUtOTEuNXEtNDQtMjUtNzAtNjkuNXQtMjYtOTYuNXEwLTgwIDU2LTEzNnQxMzYtNTYgMTM2IDU2IDU2IDEzNnoiLz48L3N2Zz4=); - } - - .icon-cube { - background-image: url(icon_cube_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0JGQkZDMCIgZD0iTTg5NiAxNjI5bDY0MC0zNDl2LTYzNmwtNjQwIDIzM3Y3NTJ6bS02NC04NjVsNjk4LTI1NC02OTgtMjU0LTY5OCAyNTR6bTgzMi0yNTJ2NzY4cTAgMzUtMTggNjV0LTQ5IDQ3bC03MDQgMzg0cS0yOCAxNi02MSAxNnQtNjEtMTZsLTcwNC0zODRxLTMxLTE3LTQ5LTQ3dC0xOC02NXYtNzY4cTAtNDAgMjMtNzN0NjEtNDdsNzA0LTI1NnEyMi04IDQ0LTh0NDQgOGw3MDQgMjU2cTM4IDE0IDYxIDQ3dDIzIDczeiIvPjwvc3ZnPg==); - } - - .icon-search-plus { - background-image: url(icon_search-plus_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0JGQkZDMCIgZD0iTTEwODggODAwdjY0cTAgMTMtOS41IDIyLjV0LTIyLjUgOS41aC0yMjR2MjI0cTAgMTMtOS41IDIyLjV0LTIyLjUgOS41aC02NHEtMTMgMC0yMi41LTkuNXQtOS41LTIyLjV2LTIyNGgtMjI0cS0xMyAwLTIyLjUtOS41dC05LjUtMjIuNXYtNjRxMC0xMyA5LjUtMjIuNXQyMi41LTkuNWgyMjR2LTIyNHEwLTEzIDkuNS0yMi41dDIyLjUtOS41aDY0cTEzIDAgMjIuNSA5LjV0OS41IDIyLjV2MjI0aDIyNHExMyAwIDIyLjUgOS41dDkuNSAyMi41em0xMjggMzJxMC0xODUtMTMxLjUtMzE2LjV0LTMxNi41LTEzMS41LTMxNi41IDEzMS41LTEzMS41IDMxNi41IDEzMS41IDMxNi41IDMxNi41IDEzMS41IDMxNi41LTEzMS41IDEzMS41LTMxNi41em01MTIgODMycTAgNTMtMzcuNSA5MC41dC05MC41IDM3LjVxLTU0IDAtOTAtMzhsLTM0My0zNDJxLTE3OSAxMjQtMzk5IDEyNC0xNDMgMC0yNzMuNS01NS41dC0yMjUtMTUwLTE1MC0yMjUtNTUuNS0yNzMuNSA1NS41LTI3My41IDE1MC0yMjUgMjI1LTE1MCAyNzMuNS01NS41IDI3My41IDU1LjUgMjI1IDE1MCAxNTAgMjI1IDU1LjUgMjczLjVxMCAyMjAtMTI0IDM5OWwzNDMgMzQzcTM3IDM3IDM3IDkweiIvPjwvc3ZnPg==); - } - - .icon-search-minus { - background-image: url(icon_search-minus_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIxNzkyIiBoZWlnaHQ9IjE3OTIiIHZpZXdCb3g9IjAgMCAxNzkyIDE3OTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0JGQkZDMCIgZD0iTTEwODggODAwdjY0cTAgMTMtOS41IDIyLjV0LTIyLjUgOS41aC01NzZxLTEzIDAtMjIuNS05LjV0LTkuNS0yMi41di02NHEwLTEzIDkuNS0yMi41dDIyLjUtOS41aDU3NnExMyAwIDIyLjUgOS41dDkuNSAyMi41em0xMjggMzJxMC0xODUtMTMxLjUtMzE2LjV0LTMxNi41LTEzMS41LTMxNi41IDEzMS41LTEzMS41IDMxNi41IDEzMS41IDMxNi41IDMxNi41IDEzMS41IDMxNi41LTEzMS41IDEzMS41LTMxNi41em01MTIgODMycTAgNTMtMzcuNSA5MC41dC05MC41IDM3LjVxLTU0IDAtOTAtMzhsLTM0My0zNDJxLTE3OSAxMjQtMzk5IDEyNC0xNDMgMC0yNzMuNS01NS41dC0yMjUtMTUwLTE1MC0yMjUtNTUuNS0yNzMuNSA1NS41LTI3My41IDE1MC0yMjUgMjI1LTE1MCAyNzMuNS01NS41IDI3My41IDU1LjUgMjI1IDE1MCAxNTAgMjI1IDU1LjUgMjczLjVxMCAyMjAtMTI0IDM5OWwzNDMgMzQzcTM3IDM3IDM3IDkweiIvPjwvc3ZnPg==); - } - - .icon-star { - background-image: url(icon_star_dark.svg), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNzI4IDY0N3EwIDIyLTI2IDQ4bC0zNjMgMzU0IDg2IDUwMHExIDcgMSAyMCAwIDIxLTEwLjUgMzUuNXQtMzAuNSAxNC41cS0xOSAwLTQwLTEybC00NDktMjM2LTQ0OSAyMzZxLTIyIDEyLTQwIDEyLTIxIDAtMzEuNS0xNC41dC0xMC41LTM1LjVxMC02IDItMjBsODYtNTAwLTM2NC0zNTRxLTI1LTI3LTI1LTQ4IDAtMzcgNTYtNDZsNTAyLTczIDIyNS00NTVxMTktNDEgNDktNDF0NDkgNDFsMjI1IDQ1NSA1MDIgNzNxNTYgOSA1NiA0NnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=); - } - } -} - -.ct-double-octave:after,.ct-golden-section:after,.ct-major-eleventh:after,.ct-major-second:after,.ct-major-seventh:after,.ct-major-sixth:after,.ct-major-tenth:after,.ct-major-third:after,.ct-major-twelfth:after,.ct-minor-second:after,.ct-minor-seventh:after,.ct-minor-sixth:after,.ct-minor-third:after,.ct-octave:after,.ct-perfect-fifth:after,.ct-perfect-fourth:after,.ct-square:after{content:"";clear:both}.ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:block;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-vertical.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-label.ct-vertical.ct-end{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:end}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-grid-background{fill:none}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{fill:none;stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-donut-solid,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-donut-solid,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-donut-solid,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-donut-solid,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-donut-solid,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-donut-solid,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-donut-solid,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-donut-solid,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#f05b4f}.ct-series-i .ct-area,.ct-series-i .ct-slice-donut-solid,.ct-series-i .ct-slice-pie{fill:#f05b4f}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-donut-solid,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-donut-solid,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-donut-solid,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-donut-solid,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-donut-solid,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-donut-solid,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:100%}.ct-square:after{display:table}.ct-square>svg{display:block;position:absolute;top:0;left:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:93.75%}.ct-minor-second:after{display:table}.ct-minor-second>svg{display:block;position:absolute;top:0;left:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:88.8888888889%}.ct-major-second:after{display:table}.ct-major-second>svg{display:block;position:absolute;top:0;left:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:83.3333333333%}.ct-minor-third:after{display:table}.ct-minor-third>svg{display:block;position:absolute;top:0;left:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:80%}.ct-major-third:after{display:table}.ct-major-third>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:75%}.ct-perfect-fourth:after{display:table}.ct-perfect-fourth>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-perfect-fifth:after{display:table}.ct-perfect-fifth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:62.5%}.ct-minor-sixth:after{display:table}.ct-minor-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:61.804697157%}.ct-golden-section:after{display:table}.ct-golden-section>svg{display:block;position:absolute;top:0;left:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:60%}.ct-major-sixth:after{display:table}.ct-major-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-minor-seventh:after{display:table}.ct-minor-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:53.3333333333%}.ct-major-seventh:after{display:table}.ct-major-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:50%}.ct-octave:after{display:table}.ct-octave>svg{display:block;position:absolute;top:0;left:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:40%}.ct-major-tenth:after{display:table}.ct-major-tenth>svg{display:block;position:absolute;top:0;left:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:37.5%}.ct-major-eleventh:after{display:table}.ct-major-eleventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:33.3333333333%}.ct-major-twelfth:after{display:table}.ct-major-twelfth>svg{display:block;position:absolute;top:0;left:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:25%}.ct-double-octave:after{display:table}.ct-double-octave>svg{display:block;position:absolute;top:0;left:0} \ No newline at end of file