public void when_append_to_store() { var store = new MessageStore(_appendOnlyStore, _serializer); store.AppendToStore("stream5", MessageAttribute.Empty, -1, new[] { "msg1", "msg2", "msg3" }); var records = store.EnumerateMessages("stream5", 0, Int32.MaxValue).ToArray(); Assert.AreEqual(1, records.Length); Assert.AreEqual(3, records[0].Items.Length); //todo simple types are not properly deserialize //Assert.AreEqual("msg1", records[0].Items[0].ToString()); //Assert.AreEqual("msg2", records[0].Items[1].ToString()); //Assert.AreEqual("msg3", records[0].Items[2].ToString()); }
public void when_append_to_store() { var store = new MessageStore(_appendOnlyStore, _serializer); store.AppendToStore("stream5", MessageAttribute.Empty, -1, new[] { new SerializerTest1 { Name = "name1" } }); var records = store.EnumerateMessages("stream5", 0, Int32.MaxValue).ToArray(); Assert.AreEqual(1, records.Length); Assert.AreEqual(1, records[0].Items.Length); Assert.AreEqual("name1", (records[0].Items[0] as SerializerTest1).Name); }