public void ClimateItem_MeanValueResultBelowZeroWithBothBelowZeroIsFormatedCorrectly() { string left = "-10.5"; string right = "-12.3"; string resultValue = ClimateItem.Meanvalue(left, right); //Assert.Equal("-11.4", resultValue); }
public void ClimateItem_MeanValueResultIsZero() { string left = "-6.5"; string right = "6.5"; string resultValue = ClimateItem.Meanvalue(left, right); Assert.Equal("0.0", resultValue); }
public void ClimateItem_MeanValueWithDecimalsIsFormatedCorrectly() { string left = "10.5"; string right = "12.3"; string resultValue = ClimateItem.Meanvalue(left, right); Assert.Equal("11.4", resultValue); }
public void ClimateItem_MeanValueRightIsNull() { string left = "22.1"; string right = null; string resultValue = ClimateItem.Meanvalue(left, right); Assert.Equal("22.1", resultValue); }
public void ClimateItem_MeanValueLeftAndRightAreNull() { string left = null; string right = null; // Throws Exception Exception ex = Assert.Throws <ArgumentNullException>(() => ClimateItem.Meanvalue(left, right)); Assert.True(ex.Message.StartsWith("Value cannot be null")); }