예제 #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));
        }
예제 #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);
        }
예제 #3
0
        public void Square_Negative()
        {
            //arrange

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

            //assert
            Assert.NotEqual(8f, square);
        }
예제 #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);
        }
예제 #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);
        }