コード例 #1
0
        public void ValueWithNoSpace()
        {
            IModel model = EnumValueModel.Factory("EnumValue", "VALUE", null);
            IDictionary <string, string> dictionary = model.GetModelParts();

            Assert.That(dictionary.ContainsKey("data"));
            Assert.That(dictionary.Keys.Count, Is.EqualTo(1));
        }
コード例 #2
0
        public void NAME_VALUE_1_THRU_9()
        {
            IModel model = EnumValueModel.Factory("EnumValue", "NAME VALUE 1 THRU 9", null);
            IDictionary <string, string> dictionary = model.GetModelParts();

            Assert.That(dictionary.ContainsKey("name"));
            Assert.That(dictionary.ContainsKey("values"));
            Assert.That(dictionary.ContainsKey("text"));

            Assert.That(dictionary["name"], Is.EqualTo("NAME"), "name");
            Assert.That(dictionary["values"], Is.EqualTo("1 THRU 9"), "values");
            Assert.That(dictionary["text"], Is.EqualTo("NAME VALUE 1 THRU 9"), "text");
            Assert.That(dictionary.Keys.Count, Is.EqualTo(3));
        }
コード例 #3
0
 public static IBuilder EnumValue(string name, string comment = null)
 {
     return(new ModelBuilder(EnumValueModel.Factory("EnumValue", name, comment)));
 }