Пример #1
0
            //[ExpectedException(typeof(ApplicationException))]
            public void UnMapThrowExceptionWhenMappingDidntPreviouslyExist()
            {
                var target = new FooClassMapper();

                var ex = Assert.Throws <ApplicationException>(() => target.UnMap(p => p.Name));

                StringAssert.Contains("mapping does not exist", ex.Message);
            }
Пример #2
0
            //[ExpectedException(typeof(ApplicationException))]
            public void UnMapThrowExceptionWhenMappingDidntPreviouslyExist()
            {
                Assert.Throws <ApplicationException>(delegate()
                {
                    var target = new FooClassMapper();

                    target.UnMap(p => p.Name);
                });
            }
Пример #3
0
            public void UnMapRemovesAnExistingMapping()
            {
                var target = new FooClassMapper();

                target.Map(p => p.Name);
                Assert.IsTrue(MappingExists(target));

                target.UnMap(p => p.Name);
                Assert.IsFalse(MappingExists(target));
            }
            public void UnMapThrowExceptionWhenMappingDidntPreviouslyExist()
            {
                var target = new FooClassMapper();

                target.UnMap(p => p.Name);
            }