コード例 #1
0
 public void Given0GallonAndNull_ShouldReturnsNotEqual()
 {
     try
     {
         double  firstGallonValue  = gallon.ConvertValueToInch(Volumes.Unit.GALLON, 0.0);
         Volumes secondGallonValue = null;
         Assert.AreNotEqual(firstGallonValue, secondGallonValue);
     }
     catch (QualityMeaurementException e)
     {
         Assert.AreEqual(QualityMeaurementException.ExceptionType.INVALID_ARGUMENT, e.Type);
     }
 }
コード例 #2
0
 public void GivenTwoObjects_WhenCheckReference_ShouldReturnFalse()
 {
     try
     {
         Volumes firstObject  = new Volumes();
         Volumes secondObject = new Volumes();
         bool    areEqual     = System.Object.ReferenceEquals(firstObject, secondObject);
         Assert.IsFalse(areEqual);
     }
     catch (QualityMeaurementException e)
     {
         Assert.AreEqual(QualityMeaurementException.ExceptionType.INVALID_ARGUMENT, e.Type);
     }
 }
コード例 #3
0
 public void Setup()
 {
     this.litre     = new Volumes();
     this.gallon    = new Volumes();
     this.miliLitre = new Volumes();
 }