public void WhenSetMoreThenOnceThenDoesNotDuplicate()
		{
			var mapdoc = new HbmMapping();
			var rc = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc);
			rc.Synchronize("T1", "T2");
			rc.Synchronize("T3", "T2");
			Assert.That(mapdoc.JoinedSubclasses[0].Synchronize.Select(x => x.table), Is.EquivalentTo(new [] {"T1", "T2", "T3"}));
		}
		public void WhenSetMoreThenOnceThenDoesNotDuplicate()
		{
			var mapdoc = new HbmMapping();
			var rc = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc);
			rc.Synchronize("T1", "T2");
			rc.Synchronize("T3", "T2");
			mapdoc.JoinedSubclasses[0].Synchronize.Select(x => x.table).Should().Have.SameValuesAs("T1", "T2", "T3");
		}
        public void WhenSetMoreThenOnceThenDoesNotDuplicate()
        {
            var mapdoc = new HbmMapping();
            var rc     = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc);

            rc.Synchronize("T1", "T2");
            rc.Synchronize("T3", "T2");
            Assert.That(mapdoc.JoinedSubclasses[0].Synchronize.Select(x => x.table), Is.EquivalentTo(new [] { "T1", "T2", "T3" }));
        }
Пример #4
0
        public void WhenSetMoreThenOnceThenDoesNotDuplicate()
        {
            var mapdoc = new HbmMapping();
            var rc     = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc);

            rc.Synchronize("T1", "T2");
            rc.Synchronize("T3", "T2");
            mapdoc.JoinedSubclasses[0].Synchronize.Select(x => x.table).Should().Have.SameValuesAs("T1", "T2", "T3");
        }
        public void WhenSetSyncWithNullThenDoesNotThrows()
        {
            var mapdoc = new HbmMapping();
            var rc     = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc);

            Assert.That(() => rc.Synchronize(null), Throws.Nothing);
        }
		public void WhenSetSyncMixedWithNullAndEmptyThenAddOnlyValid()
		{
			var mapdoc = new HbmMapping();
			var rc = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc);
			rc.Synchronize("", "  ATable   ", "     ", null);
			Assert.That(mapdoc.JoinedSubclasses[0].Synchronize.Single().table, Is.EqualTo("ATable"));
		}
        public void WhenSetSyncMixedWithNullAndEmptyThenAddOnlyValid()
        {
            var mapdoc = new HbmMapping();
            var rc     = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc);

            rc.Synchronize("", "  ATable   ", "     ", null);
            Assert.That(mapdoc.JoinedSubclasses[0].Synchronize.Single().table, Is.EqualTo("ATable"));
        }
		public void WhenSetSyncWithNullThenDoesNotThrows()
		{
			var mapdoc = new HbmMapping();
			var rc = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc);
			Assert.That(() => rc.Synchronize(null), Throws.Nothing);
		}