Ejemplo n.º 1
0
        public void TestFindRBinPath()
        {
            string rLibPath = NativeUtility.FindRPath();
            var    files    = Directory.GetFiles(rLibPath);
            var    fnmatch  = files.Where(fn => fn.ToLower() == Path.Combine(rLibPath.ToLower(), NativeUtility.GetRLibraryFileName().ToLower()));

            Assert.AreEqual(1, fnmatch.Count());
        }
Ejemplo n.º 2
0
        public static void TestFindRPath(string expectContains)
        {
            var rPath = NativeUtility.FindRPath();

            var match = rPath.Contains(expectContains);

            Console.WriteLine("Detected RPath is {0}", rPath);
            if (match)
            {
                Console.WriteLine("Contains string '{0}' as expected", expectContains);
            }
            else
            {
                Console.WriteLine("Does NOT contain string '{0}' as expected", expectContains);
            }
        }