public void OrderByNumberThrowInvalidOperationExceptionWhenOrderNumberPatternIsIncorrect()
        {
            //Arrange

            string orderNumber = "222"; //THIS IS AN INVALID ORDER NUMBER

            //Act
            var spec = OrdersSpecifications.OrdersByNumber(orderNumber);
        }
Esempio n. 2
0
        public void OrderByNumberThrowInvalidOperationExceptionWhenOrderNumberPatternIsIncorrect()
        {
            //Arrange

            string orderNumber = "222"; //THIS IS AN INVALID ORDER NUMBER

            //Act
            Exception ex = Assert.Throws <InvalidOperationException>(() => OrdersSpecifications.OrdersByNumber(orderNumber));

            Assert.IsType(typeof(InvalidOperationException), ex);
        }
Esempio n. 3
0
        public void OrderByNumberReturnDirectSpecificationWhenPatternIsOk()
        {
            //Arrange

            string orderNumber = "2011/12-1212"; //THIS IS AN INVALID ORDER NUMBER

            //Act
            var spec = OrdersSpecifications.OrdersByNumber(orderNumber);

            //Assert
            Assert.IsType <DirectSpecification <Order> >(spec);
        }
        public void OrderByNumberReturnDirectSpecificationWhenPatternIsOk()
        {
            //Arrange

            var orderNumber = "2011/12-1212"; //THIS IS AN INVALID ORDER NUMBER

            //Act
            var spec = OrdersSpecifications.OrdersByNumber(orderNumber);

            //Assert
            Assert.IsInstanceOfType(spec, typeof(DirectSpecification <Order>));
        }