コード例 #1
0
        public void WhenCallKeyMapperMoreThanOnceThenKeyMapperIsTheSame()
        {
            var        mapdoc             = new HbmMapping();
            var        hbmJoin            = new HbmJoin();
            var        mapper             = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);
            IKeyMapper firstCallInstance  = null;
            IKeyMapper secondCallInstance = null;

            mapper.Key(km => firstCallInstance  = km);
            mapper.Key(km => secondCallInstance = km);

            firstCallInstance.Should().Be.SameInstanceAs(secondCallInstance);
        }
コード例 #2
0
        public void WhenCallKeyMapperThenKeyMapperIsNotNull()
        {
            var mapdoc  = new HbmMapping();
            var hbmJoin = new HbmJoin();
            var mapper  = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);

            mapper.Key(km => km.Should().Not.Be.Null());
        }
コード例 #3
0
ファイル: JoinMapperTests.cs プロジェクト: jrauber/GH1429
        public void WhenCallKeyMapperThenKeyMapperIsNotNull()
        {
            var mapdoc  = new HbmMapping();
            var hbmJoin = new HbmJoin();
            var mapper  = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);

            mapper.Key(km => Assert.That(km, Is.Not.Null));
        }
コード例 #4
0
        public void CallKeyMapper()
        {
            var mapdoc          = new HbmMapping();
            var hbmJoin         = new HbmJoin();
            var mapper          = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);
            var keyMapperCalled = false;

            mapper.Key(km => keyMapperCalled = true);

            keyMapperCalled.Should().Be.True();
        }
コード例 #5
0
ファイル: JoinMapperTests.cs プロジェクト: jrauber/GH1429
        public void CallKeyMapper()
        {
            var mapdoc          = new HbmMapping();
            var hbmJoin         = new HbmJoin();
            var mapper          = new JoinMapper(typeof(MyClass), "AA", hbmJoin, mapdoc);
            var keyMapperCalled = false;

            mapper.Key(km => keyMapperCalled = true);

            Assert.That(keyMapperCalled, Is.True);
        }