public void Constructor_SelectionAndMessageAndInnerException_SelectionAndMessageAndInnerExcetion()
 {
     var target = new SelectionException(MockRepository.GenerateMock<ISelection>(), "1", new Exception("2"));
     Assert.IsNotNull(target.Selection);
     Assert.AreEqual(target.Selection.GetType().Name + ": 1", target.Message);
     Assert.AreEqual("2", target.InnerException.Message);
 }
        public void GetObjectData_InfoAndContext_Property()
        {
            var propertyValue = MockRepository.GenerateMock<ISelection>();
            var target = new SelectionException(propertyValue, "1");
            var serializationInfo = new SerializationInfo(typeof(int), MockRepository.GenerateMock<IFormatterConverter>());
            target.GetObjectData(serializationInfo, new StreamingContext());

            Assert.AreEqual(propertyValue, serializationInfo.GetValue("Selection", typeof(ISelection)));
        }
 public void Constructor_Message_Message()
 {
     var target = new SelectionException("1");
     Assert.AreEqual("1", target.Message);
 }
 public void Constructor_MessageAndInnerException_MessageAndInnerExcetion()
 {
     var target = new SelectionException("1", new Exception("2"));
     Assert.AreEqual("1", target.Message);
     Assert.AreEqual("2", target.InnerException.Message);
 }
 public void Constructor_NoArgs_DefaultValue()
 {
     var target = new SelectionException();
     Assert.IsTrue(target.Message.Contains("SelectionException"));
 }