Esempio n. 1
0
        /// <summary>
        /// Generates a static tooltip for a given symbol code.
        /// </summary>
        /// <param name="symbolCode">The symbol code which needs the tooltip.</param>
        /// <returns>A string representing a tooltip.</returns>
        private static string GenerateTooltip(string symbolCode)
        {
            var desc = new StringBuilder(MilAppendix.Description(symbolCode));

            desc.AppendLine("Affiliation: " + StandardIdentity.GetName(symbolCode));
            desc.AppendLine("Condition: " + StatusOperationalCapacity.GetName(symbolCode));
            desc.AppendLine("Order of battle: " + OrderOfBattle.GetName(symbolCode));
            desc.AppendLine("Country: " + Countries.GetName(symbolCode));
            desc.Append("Modifier: " + CombinedModifierCode.GetName(symbolCode));
            return(desc.ToString(0, desc.Length));
        }
Esempio n. 2
0
        public void StatusOperationalCapacityTest()
        {
            char gc = StatusOperationalCapacity.GetCode(string.Empty);

            Assert.AreEqual(gc, (char)0);
            gc = StatusOperationalCapacity.GetCode(null);
            Assert.AreEqual(gc, (char)0);
            gc = StatusOperationalCapacity.GetCode("qqqqqqqqqqqqqqq");
            Assert.AreEqual(gc, 'Q');
            string str = StatusOperationalCapacity.GetName(string.Empty);

            Assert.AreEqual(str, string.Empty);
            str = StatusOperationalCapacity.GetName(null);
            Assert.AreEqual(str, string.Empty);
            str = StatusOperationalCapacity.GetName("qqqqqqqqqqqqqqq");
            Assert.AreEqual(str, string.Empty);
            str = StatusOperationalCapacity.GetName("qqpAqqqqqqqqqqn");
            Assert.AreEqual(str, "Anticipated/Planned");
        }