예제 #1
0
        public void WhenLocatorIsNull_ThenFromLicenseReturnsUnknown()
        {
            var annotation = ImageAnnotation.FromLicense(null);

            Assert.AreEqual(LicenseTypes.Unknown, annotation.LicenseType);
            Assert.AreEqual(OperatingSystemTypes.Unknown, annotation.OperatingSystem);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }