This repository was archived by the owner on Nov 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +58
-2
lines changed
test/Microsoft.AspNet.StaticFiles.Tests Expand file tree Collapse file tree 1 file changed +58
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public void AddFile(string path, IFileInfo fileInfo)
66
66
67
67
public IDirectoryContents GetDirectoryContents ( string subpath )
68
68
{
69
- return new NotFoundDirectoryContents ( ) ;
69
+ throw new NotImplementedException ( ) ;
70
70
}
71
71
72
72
public IFileInfo GetFileInfo ( string subpath )
@@ -77,13 +77,69 @@ public IFileInfo GetFileInfo(string subpath)
77
77
return result ;
78
78
}
79
79
80
- return new NotFoundFileInfo ( subpath ) ;
80
+ return new NotFoundFileInfo ( ) ;
81
81
}
82
82
83
83
public IExpirationTrigger Watch ( string filter )
84
84
{
85
85
throw new NotSupportedException ( ) ;
86
86
}
87
+
88
+ private class NotFoundFileInfo : IFileInfo
89
+ {
90
+ public bool Exists
91
+ {
92
+ get
93
+ {
94
+ return false ;
95
+ }
96
+ }
97
+
98
+ public bool IsDirectory
99
+ {
100
+ get
101
+ {
102
+ throw new NotImplementedException ( ) ;
103
+ }
104
+ }
105
+
106
+ public DateTimeOffset LastModified
107
+ {
108
+ get
109
+ {
110
+ throw new NotImplementedException ( ) ;
111
+ }
112
+ }
113
+
114
+ public long Length
115
+ {
116
+ get
117
+ {
118
+ throw new NotImplementedException ( ) ;
119
+ }
120
+ }
121
+
122
+ public string Name
123
+ {
124
+ get
125
+ {
126
+ throw new NotImplementedException ( ) ;
127
+ }
128
+ }
129
+
130
+ public string PhysicalPath
131
+ {
132
+ get
133
+ {
134
+ throw new NotImplementedException ( ) ;
135
+ }
136
+ }
137
+
138
+ public Stream CreateReadStream ( )
139
+ {
140
+ throw new NotImplementedException ( ) ;
141
+ }
142
+ }
87
143
}
88
144
89
145
private sealed class TestFileInfo : IFileInfo
You can’t perform that action at this time.
0 commit comments