Exemplo n.º 1
0
        public async Task ValidateTest()
        {
            var bus     = A.Fake <IServiceBus>();
            var user    = A.Fake <ClaimsPrincipal>();
            var service = new DefaultValidationService();

            await service.Validate(bus, user, new ValidatableMessage { Name = "ValidatableMessage" });
        }
Exemplo n.º 2
0
        public async Task ValidateFailedTest()
        {
            var bus     = A.Fake <IServiceBus>();
            var user    = A.Fake <ClaimsPrincipal>();
            var service = new DefaultValidationService();

            await Assert.ThrowsAsync <ValidationException>(() =>
            {
                return(service.Validate(bus, user, new ValidatableMessage()));
            });
        }