示例#1
0
        /// <summary>
        /// Checks to see if the symbol requires a dashed outline.
        /// </summary>
        /// <param name="symbolCode">
        /// The symbol code to check.
        /// </param>
        /// <returns>
        /// A boolean to indicate whether the outline should be dashed.
        /// </returns>
        internal static bool IsDashed(string symbolCode)
        {
            if (!Check(ref symbolCode))
            {
                return(false);
            }

            switch (StandardIdentity.GetCode(symbolCode))
            {
            case StandardIdentity.Pending:
            case StandardIdentity.AssumedFriend:
            case StandardIdentity.Suspect:
            case StandardIdentity.ExercisePending:
            case StandardIdentity.ExerciseAssumedFriend:
            {
                return(true);
            }

            default:
                if (StatusOperationalCapacity.GetCode(symbolCode) == StatusOperationalCapacity.AnticipatedPlanned)
                {
                    return(true);
                }

                return(false);
            }
        }
示例#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");
        }