Exemple #1
0
        //[Fact(DisplayName = "Citizen can born")]
        public async Task CitizenCanBeBorn()
        {
            await Setup();

            var version = await _instance1.ApplyUpdateAsync(new CreateCitizen { Address = "Moon", CitizenId = "CTZZZ01" });

            //Assert.NotEqual(0, version);
        }
Exemple #2
0
        //[Fact(DisplayName = "Citizen can be moved")]
        public async Task CitizenCanBeMoved()
        {
            await Setup();

            var version3 = await _instance1.ApplyUpdateAsync(new MoveCitizen { BaseVersionNumber = 1, NewAddress = "Tres address" });

            //Assert.Equal(3, version3);

            var version4 = await _instance2.ApplyUpdateAsync(new MoveCitizen { BaseVersionNumber = 1, NewAddress = "Tres address" });

            //Assert.Equal(4, version4);
        }
Exemple #3
0
 public async Task <long> AddCitizen(string citizenId, string address)
 {
     return(await _accumulatingFactory.ApplyUpdateAsync(new CreateCitizen { CitizenId = citizenId, Address = address }));
 }