2. Agenda
Bienvenidos!!
Presentaciones - ¿tenemos nuevos miembros?
Unit tests – ApexMocks – David van Alphen
Descanso
¿Qué os interesa en el próximo SDG?
Comunidad
6. SOLID
Wikipedia - SOLID
SRP – Single Responsibility Principle
A class should have one responsibility
O – Open/Closed Principle
Open for extension, closed for modification
L – Liskov Substitution Principle
Objects should be replaceable by subtypes without affecting correctness of
application
I – Interface Separation Principle
Many specific interfaces are better than one general interface
D – Dependency Injection Principle
Depend on abstract, not concrete classes
13. Test Structure
Given
Arrange things needed for the test
When
Trigger the behavior we want to test
Then
Confirm the results are what we expected
15. Things to Avoid
Always focus on testing public / interface behaviour
Use the framework wisely - don’t verify more behaviour
than you need to
Don’t mock too deeply - if you find your unit test having
to set up a lot of mocking before you even trigger the
behaviour under test, that’s probably a hint that your
design could be better
16. Documentation and Help
Examples found in ApexMocks classes and tests
Code4cloud
GitHub
Andyinthecloud.com - Unit Testing, Apex Enterprise Patterns
and ApexMocks Part 1
Andyinthecloud.com - Unit Testing, Apex Enterprise Patterns
and ApexMocks Part 2
Feature Enhancements – fork repo on GitHub
19. Comunidad de Salesforce
Customer Success Community en Español
Después de uniros haced un comentario en chatter
nombrando a @Carolina Ruiz Medina
(FinancialForce.com) y preguntad por MVP hours
Spanish Developers Success Community
Spanish User Group
StackExchange – Preguntas y respuestas
Developer Forums y otros
Slides Share