Assert MediatR configuration in any test framework like XUnit , NUnit , MsUnit,...developed Creative Codes with Ershad Raoufi/ارشاد رئوفی
CommandValidator usage : you should create object from CommandValidator for Asser Commands,for example :
var validCommandConfiguration = new CommandValidator().IsValid();
QueryValidator usage : you should create object from QueryValidator for Asser Queries,for example :
var validQueryConfiguration = new QueryValidator().IsValid();
NotificationValidator usage : you should create object from NotificationValidator for Asser Notifications,for example :
var validNotificationConfiguration = new NotificationValidator().IsValid();
you can pass the custom name for command/commandHandler: the default value for CommandName and Handler are : "Command" and "CommandHandler" but you can custom it by bellow code:
var validCommandConfiguration = new CommandValidator() .IsValid(commandNamesEndTo : "something" , commandHandlersEndTo : "something");
you can pass the custom name for query/queryHandler: the default value for QueryName and Handler are : "Query" and "QueryHandler" but you can custom it by bellow code :
var validQueryConfiguration = new QueryValidator() .IsValid(queryNamesEndTo : "something" , queryHandlersEndTo : "something");
you can pass the custom name for notification/notificationHandler: the default value for NotificationName and Handler are : "Notification" and "NotificationHandler" but you can custom it by bellow code :
var validNotificationConfiguration = new NotificationValidator() .IsValid(notificationNamesEndTo : "something" , notificationHandlerNamesEndTo : "something");
just for Persian Developer : https://dntips.ir/post/3436