Exemple #1
0
        private async Task <string> ReadHelpAsync()
        {
            var reader = new AssemblyTextFileReader(Assembly.GetExecutingAssembly());
            var readme = await reader.ReadFileAsync("README.md");

            var index = readme.IndexOf("## Keyboad Shortcuts ##", StringComparison.InvariantCulture);

            return(readme.Remove(0, index));
        }
Exemple #2
0
        public async Task Read_Infos()
        {
            var reader  = new AssemblyTextFileReader(Assembly.GetExecutingAssembly());
            var jsonTxt = await reader.ReadFileAsync(@"updateinfotest.json.txt");

            var uiArray = JsonConvert.DeserializeObject <UpdateInfo[]>(jsonTxt);

            CollectionAssert.IsNotEmpty(uiArray);
            var ui = uiArray[0];

            Assert.AreEqual(ui.Version, "1.1.1.1");
            Assert.AreEqual(ui.Changes[0], "eins");
            Assert.AreEqual(ui.Changes[1], "zwei");
            Assert.AreEqual(ui.DownLoadURL, "http://mtools/MONI.exe");
        }