File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
tests/Atypical.VirtualFileSystem.UnitTests/Services Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022, Atypical Consulting SRL
2+ // All rights reserved.
3+ //
4+ // This source code is licensed under the BSD-style license found in the
5+ // LICENSE file in the root directory of this source tree.
6+
7+ using Atypical . VirtualFileSystem . Core . Contracts ;
8+ using Atypical . VirtualFileSystem . Core . Services ;
9+ using Microsoft . Extensions . DependencyInjection ;
10+
11+ namespace VirtualFileSystem . UnitTests . Services ;
12+
13+ public class ServiceCollectionExtensionsTests
14+ {
15+ public class MethodAddVirtualFileSystem
16+ {
17+ [ Fact ]
18+ public void AddVirtualFileSystem_registers_VirtualFileSystem_in_DI ( )
19+ {
20+ // Arrange
21+ var services = new ServiceCollection ( ) ;
22+
23+ // Act
24+ services . AddVirtualFileSystem ( ) ;
25+
26+ // Assert
27+ services . Should ( )
28+ . Contain ( service => service . ServiceType == typeof ( IVirtualFileSystem )
29+ && service . ImplementationType == typeof ( VFS )
30+ && service . Lifetime == ServiceLifetime . Scoped ) ;
31+ }
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments