예제 #1
0
        public void Equals_TwoUninitializedObjects_ResultIsTrue()
        {
            // Arrange
            var object1 = new ProcessorUtilizationInformation();
            var object2 = new ProcessorUtilizationInformation();

            // Act
            bool result = object1.Equals(object2);

            // Assert
            Assert.IsTrue(result);
        }
예제 #2
0
        public void Equals_SuppliedObjectIsNotInitialized_ResultIsFalse()
        {
            // Arrange
            var object1 = new ProcessorUtilizationInformation {
                ProcessorUtilizationInPercent = 50.0d
            };
            var object2 = new ProcessorUtilizationInformation();

            // Act
            bool result = object1.Equals(object2);

            // Assert
            Assert.IsFalse(result);
        }
예제 #3
0
        public void Equals_TwoIdenticalInitializedObjects_ResultIsTrue()
        {
            // Arrange
            var object1 = new ProcessorUtilizationInformation {
                ProcessorUtilizationInPercent = 50.0d
            };
            var object2 = new ProcessorUtilizationInformation {
                ProcessorUtilizationInPercent = 50.0d
            };

            // Act
            bool result = object1.Equals(object2);

            // Assert
            Assert.IsTrue(result);
        }