예제 #1
0
        public void TestToString()
        {
            //arrange
            FanOutput fo = new FanOutput(1, "Test", 20, 55);

            //act
            string foToString     = fo.ToString();
            string expectedResult = "ID: 1, Name: Test, Temp: 20, Humidity: 55";

            //assert
            Assert.AreEqual(foToString, expectedResult);
        }
예제 #2
0
        public void TestObjectCreation()
        {
            FanOutput _testOutput2 = new FanOutput(2, "Kasper", 18, 60);

            Assert.AreEqual("Id: 2, Name: Kasper, Temperature 18, Humidity: 60", _testOutput2.ToString());
        }