Beispiel #1
0
        public void SetCollectionTypeByWrongTypeShouldThrow()
        {
            var hbm    = new HbmIdbag();
            var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);

            Assert.That(() => mapper.Type(null), Throws.TypeOf <ArgumentNullException>());
            Assert.That(() => mapper.Type(typeof(object)), Throws.TypeOf <ArgumentOutOfRangeException>());
        }
Beispiel #2
0
        public void SetCollectionTypeByWrongTypeShouldThrow()
        {
            var hbm    = new HbmIdbag();
            var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);

            Executing.This(() => mapper.Type(null)).Should().Throw <ArgumentNullException>();
            Executing.This(() => mapper.Type(typeof(object))).Should().Throw <ArgumentOutOfRangeException>();
        }
Beispiel #3
0
        public void SetCollectionTypeByType()
        {
            var hbm    = new HbmIdbag();
            var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);

            mapper.Type(typeof(FakeUserCollectionType));
            Assert.That(hbm.CollectionType, Is.StringContaining("FakeUserCollectionType"));
        }
Beispiel #4
0
        public void SetCollectionTypeByGenericType()
        {
            var hbm    = new HbmIdbag();
            var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);

            mapper.Type <FakeUserCollectionType>();
            Assert.That(hbm.CollectionType, Does.Contain("FakeUserCollectionType"));
        }
Beispiel #5
0
        public void SetCollectionTypeByType()
        {
            var hbm    = new HbmIdbag();
            var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);

            mapper.Type(typeof(FakeUserCollectionType));
            hbm.CollectionType.Should().Contain("FakeUserCollectionType");
        }
		public void SetCollectionTypeByType()
		{
			var hbm = new HbmIdbag();
			var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);
			mapper.Type(typeof(FakeUserCollectionType));
			hbm.CollectionType.Should().Contain("FakeUserCollectionType");
		}
		public void SetCollectionTypeByWrongTypeShouldThrow()
		{
			var hbm = new HbmIdbag();
			var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);
			Executing.This(() => mapper.Type(null)).Should().Throw<ArgumentNullException>();
			Executing.This(() => mapper.Type(typeof(object))).Should().Throw<ArgumentOutOfRangeException>();
		}
		public void SetCollectionTypeByType()
		{
			var hbm = new HbmIdbag();
			var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);
			mapper.Type(typeof(FakeUserCollectionType));
			Assert.That(hbm.CollectionType, Is.StringContaining("FakeUserCollectionType"));
		}
		public void SetCollectionTypeByWrongTypeShouldThrow()
		{
			var hbm = new HbmIdbag();
			var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm);
			Assert.That(() => mapper.Type(null), Throws.TypeOf<ArgumentNullException>());
			Assert.That(() => mapper.Type(typeof(object)), Throws.TypeOf<ArgumentOutOfRangeException>());
		}