Exemplo n.º 1
0
        public void Create_envelope_Negative(float width, float height)
        {
            //arrange

            //act
            CommonEnvelope envelope;

            //assert
            Assert.Throws <ArgumentException>(() => envelope = new Implementation.Rectangular(width, height));
        }
Exemplo n.º 2
0
        public void MaxSide_right_Positive(float width, float height)
        {
            //arrange

            //act
            CommonEnvelope envelope1 = new Implementation.Rectangular(width, height);
            var            maxSide   = envelope1.MaxSide();

            //assert
            Assert.Equal(height, maxSide);
        }
Exemplo n.º 3
0
        public void Square_Negative()
        {
            //arrange

            //act
            CommonEnvelope envelope1 = new Implementation.Rectangular(2f, 3f);
            var            square    = envelope1.Square();

            //assert
            Assert.NotEqual(8f, square);
        }
Exemplo n.º 4
0
        public void IsEnoughSpaceFor_Negative(float width1, float height1, float width2, float height2)
        {
            //arrange

            //act
            CommonEnvelope envelope1 = new Implementation.Rectangular(width1, height1);
            CommonEnvelope envelope2 = new Implementation.Rectangular(width2, height2);

            var actualSpaceCheck = envelope2.IsEnoughSpaceFor(envelope1);

            //assert
            Assert.False(actualSpaceCheck);
        }
Exemplo n.º 5
0
        public void IsEnoughSpaceFor_Positive(float width1, float height1, float width2, float height2)
        {
            //arrange

            //act
            CommonEnvelope envelope1 = new Implementation.Rectangular(width1, height1);
            CommonEnvelope envelope2 = new Implementation.Rectangular(width2, height2);

            var actual_space_check = envelope1.IsEnoughSpaceFor(envelope2);

            //assert
            Assert.True(actual_space_check);
        }