public async Task Test_CreateAsDefault_LoadAndCheckEqual()
        {
            var p0 = new TrackableTestTypeNullablePoco();
            await _mapper.CreateAsync(_db, p0, _testId);

            var p1 = await _mapper.LoadAsync(_db, _testId);

            AssertTestPocoEqual(p0, p1);
        }
Beispiel #2
0
        public TrackableTestTypeNullablePoco Clone()
        {
            var o = new TrackableTestTypeNullablePoco();

            o._Id                = _Id;
            o._ValBool           = _ValBool;
            o._ValByte           = _ValByte;
            o._ValShort          = _ValShort;
            o._ValChar           = _ValChar;
            o._ValInt            = _ValInt;
            o._ValLong           = _ValLong;
            o._ValFloat          = _ValFloat;
            o._ValDouble         = _ValDouble;
            o._ValDecimal        = _ValDecimal;
            o._ValDateTime       = _ValDateTime;
            o._ValDateTimeOffset = _ValDateTimeOffset;
            o._ValTimeSpan       = _ValTimeSpan;
            o._ValGuid           = _ValGuid;
            o._ValSuit           = _ValSuit;
            return(o);
        }
        public async Task Test_CreateAsIdentity_LoadAndCheckEqual()
        {
            var p0 = new TrackableTestTypeNullablePoco();

            p0.ValBool           = true;
            p0.ValByte           = 1;
            p0.ValShort          = 1;
            p0.ValChar           = '\x1';
            p0.ValFloat          = 1;
            p0.ValDouble         = 1;
            p0.ValDecimal        = 1;
            p0.ValDateTime       = new DateTime(2001, 1, 1, 1, 1, 1);
            p0.ValDateTimeOffset = new DateTimeOffset(2001, 1, 1, 1, 1, 1, TimeSpan.Zero);
            p0.ValTimeSpan       = new TimeSpan(1, 1, 1);
            p0.ValGuid           = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
            p0.ValSuit           = Suit.Spade;
            await _mapper.CreateAsync(_db, p0, _testId);

            var p1 = await _mapper.LoadAsync(_db, _testId);

            AssertTestPocoEqual(p0, p1);
        }