Exemplo n.º 1
0
        public void CompareToIsImplemented()
        {
            Diffusivity squaremeterperhour = Diffusivity.FromSquareMeterPerHours(1);

            Assert.Equal(0, squaremeterperhour.CompareTo(squaremeterperhour));
            Assert.True(squaremeterperhour.CompareTo(Diffusivity.Zero) > 0);
            Assert.True(Diffusivity.Zero.CompareTo(squaremeterperhour) < 0);
        }
Exemplo n.º 2
0
        public void CompareToThrowsOnNull()
        {
            Diffusivity squaremeterperhour = Diffusivity.FromSquareMeterPerHours(1);

            Assert.Throws <ArgumentNullException>(() => squaremeterperhour.CompareTo(null));
        }
Exemplo n.º 3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            Diffusivity squaremeterperhour = Diffusivity.FromSquareMeterPerHours(1);

            Assert.Throws <ArgumentException>(() => squaremeterperhour.CompareTo(new object()));
        }