public async Task Test_CreateAndLoad_CheckIgnored()
        {
            var id = 1;
            var c0 = new TrackableTestContainerWithIgnore();

            c0.Person.Name = "Testor";
            c0.Person.Age  = 10;
            c0.Missions[1] = new MissionData {
                Kind = 101, Count = 20, Note = "Ignored"
            };
            await _mapper.CreateAsync(_db.Connection, c0, id);

            var c1 = await _mapper.LoadAsync(_db.Connection, id);

            Assert.NotNull(c1.Person);
            Assert.Equal(c0.Person.Name, c1.Person.Name);
            Assert.Equal(c0.Person.Age, c1.Person.Age);
            Assert.Equal(0, c1.Missions.Count);
        }
Пример #2
0
 public async Task <TrackableUser> LoadUserAsync(int uid)
 {
     return((TrackableUser)(await _userMapper.LoadAsync(_connection, uid)));
 }
Пример #3
0
 protected override async Task <TrackableTestContainer> LoadAsync()
 {
     return((TrackableTestContainer)await _mapper.LoadAsync(_db.Connection, _testId));
 }