public void Load_NoFile()
        {
            Assert.Throws <ArgumentNullException> (() => AndroidVersion.Load((string)null));

            var p = Path.GetTempFileName();

            File.Delete(p);
            Assert.Throws <FileNotFoundException> (() => AndroidVersion.Load(p));
        }
        public void Load()
        {
            var xml = @"<AndroidApiInfo>
  <Id>O</Id>
  <Level>26</Level>
  <Name>Android O</Name>
  <Version>v7.99.0</Version>
  <Stable>False</Stable>
</AndroidApiInfo>";
            var v   = AndroidVersion.Load(new MemoryStream(Encoding.UTF8.GetBytes(xml)));

            Assert.AreEqual(26, v.ApiLevel);
            Assert.AreEqual("O", v.Id);
            Assert.AreEqual("Android O", v.CodeName);
            Assert.AreEqual("7.99.0", v.OSVersion);
            Assert.AreEqual(new Version(7, 99, 0), v.TargetFrameworkVersion);
            Assert.AreEqual("v7.99.0", v.FrameworkVersion);
            Assert.AreEqual(false, v.Stable);
        }
 public void Load_NoStream()
 {
     Assert.Throws <ArgumentNullException> (() => AndroidVersion.Load((Stream)null));
 }