Exemplo n.º 1
0
        static void Main(string[] args)
        {
            GlobalReference.GlobalValues.Initilize();

            List <string> permanentDirectories = new List <string>();

            permanentDirectories.Add(@"c:\temp");
            CachedFileIO cachedFileIO = new CachedFileIO(permanentDirectories, new FileIO());

            cachedFileIO.ReloadCache();


            List <IZone> zones = GenerateZones.Program.GenerateZones();

            //List<IZone> zones = new List<IZone>();
            //UndergroundChamber randomZone = new UndergroundChamber();

            //for (int i = 81; i < 82; i++)
            //{
            //    randomZone.Generate(20, 20, 10, i);
            //    zones.Add(randomZone.ConvertToZone(i * -1));
            //}



            //using (TextWriter tw = new StreamWriter(@"C:\Mud\Assets\Maps\2.cs"))
            //{
            //    tw.Write(zones[0].ToCsFile(2));
            //}

            GenerateZoneMaps.Program.GenerateMaps(zones);
        }
Exemplo n.º 2
0
        public void CachedFileIO_ReloadCache()
        {
            cachedFileIO.AppendFile(@"c:\test\file1", "blah");

            cachedFileIO.ReloadCache();

            fileIO.Verify(e => e.CreateDirectory(@"c:\test"), Times.Exactly(1));
            fileIO.Verify(e => e.WriteFile(@"c:\test\file1", It.IsAny <byte[]>()), Times.Once);
        }