-
Notifications
You must be signed in to change notification settings - Fork 0
/
Requirements.txt
35 lines (25 loc) · 2.18 KB
/
Requirements.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
IN PROGRESS 1 Write an IoC (Inversion of Control) container, also known as a Dependency Injection container.
DONE 2 The container must allow you to register types.
a Example: container.Register<ICalculator, Calculator>()
DONE 3 The container must be aware and control object lifecycle for transient objects
(a new instance is created for each request), and singleton objects (the same instance is returned for each request).
a Example: container.Register<ICalculator, Calculator>(LifecycleType.Transient),
or container.Register<ICalculator, Calculator>(LifecycleType.Singleton)
DONE 4 The default lifecycle for an object should be transient
DONE 5 You must be able to resolve registered types through the container
a Example: container.Resolve<ICalculator>()
DONE 6 If you try to resolve a type that the container is unaware of it should throw
an informative exception
DONE 7 When resolving from the container for a registered type, if that type has constructor
arguments which are also registered types the container should inject the instances
into the constructor appropriately (this is where dependency injection applies).
a Example Constructor: public UsersController(ICalculator calculator, IEmailService emailService).
If all 3 types for the controller, calculator, and email service are registered you should be able to resolve an instance of the UsersController.
DON 8 You must write tests for all of this behavior using xUnit.
DONE 9 You must use git for source control and push your code to github.com. Please send me the link
to your repository at least 1 day before the second interview.
10 General Suggestion: Don't let the overall tasks overwhelm you. Break everything into smaller
pieces that build up to the larger solution.
11 Be prepared to answer a question along the lines of… How would your code change if given the
requirement to add a new lifecycle (ThreadStatic for instance)? Would you be required to add
new code, or modify existing code?