Exemplo n.º 1
0
 public void ClimateItem_MeanValueResultBelowZeroWithBothBelowZeroIsFormatedCorrectly()
 {
     string left        = "-10.5";
     string right       = "-12.3";
     string resultValue = ClimateItem.Meanvalue(left, right);
     //Assert.Equal("-11.4", resultValue);
 }
Exemplo n.º 2
0
        public void ClimateItem_MeanValueResultIsZero()
        {
            string left        = "-6.5";
            string right       = "6.5";
            string resultValue = ClimateItem.Meanvalue(left, right);

            Assert.Equal("0.0", resultValue);
        }
Exemplo n.º 3
0
        public void ClimateItem_MeanValueWithDecimalsIsFormatedCorrectly()
        {
            string left        = "10.5";
            string right       = "12.3";
            string resultValue = ClimateItem.Meanvalue(left, right);

            Assert.Equal("11.4", resultValue);
        }
Exemplo n.º 4
0
        public void ClimateItem_MeanValueRightIsNull()
        {
            string left        = "22.1";
            string right       = null;
            string resultValue = ClimateItem.Meanvalue(left, right);

            Assert.Equal("22.1", resultValue);
        }
Exemplo n.º 5
0
        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"));
        }