public void When_Passing_Null_Parameter_Then_Exceptions_Are_Thrown()
        {
            // ARRANGE
            InitializeFakeObjects();
            var createJwsParameter      = new CreateJwsParameter();
            var emptyCreateJwsParameter = new CreateJwsParameter
            {
                Payload = new JwsPayload()
            };

            // ACT & ASSERTS
            Assert.ThrowsAsync <ArgumentNullException>(() => _createJwsAction.Execute(null)).ConfigureAwait(false);
            Assert.ThrowsAsync <ArgumentNullException>(() => _createJwsAction.Execute(createJwsParameter)).ConfigureAwait(false);
            Assert.ThrowsAsync <ArgumentNullException>(() => _createJwsAction.Execute(emptyCreateJwsParameter)).ConfigureAwait(false);
        }
Ejemplo n.º 2
0
        public Task <string> CreateJws(CreateJwsParameter createJwsParameter)
        {
            if (createJwsParameter == null)
            {
                throw new ArgumentNullException(nameof(createJwsParameter));
            }

            return(_createJwsAction.Execute(createJwsParameter));
        }