public void Constructor_FitnessAndMessageAndInnerException_FitnessAndMessageAndInnerExcetion()
 {
     var target = new FitnessException(MockRepository.GenerateMock<IFitness>(), "1", new Exception("2"));
     Assert.IsNotNull(target.Fitness);
     Assert.AreEqual(target.Fitness.GetType().Name + ": 1", target.Message);
     Assert.AreEqual("2", target.InnerException.Message);
 }
        public void GetObjectData_InfoAndContext_Property()
        {
            var fitness = new FitnessStub();
            var target = new FitnessException(fitness, "1");
            var serializationInfo = new SerializationInfo(typeof(int), MockRepository.GenerateMock<IFormatterConverter>());
            target.GetObjectData(serializationInfo, new StreamingContext());

            Assert.AreEqual(fitness, serializationInfo.GetValue("Fitness", typeof(IFitness)));
        }
 public void Constructor_NoArgs_DefaultValue()
 {
     var target = new FitnessException();
     Assert.IsTrue(target.Message.Contains("FitnessException"));
 }
 public void Constructor_Message_Message()
 {
     var target = new FitnessException("1");
     Assert.AreEqual("1", target.Message);
 }
 public void Constructor_MessageAndInnerException_MessageAndInnerExcetion()
 {
     var target = new FitnessException("1", new Exception("2"));
     Assert.AreEqual("1", target.Message);
     Assert.AreEqual("2", target.InnerException.Message);
 }