//[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); }
//[ExpectedException(typeof(ApplicationException))] public void UnMapThrowExceptionWhenMappingDidntPreviouslyExist() { Assert.Throws <ApplicationException>(delegate() { var target = new FooClassMapper(); target.UnMap(p => p.Name); }); }
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); }