Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit 6ae3d90

Browse files
committed
Handle changes in FileProviders.
1 parent 925d7d7 commit 6ae3d90

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

test/Microsoft.AspNet.StaticFiles.Tests/StaticFileContextTest.cs

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void AddFile(string path, IFileInfo fileInfo)
6666

6767
public IDirectoryContents GetDirectoryContents(string subpath)
6868
{
69-
return new NotFoundDirectoryContents();
69+
throw new NotImplementedException();
7070
}
7171

7272
public IFileInfo GetFileInfo(string subpath)
@@ -77,13 +77,69 @@ public IFileInfo GetFileInfo(string subpath)
7777
return result;
7878
}
7979

80-
return new NotFoundFileInfo(subpath);
80+
return new NotFoundFileInfo();
8181
}
8282

8383
public IExpirationTrigger Watch(string filter)
8484
{
8585
throw new NotSupportedException();
8686
}
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+
}
87143
}
88144

89145
private sealed class TestFileInfo : IFileInfo

0 commit comments

Comments
 (0)