Exemplo n.º 1
0
        public async Task InsertAsync_GivenPocoWithPrimaryNullableValueType_ShouldBeValid()
        {
            var note = new NoteNullablePrimary {
                Text = _note.Text, CreatedOn = _note.CreatedOn
            };

            var id = await DB.InsertAsync(note);

            var noteOther = await DB.SingleAsync <NoteNullablePrimary>(note.Id);

            note.Id.ShouldBe(id);
            noteOther.ShouldNotBeNull();
            noteOther.ShouldBe(note);
        }
Exemplo n.º 2
0
        public void Insert_GivenPocoWithPrimaryNullableValueType_ShouldBeValid()
        {
            var note = new NoteNullablePrimary()
            {
                Text = _note.Text, CreatedOn = _note.CreatedOn
            };

            var id = DB.Insert(note);

            var noteOther = DB.Single <NoteNullablePrimary>(note.Id);

            note.Id.ShouldBe(id);
            noteOther.ShouldNotBeNull();
            noteOther.ShouldBe(note);
        }