[TestFixtureSetUp]
public void FixtureSetUp ()
{
- char ds = Path.DirectorySeparatorChar;
- if (ds == '/') {
- string base_path = Path.Combine (Directory.GetCurrentDirectory (), Path.Combine ("Test", "resources"));
- m_ResourceFile = Path.Combine (base_path, "MyResources.resources");
- m_BadResourceFile = Path.Combine (base_path, "Empty.resources");
- } else {
- m_ResourceFile = Path.Combine ("Test", Path.Combine ("resources", "MyResources.resources"));
- m_BadResourceFile = "resources" + ds + "Empty.resources";
- }
+ string base_path = Path.Combine (Directory.GetCurrentDirectory (), Path.Combine ("Test", "resources"));
+ m_ResourceFile = Path.Combine (base_path, "MyResources.resources");
+ m_BadResourceFile = Path.Combine (base_path, "Empty.resources");
}
[SetUp]
}
[Test]
- [Ignore ("Not covered in the docs, not sure what the correct behavior should be for this")]
- [ExpectedException (typeof (DirectoryNotFoundException))]
+ [Category ("MobileNotWorking")]
+ [ExpectedException (typeof (BadImageFormatException))]
public void ConstructorString_Bad ()
{
Assert.IsTrue (File.Exists (m_BadResourceFile));
}
[Test]
+ [Category ("MobileNotWorking")]
public void ConstructorString ()
{
if (!File.Exists (m_ResourceFile)) {
}
[Test]
+ [Category ("MobileNotWorking")]
public void ConstructorStream_Closed ()
{
Stream stream = new FileStream (m_ResourceFile, FileMode.Open);
}
[Test]
+ [Category ("MobileNotWorking")]
public void Stream ()
{
Stream stream = new FileStream (m_ResourceFile, FileMode.Open);
}
[Test]
+ [Category ("MobileNotWorking")]
public void Close ()
{
Stream stream = new FileStream (m_ResourceFile, FileMode.Open);
}
[Test]
+ [Category ("MobileNotWorking")]
public void Enumerator ()
{
Stream stream = new FileStream (m_ResourceFile, FileMode.Open);
reader.Close ();
}
-#if NET_2_0
[Test] // bug #81757
public void ReadNullResource ()
{
Assert.AreEqual (1, entryCount, "#4");
}
}
-#endif
[Test] // bug #79976
public void ByteArray ()
Stream stream = null;
-#if NET_2_0
// we currently do not support writing v2 resource files
stream = new MemoryStream ();
stream.Write (byte_resource_v2, 0, byte_resource_v2.Length);
stream.Position = 0;
-#else
- using (IResourceWriter rw = new ResourceWriter (_tempResourceFile)) {
- rw.AddResource ("byteArrayTest", content);
- rw.Generate ();
- }
-
- stream = File.OpenRead (_tempResourceFile);
-#endif
using (stream) {
int entryCount = 0;
}
}
-#if NET_2_0
[Test]
+ [Category ("MobileNotWorking")]
public void GetResourceDataNullName ()
{
ResourceReader r = new ResourceReader ("Test/resources/StreamTest.resources");
}
[Test]
+ [Category ("MobileNotWorking")]
public void GetResourceData ()
{
byte [] t1 = new byte [] {0x16, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x69, 0x74, 0x61, 0x73, 0x20, 0x76, 0x6F, 0x73, 0x20, 0x6C, 0x69, 0x62, 0x65, 0x72, 0x61, 0x62, 0x69, 0x74, 0x0A};
}
[Test]
+ [Category ("MobileNotWorking")]
public void GetResourceData2 ()
{
byte [] expected = new byte [] {
0x00, 0x72, 0x00, 0x72, 0x00, 0x61, 0x00, 0x79, 0x00, 0x54, 0x00,
0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x06, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
-#endif
}
}