public void Should_Throw_Exception_When_Size_Is_Greater_Than_1000() { const int size = 1050; try { var cloudBlockStorageValidator = new CloudBlockStorageValidator(); cloudBlockStorageValidator.ValidateVolumeSize(size); Assert.Fail("Expected was not thrown."); } catch (Exception exc) { Assert.IsTrue(exc is InvalidVolumeSizeException); } }
public void Should_Not_Throw_Exception_When_Size_Is_In_Range() { const int size = 900; try { var cloudBlockStorageValidator = new CloudBlockStorageValidator(); cloudBlockStorageValidator.ValidateVolumeSize(size); } catch (Exception) { Assert.Fail("Exception should not be thrown."); } }