public void LocalizedArgumentAttributeMustSupplyResourceType()
        {
            var attribute = new CommandLineArgumentAttribute(CommandLineArgumentFlags.AtMostOnce);

            attribute.Description = "#Description";
            var desc = attribute.LocalizedDescription;
        }
        public void UnLocalizedNullArgumentAttributeReturnsNull()
        {
            var attribute = new CommandLineArgumentAttribute(CommandLineArgumentFlags.AtMostOnce);

            attribute.Description = null;
            Assert.AreEqual(null, attribute.Description);
        }
        public void UnLocalizedArgumentAttributeDoesNotNeedResource()
        {
            var attribute = new CommandLineArgumentAttribute(CommandLineArgumentFlags.AtMostOnce);

            attribute.LongName = "no-logo";
            Assert.AreEqual("no-logo", attribute.LongName);
        }
        public void LocalizedArgumentAttributeMustFindStringResourceNamed()
        {
            var attribute = new CommandLineArgumentAttribute(CommandLineArgumentFlags.AtMostOnce);

            attribute.ResourceType = typeof(Gallio.Tests.Properties.Resources);
            attribute.Description  = "#CommandLineArgumentAttributeTests_NotAStringResource";
            var desc = attribute.LocalizedDescription;
        }
        public void LocalizedArgumentAttributeDescription()
        {
            var attribute = new CommandLineArgumentAttribute(CommandLineArgumentFlags.AtMostOnce);

            attribute.Description  = "#CommandLineArgumentAttributeTests_Description";
            attribute.ResourceType = typeof(Gallio.Tests.Properties.Resources);
            Assert.AreEqual("#CommandLineArgumentAttributeTests_Description", attribute.Description);
            Assert.AreEqual("Description", attribute.LocalizedDescription);
        }
        public void LocalizedArgumentAttributeLongName()
        {
            var attribute = new CommandLineArgumentAttribute(CommandLineArgumentFlags.AtMostOnce);

            attribute.LongName     = "#CommandLineArgumentAttributeTests_LongName";
            attribute.ResourceType = typeof(Gallio.Tests.Properties.Resources);
            Assert.AreEqual("#CommandLineArgumentAttributeTests_LongName", attribute.LongName);
            Assert.AreEqual("Long name", attribute.LocalizedLongName);
        }
        public void LocalizedArgumentAttributeOneSynonym()
        {
            var attribute = new CommandLineArgumentAttribute(CommandLineArgumentFlags.AtMostOnce);

            attribute.Synonyms     = new [] { "#CommandLineArgumentAttributeTests_Synonym1" };
            attribute.ResourceType = typeof(Gallio.Tests.Properties.Resources);
            Assert.AreEqual("#CommandLineArgumentAttributeTests_Synonym1", attribute.Synonyms[0]);
            Assert.AreEqual("Synonym1", attribute.LocalizedSynonyms[0]);
        }
        public void LocalizedArgumentAttributeValueLabel()
        {
            var attribute = new CommandLineArgumentAttribute(CommandLineArgumentFlags.AtMostOnce);

            attribute.ValueLabel   = "#CommandLineArgumentAttributeTests_ValueLabel";
            attribute.ResourceType = typeof(Gallio.Tests.Properties.Resources);
            Assert.AreEqual("#CommandLineArgumentAttributeTests_ValueLabel", attribute.ValueLabel);
            Assert.AreEqual("Value label", attribute.LocalizedValueLabel);
        }