1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . IO ;
4+ using System . Threading ;
5+ using System . Threading . Tasks ;
6+ using DotNet . Testcontainers . Configurations ;
7+ using DotNet . Testcontainers . Containers ;
8+ using DotNet . Testcontainers . Images ;
9+ using Microsoft . Extensions . Logging ;
10+ using Microsoft . Extensions . Logging . Abstractions ;
11+
12+ namespace ManagedCode . Storage . Tests . Common ;
13+
14+ public sealed class EmptyContainer : IContainer
15+ {
16+ public ValueTask DisposeAsync ( )
17+ {
18+ return ValueTask . CompletedTask ;
19+ }
20+
21+ public ushort GetMappedPublicPort ( int containerPort )
22+ {
23+ throw new NotImplementedException ( ) ;
24+ }
25+
26+ public ushort GetMappedPublicPort ( string containerPort )
27+ {
28+ throw new NotImplementedException ( ) ;
29+ }
30+
31+ public Task < long > GetExitCodeAsync ( CancellationToken ct = new CancellationToken ( ) )
32+ {
33+ throw new NotImplementedException ( ) ;
34+ }
35+
36+ public Task < ( string Stdout , string Stderr ) > GetLogsAsync ( DateTime since = new DateTime ( ) , DateTime until = new DateTime ( ) , bool timestampsEnabled = true ,
37+ CancellationToken ct = new CancellationToken ( ) )
38+ {
39+ throw new NotImplementedException ( ) ;
40+ }
41+
42+ public Task StartAsync ( CancellationToken ct = new CancellationToken ( ) )
43+ {
44+ return Task . CompletedTask ;
45+ }
46+
47+ public Task StopAsync ( CancellationToken ct = new CancellationToken ( ) )
48+ {
49+ throw new NotImplementedException ( ) ;
50+ }
51+
52+ public Task CopyAsync ( byte [ ] fileContent , string filePath , UnixFileModes fileMode = UnixFileModes . None | UnixFileModes . OtherRead | UnixFileModes . GroupRead | UnixFileModes . UserWrite | UnixFileModes . UserRead ,
53+ CancellationToken ct = new CancellationToken ( ) )
54+ {
55+ throw new NotImplementedException ( ) ;
56+ }
57+
58+ public Task CopyAsync ( string source , string target , UnixFileModes fileMode = UnixFileModes . None | UnixFileModes . OtherRead | UnixFileModes . GroupRead | UnixFileModes . UserWrite | UnixFileModes . UserRead ,
59+ CancellationToken ct = new CancellationToken ( ) )
60+ {
61+ throw new NotImplementedException ( ) ;
62+ }
63+
64+ public Task CopyAsync ( DirectoryInfo source , string target , UnixFileModes fileMode = UnixFileModes . None | UnixFileModes . OtherRead | UnixFileModes . GroupRead | UnixFileModes . UserWrite | UnixFileModes . UserRead ,
65+ CancellationToken ct = new CancellationToken ( ) )
66+ {
67+ throw new NotImplementedException ( ) ;
68+ }
69+
70+ public Task CopyAsync ( FileInfo source , string target , UnixFileModes fileMode = UnixFileModes . None | UnixFileModes . OtherRead | UnixFileModes . GroupRead | UnixFileModes . UserWrite | UnixFileModes . UserRead ,
71+ CancellationToken ct = new CancellationToken ( ) )
72+ {
73+ throw new NotImplementedException ( ) ;
74+ }
75+
76+ public Task < byte [ ] > ReadFileAsync ( string filePath , CancellationToken ct = new CancellationToken ( ) )
77+ {
78+ throw new NotImplementedException ( ) ;
79+ }
80+
81+ public Task < ExecResult > ExecAsync ( IList < string > command , CancellationToken ct = new CancellationToken ( ) )
82+ {
83+ throw new NotImplementedException ( ) ;
84+ }
85+
86+ public ILogger Logger { get ; } = NullLogger . Instance ;
87+ public string Id { get ; } = "none" ;
88+ public string Name { get ; } = "none" ;
89+ public string IpAddress { get ; } = "none" ;
90+ public string MacAddress { get ; } = "none" ;
91+ public string Hostname { get ; } = "none" ;
92+ public IImage Image { get ; } = new DockerImage ( "none" ) ;
93+ public TestcontainersStates State { get ; } = TestcontainersStates . Running ;
94+ public TestcontainersHealthStatus Health { get ; } = TestcontainersHealthStatus . Healthy ;
95+ public long HealthCheckFailingStreak { get ; } = 0 ;
96+ public event EventHandler ? Creating ;
97+ public event EventHandler ? Starting ;
98+ public event EventHandler ? Stopping ;
99+ public event EventHandler ? Created ;
100+ public event EventHandler ? Started ;
101+ public event EventHandler ? Stopped ;
102+ }
0 commit comments