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

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