public void GetDevicesOnCorruptedFileReturnsEmpty()
        {
            var mountChecker = new GameletMountChecker(null, null, null);
            Dictionary <string, GameletMountChecker.Device> devices =
                mountChecker.GetDevices(_corruptedFile);

            Assert.Multiple(() => {
                Assert.That(devices[YetiConstants.PackageMountingPoint]?.Address, Is.EqualTo(null));
                Assert.That(devices[YetiConstants.GameAssetsMountingPoint]?.Address,
                            Is.EqualTo(null));
                Assert.That(devices[YetiConstants.DeveloperMountingPoint]?.Address,
                            Is.EqualTo(null));
            });
        }
        public void GetDevicesOnGameletAfterPackageRunHasGameAssetsAndDeveloperMountSet()
        {
            var mountChecker = new GameletMountChecker(null, null, null);
            Dictionary <string, GameletMountChecker.Device> devices =
                mountChecker.GetDevices(_packageRanDirectly);

            Assert.Multiple(() => {
                Assert.That(devices[YetiConstants.PackageMountingPoint]?.Address, Is.EqualTo(null));
                Assert.That(devices[YetiConstants.GameAssetsMountingPoint]?.Address,
                            Is.EqualTo("/dev/mapper/cryptfs-disk-0129389243020"));
                Assert.That(devices[YetiConstants.DeveloperMountingPoint]?.Address,
                            Is.EqualTo("/dev/sde6"));
            });
        }
        public void GetDevicesOnCleanGameletHasGameAssetsAndDeveloperMountSet()
        {
            var mountChecker = new GameletMountChecker(null, null, null);
            Dictionary <string, GameletMountChecker.Device> devices =
                mountChecker.GetDevices(_cleanGamelet);

            Assert.Multiple(() => {
                Assert.That(devices[YetiConstants.PackageMountingPoint]?.Address, Is.EqualTo(null));
                Assert.That(devices[YetiConstants.GameAssetsMountingPoint]?.Address,
                            Is.EqualTo("/dev/sde6"));
                Assert.That(devices[YetiConstants.DeveloperMountingPoint]?.Address,
                            Is.EqualTo("/dev/sde6"));
            });
        }
        public void GetDevicesOnGameletWithMountedPackageWithOverlay()
        {
            var mountChecker = new GameletMountChecker(null, null, null);
            Dictionary <string, GameletMountChecker.Device> devices =
                mountChecker.GetDevices(_mountedWithOverlay);

            Assert.Multiple(() => {
                Assert.That(devices[YetiConstants.PackageMountingPoint]?.Address,
                            Is.EqualTo("/dev/mapper/cryptfs-disk-0129389243020"));
                Assert.That(devices[YetiConstants.GameAssetsMountingPoint]?.Address,
                            Is.EqualTo("overlay"));
                Assert.That(devices[YetiConstants.DeveloperMountingPoint]?.Address,
                            Is.EqualTo("/dev/sde6"));
            });
        }
        public void GetDevicesWhenReadingFailedReturnsEmpty()
        {
            var mountChecker = new GameletMountChecker(null, null, null);
            var emptyContent = new List <string>();
            Dictionary <string, GameletMountChecker.Device> devices =
                mountChecker.GetDevices(emptyContent);

            Assert.Multiple(() => {
                Assert.That(devices[YetiConstants.PackageMountingPoint]?.Address, Is.EqualTo(null));
                Assert.That(devices[YetiConstants.GameAssetsMountingPoint]?.Address,
                            Is.EqualTo(null));
                Assert.That(devices[YetiConstants.DeveloperMountingPoint]?.Address,
                            Is.EqualTo(null));
            });
        }