Doesn't add bloat at all. Especially when working with layers or shared assemblies.
Introducing concepts like DI actually helps quite a lot with Lambda's.
The sentence is correct, DI is vitally important to Unit Testing.
So for context. I could have a Lambda consisting of several functions listening for events on SQS Queues,
publicclassEventParser{privatereadonlyIServiceProvider_serviceProvider;publicEventParser(IServiceProviderserviceProvider){_serviceProvider=serviceProvider;}publicEventParser():this(StartUp.Container.BuildServiceProvider()){}[LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]publicasyncTaskParse(SQSEventqEvent,ILambdaContextcontext){foreach(varrecordinqEvent.Records){// DO some thing here}}}publicclassOtherEventParser{privatereadonlyIServiceProvider_serviceProvider;publicOtherEventParser(IServiceProviderserviceProvider){_serviceProvider=serviceProvider;}publicOtherEventParser():this(StartUp.Container.BuildServiceProvider()){}[LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]publicasyncTaskParse(SQSEventqEvent,ILambdaContextcontext){foreach(varrecordinqEvent.Records){// DO some thing here}}}
My Lambda Configuration may be configured to not only retrieve some settings from the appsettings file but also retrieve environment variables
defined in the serverless.yml
In Python Mocks are still heavily used and there are a number of Mock frameworks.
I write Lambda's in Python, and I can still implement the same unit testing strategy.
Unit Tests and Mocks are still pretty relevant in most programming frameworks. Engineering and Quality Assurance discipline remains the same irrelevant of software development language used.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The one thing I've learned after moving to Python, is that you can do testing without mocking... just do it right not "mocked"!
Doesn't add bloat at all. Especially when working with layers or shared assemblies.
Introducing concepts like DI actually helps quite a lot with Lambda's.
The sentence is correct, DI is vitally important to Unit Testing.
So for context. I could have a Lambda consisting of several functions listening for events on SQS Queues,
My Lambda Configuration may be configured to not only retrieve some settings from the appsettings file but also retrieve environment variables
defined in the
serverless.yml
What restrictions are there in me writing Unit Tests for these Lambda functions ?
In Python Mocks are still heavily used and there are a number of Mock frameworks.
I write Lambda's in Python, and I can still implement the same unit testing strategy.
Unit Tests and Mocks are still pretty relevant in most programming frameworks. Engineering and Quality Assurance discipline remains the same irrelevant of software development language used.