Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
changeset 88:31fd34f7d7cf
Re #253: Allow multiple data files in a single zip
* Update Mock factory to work properly
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 26 Feb 2011 20:15:38 +0000 |
parents | 5c04db41d643 |
children | 90dee8d781ee |
files | API/Factories/Mock/MockSystemFactory.cs |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/API/Factories/Mock/MockSystemFactory.cs Sat Feb 26 20:14:29 2011 +0000 +++ b/API/Factories/Mock/MockSystemFactory.cs Sat Feb 26 20:15:38 2011 +0000 @@ -7,6 +7,7 @@ using IBBoard.WarFoundry.API.Factories; using IBBoard.WarFoundry.API.Objects; using ICSharpCode.SharpZipLib.Zip; +using System.Collections.Generic; namespace IBBoard.WarFoundry.API.Factories.Mock { @@ -58,17 +59,23 @@ throw new NotImplementedException (); } - protected override Stream GetArmyDataStream (ZipFile file) + protected override ICollection<ZipEntry> GetArmyZipEntries(ZipFile file) { throw new NotImplementedException (); } - protected override Stream GetGameSystemDataStream (ZipFile file) + protected override ICollection<ZipEntry> GetGameSystemZipEntries (ZipFile file) { - return new MemoryStream(); + List<ZipEntry> entries = new List<ZipEntry>(); + ZipEntry zipEntry = file.GetEntry("data.systemx"); + if (zipEntry != null) + { + entries.Add(zipEntry); + } + return entries; } - protected override Stream GetRaceDataStream (ZipFile file) + protected override ICollection<ZipEntry> GetRaceZipEntries (ZipFile file) { throw new NotImplementedException (); }