public void TestDictionary()
        {
            using (var vw = new VowpalWabbitExampleValidator <ExampleDictionary>(string.Empty))
            {
                var ex = new ExampleDictionary()
                {
                    Dict = new Dictionary <object, object>()
                };
                ex.Dict.Add("Age", 25);
                ex.Dict.Add("Location", 1.2);

                vw.Validate("| Age:25 Location:1.2", ex);

                ex.Dict = null;
                vw.Validate("", ex);
            }
        }
Exemplo n.º 2
0
        public void TestDictionary()
        {
            using (var vw = new VowpalWabbitExampleValidator<ExampleDictionary>(string.Empty))
            {
                var ex = new ExampleDictionary() { Dict = new Dictionary<object, object>() };
                ex.Dict.Add("Age", 25);
                ex.Dict.Add("Location", 1.2);

                vw.Validate("| Age:25 Location:1.2", ex);

                ex.Dict = null;
                vw.Validate("", ex);
            }
        }