Exemplo n.º 1
0
 public CharacterTransformer(ILogger <RowTransformerBase <CharacterRow, Character> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _intConverter             = new IntConverter();
     _stringToBooleanConverter = new StringToBooleanConverter();
     _realmConverter           = new TypeListConverter(new RealmList());
 }
Exemplo n.º 2
0
        public void NotEmptyStringConverter()
        {
            var converter = new StringToBooleanConverter();

            Assert.AreEqual(true, converter.Convert("not null", typeof(bool), null, null));
            Assert.AreEqual(false, converter.Convert(null, typeof(bool), null, null));
            Assert.AreEqual(false, converter.Convert("", typeof(bool), null, null));
            Assert.AreEqual(null, converter.ConvertBack(null, typeof(bool), null, null));
        }
Exemplo n.º 3
0
 public MagiciteSkillTransformer(ILogger <RowTransformerBase <MagiciteSkillRow, MagiciteSkill> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _doubleConverter            = new DoubleConverter();
     _stringToBooleanConverter   = new StringToBooleanConverter();
     _percentConverter           = new PercentConverter();
     _abilityTypeConverter       = new TypeListConverter(new AbilityTypeList());
     _autoTargetTypeConverter    = new TypeListConverter(new AutoTargetTypeList());
     _damageFormulaTypeConverter = new TypeListConverter(new DamageFormulaTypeList());
     _elementConverter           = new TypeListConverter(new ElementList());
 }
Exemplo n.º 4
0
 public OtherTransformer(ILogger <RowTransformerBase <OtherRow, Other> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _doubleConverter            = new DoubleConverter();
     _intConverter               = new IntConverter();
     _stringToBooleanConverter   = new StringToBooleanConverter();
     _abilityTypeConverter       = new TypeListConverter(new AbilityTypeList());
     _targetTypeConverter        = new TypeListConverter(new TargetTypeList());
     _autoTargetTypeConverter    = new TypeListConverter(new AutoTargetTypeList());
     _damageFormulaTypeConverter = new TypeListConverter(new DamageFormulaTypeList());
     _elementConverter           = new TypeListConverter(new ElementList());
     _schoolConverter            = new TypeListConverter(new SchoolList());
 }
 public void SetUp()
 {
     _converter = new StringToBooleanConverter();
 }
Exemplo n.º 6
0
 public LegendMateriaTransformer(ILogger <RowTransformerBase <LegendMateriaRow, LegendMateria> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _realmConverter           = new TypeListConverter(new RealmList());
     _stringToBooleanConverter = new StringToBooleanConverter();
 }
 public StringToBooleanConverterTests()
 {
     stringToBooleanConverter = new StringToBooleanConverter();
 }