public void SetValue_SetsBooleanAttribute() { NewElement element = InitializeEmptyNewElement(); int id = 15; var att = new BoolAttribute() { Id = id }; element.BoolAttributes.Add(att); bool value = true; element.SetValue(id, value); Assert.Equal(value, att.Value); }
public void SetValue_SetsDecimalAttribute() { NewElement element = InitializeEmptyNewElement(); int id = 15; var att = new DecimalAttribute() { Id = id }; element.DecimalAttributes.Add(att); decimal value = 15.15m; element.SetValue(id, value); Assert.Equal(value, att.Value); }
public void SetValue_SetsIntegerAttribute() { NewElement element = InitializeEmptyNewElement(); int id = 15; var att = new IntegerAttribute() { Id = id }; element.IntegerAttributes.Add(att); int value = 150; element.SetValue(id, value); Assert.Equal(value, att.Value); }
public void SetValue_SetsDateTimeAttribute() { NewElement element = InitializeEmptyNewElement(); int id = 15; var att = new DateTimeAttribute() { Id = id }; element.DateTimeAttributes.Add(att); DateTime value = DateTime.Now; element.SetValue(id, value); Assert.Equal(value, att.Value); }