Example #1
0
        public void SetWrongProxy()
        {
            var subClass = typeof(Inherited);
            var mapdoc   = new HbmMapping();
            var mapper   = new JoinedSubclassMapper(subClass, mapdoc);

            Executing.This(() => mapper.Proxy(typeof(Z))).Should().Throw <MappingException>();
        }
Example #2
0
        public void SetWrongProxy()
        {
            var subClass = typeof(Inherited);
            var mapdoc   = new HbmMapping();
            var mapper   = new JoinedSubclassMapper(subClass, mapdoc);

            ActionAssert.Throws <MappingException>(() => mapper.Proxy(typeof(Z)));
        }
Example #3
0
        public void SetProxy()
        {
            var subClass = typeof(Inherited);
            var mapdoc   = new HbmMapping();
            var mapper   = new JoinedSubclassMapper(subClass, mapdoc);

            mapper.Proxy(subClass);

            var hbmEntity = mapdoc.JoinedSubclasses[0];

            hbmEntity.Proxy.Should().Contain("Inherited");
        }