public void FileStore_GetDataFile_ReadsCorrectFile() { // Given IFileProvider fileProvider = Substitute.For <IFileProvider>(); IFileStore store = new FileStore(new FakeFileStoreFileProviderFactory(fileProvider)); // When store.GetDataFile(FileIdentifier.FromString("aaaa")); // Then fileProvider.Received(1).GetFileInfo("aaaa.dat"); }