示例#1
0
        public void AddTwoColumnToInternalMappingList()
        {
            // arrange
            var instance = new UpsertOptions <StandardModel>();
            var expected = "PK,Name";

            // act
            instance.AddMapColumn(p => p.PK).AddMapColumn(p => p.Name);
            var actual = string.Join(",", instance._mapColumns);

            // assert
            Assert.Equal(expected, actual);
        }
示例#2
0
        public void AddColumnToInternalMappingList()
        {
            // arrange
            var instance = new UpsertOptions <StandardModel>();
            var expected = "PK";

            // act
            instance.AddMapColumn(p => p.PK);
            var actual = instance._mapColumns.First();

            // assert
            Assert.Equal(expected, actual);
        }