AppendToStream() public method

public AppendToStream ( IIdentity id, long expectedVersion, ICollection events ) : System.Threading.Tasks.Task
id IIdentity
expectedVersion long
events ICollection
return System.Threading.Tasks.Task
 public async Task WriteFile()
 {
     var fs = new FileAppendOnlyStoreAsync(new FileAppendOnlyStoreAsync.Options(File) { FileStream = s => Path.Combine(this.File, s + ".dat") });
     var es = new EventStoreAsync(fs);
     
     var id = new GuidId(Guid.NewGuid());
     await es.AppendToStream(id, 0, new List<IEvent>() {new MyNewEventEvent(id.ToString(), Guid.NewGuid(), DateTime.UtcNow)});
 }
        public async Task WriteStreamAndExtraxt()
        {
            var fs = new FileAppendOnlyStoreAsync(File);

            var es = new EventStoreAsync(fs);
            var id2 = GuidId.NewGuidId();
            var id1 = GuidId.NewGuidId();

            await es.AppendToStream(id2, 0, new[] {new BigEventData(), new BigEventData() , new BigEventData() });
            await es.AppendToStream(id1, 0, new[] { new BigEventData(), new BigEventData(), new BigEventData() });
            await es.AppendToStream(id2, 1, new[] { new BigEventData(), new BigEventData(), new BigEventData() });
            await es.AppendToStream(id1, 1, new[] { new BigEventData(), new BigEventData(), new BigEventData() });

            await fs.ExtractMasterStream(new DirectoryInfo(Path.Combine(File, "out")), new NameDashGuidNaming(), 0, int.MaxValue);

            
            Assert.True(true, "Tested in: " + File);
        }