Beispiel #1
0
        public void LevelAndPackImport_Success()
        {
            CreateFakeLevel("testlevel", "testpack", "level");
            CreateFakePack("testpack", "pack");

            FileManagement.ImportDirectory(new DirectoryInfo(tempPath));

            int levelCount = LevelQuery.List().Count();
            int packCount  = PackQuery.List().Count();

            Assert.That(packCount == 1 && levelCount == 1);
        }
Beispiel #2
0
        public void PackImport_Success()
        {
            CreateFakePack("testpack");

            FileManagement.ImportDirectory(new DirectoryInfo(tempPath));

            IEnumerable <Pack> packs = PackQuery.List();
            int count;

            if ((count = packs.Count()) != 1)
            {
                Assert.Fail($"There should only be one pack but {count} packs found");
            }

            Pack pack = packs.First();

            Assert.That(pack.ExternalId == "testpack");
        }