Exemplo n.º 1
0
        public void WhenLocatorIsNull_ThenFromLicenseReturnsUnknown()
        {
            var annotation = ImageAnnotation.FromLicense(null);

            Assert.AreEqual(LicenseTypes.Unknown, annotation.LicenseType);
            Assert.AreEqual(OperatingSystemTypes.Unknown, annotation.OperatingSystem);
        }
Exemplo n.º 2
0
        public void WhenLocatorIsNotWindwosAndNotNull_ThenFromLicenseReturnsLinux()
        {
            var annotation = ImageAnnotation.FromLicense(
                new LicenseLocator("my-project", "my-distro"));

            Assert.AreEqual(LicenseTypes.Unknown, annotation.LicenseType);
            Assert.AreEqual(OperatingSystemTypes.Linux, annotation.OperatingSystem);
        }
Exemplo n.º 3
0
        public void WhenLocatorIsWindowsSpla_ThenFromLicenseReturnsWindowsSpla()
        {
            var annotation = ImageAnnotation.FromLicense(
                new LicenseLocator("windows-cloud", "windows-2016-dc"));

            Assert.AreEqual(LicenseTypes.Spla, annotation.LicenseType);
            Assert.AreEqual(OperatingSystemTypes.Windows, annotation.OperatingSystem);
        }
Exemplo n.º 4
0
        public void WhenLocatorIsWindowsByol_ThenFromLicenseReturnsWindowsByol()
        {
            var annotation = ImageAnnotation.FromLicense(
                new LicenseLocator("windows-cloud", "windows-10-enterprise-byol"));

            Assert.AreEqual(LicenseTypes.Byol, annotation.LicenseType);
            Assert.AreEqual(OperatingSystemTypes.Windows, annotation.OperatingSystem);
        }