Mercurial > repos > IBDev-IBBoard.WarFoundry.API.Tests
annotate API/Savers/Xml/WarFoundryXmlFileSaverTests.cs @ 95:db6db25921fb
Re #324: Add saving of Race and System data to files
* Add tests for the zip entry name
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 05 Mar 2011 15:53:29 +0000 |
parents | 98539b2fe8fa |
children | 45b80fed5e2a |
rev | line source |
---|---|
91
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 using System; |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
2 using NUnit.Framework; |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
3 using System.IO; |
95
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
4 using IBBoard.WarFoundry.API.Objects; |
91
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
6 namespace IBBoard.WarFoundry.API.Savers.Xml |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 { |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
8 [TestFixture()] |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
9 public class WarFoundryXmlFileSaverTests : IWarFoundryFileSaverTests |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
10 { |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
11 protected override IWarFoundryFileSaver GetSaver() |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
12 { |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
13 return new WarFoundryXmlFileSaver(); |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
14 } |
95
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
15 |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
16 protected override string GetEntryName (WarFoundryLoadedObject obj) |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
17 { |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
18 return obj.ID; |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
19 } |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
20 |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
21 protected override string GetFileExtensionForType (WarFoundryLoadedObject obj) |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
22 { |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
23 return GetSaver().GetFileExtension(obj); |
db6db25921fb
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
91
diff
changeset
|
24 } |
91
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 } |
98539b2fe8fa
Re #324: Add saving of Race and System data to files
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
26 } |