public override void Arrange() { base.Arrange(); _complexValue = new ComplexValue(); Accumulator.AddProperties(new LogProperty[] { new LogProperty <int, int>("key1", 34, x => x.Sum() + 1), new LogProperty <string, string>("key2", "sample", x => string.Join(":", x) + "fake"), new LogProperty <ComplexValue, ComplexValue[]>("key3", _complexValue, x => x.ToArray()) }); }
public override void Arrange() { base.Arrange(); _complexValue1 = new ComplexValue { Id = 10, Name = "one" }; _complexValue2 = new ComplexValue { Id = 20, Name = "two" }; Accumulator.AddProperties(new LogProperty[] { new LogProperty <int, int>("key1", 1, x => x.Sum()), new LogProperty <string>("key2", "sample"), new LogProperty <ComplexValue, string>("key3", _complexValue1, x => string.Concat(x.Select(y => y?.Name ?? "[null]"))), new LogProperty <int, int[]>("key1", 2, x => x.ToArray()), new LogProperty <int, string>("key1", 3, string.Concat), new LogProperty <int, int>("key1", 4, x => x.Max()), new LogProperty <ComplexValue>("key3", _complexValue2), new LogProperty <ComplexValue, int>("key3", null, x => x.Select(y => y.Id).Max()) }); }
public override void Arrange() { base.Arrange(); _complexValue1 = new ComplexValue(); _complexValue2 = new DerivedComplexValue { DerivedId = 2 }; Accumulator.AddProperties(new LogProperty[] { new LogProperty <int>("key1", 34), new LogProperty <string>("key2", "sample"), new LogProperty <ComplexValue>("key3", _complexValue1), new LogProperty <int>("key1", 11), new LogProperty <int>("key1", 0), new LogProperty <int>("key1", 99), new LogProperty <string>("key1", "loser"), new LogProperty <ComplexValue>("key3", null), new LogProperty <DerivedComplexValue>("key3", _complexValue2) }); }
public override void Arrange() { base.Arrange(); _complexValue = new ComplexValue(); Accumulator.AddProperties(new LogProperty[] { new LogProperty <int>("key1", 34), new LogProperty <string>("key2", "sample"), new LogProperty <ComplexValue>("key3", _complexValue), // Test default values new LogProperty <int>("int1", 0) { SuppressDefaults = true }, new LogProperty <int>("int2", 0), new LogProperty <int?>("nullable1", null) { SuppressDefaults = true }, new LogProperty <int?>("nullable2", null), new LogProperty <int?>("nullable3", 0) { SuppressDefaults = true }, new LogProperty <string>("string1", null) { SuppressDefaults = true }, new LogProperty <string>("string2", null), new LogProperty <string>("string3", "") { SuppressDefaults = true }, new LogProperty <ComplexValue>("complex1", null) { SuppressDefaults = true }, new LogProperty <ComplexValue>("complex2", null) }); }
public override void Arrange() { base.Arrange(); Accumulator.AddProperties(new LogProperty[] { new ComplexLogProperty <int>("parent", "single", 10), new ComplexLogProperty <int>("parent", "duplicate", 15), new ComplexLogProperty <int>("parent", "duplicate", 3), new ComplexLogProperty <int, int>("parent", "aggregate", 30, ints => ints.Sum()), new ComplexLogProperty <int, string>("parent", "aggregate", 4, ints => "something"), new ComplexLogProperty <int>("parent", "aggregate", 6), new LogProperty <int>("standalone", 42), new LogProperty <int, string>("existing", 39, ints => "agg"), new ComplexLogProperty <int>("existing", "aggregate", 6), new LogProperty <int>("existing", 1024), new ComplexLogProperty <int>("existing2", "aggregate", 6), new LogProperty <int, string>("existing2", 39, ints => "agg") }); }