示例#1
0
        public void Contains_correct_settings_interface()
        {
            var settings = JsonKnownTypesSettingsManager.GetDiscriminatorValues <ISettings>();

            Assert.True(settings.Count == 0);
            Assert.AreEqual(settings.FieldName, "name");
        }
示例#2
0
        public void Settings_are_correct()
        {
            var settings = JsonKnownTypesSettingsManager.GetDiscriminatorValues <ParentClass>();

            Assert.True(settings.Count == 3);
            Assert.AreEqual(settings.FieldName, DiscriminatorName);
        }
示例#3
0
 public void Throw_an_exception() =>
 Assert.Throws <JsonKnownTypesException>(delegate
 {
     JsonKnownTypesSettingsManager.GetDiscriminatorValues <Settings>();
 });