public void MockRocketOrdersHasMoreThanOneOrder()
        {
            /* Arrange */
            IEnumerable <RocketOrder> got;

            /* Act */
            got = MockRockets.GetSimpleOrders();
            //got.See();

            /* Assert */
            Aver.IsNotNull(got);
            Aver.IsTrue(got.Any());
            Aver.IsTrue(got.Count() > 1);
        }
        public void MockHasAnOrder()
        {
            /* Arrange */
            IEnumerable <RocketOrder> got;

            /* Act */
            got = MockRockets.GetSimpleOrders();
            //got.See();

            /* Assert */
            Aver.IsNotNull(got);
            Aver.IsTrue(got.Any());
            var gotObject1 = got.FirstOrDefault(x => x.Customer == MockConstants.TEST_CUSTOMER_8);

            Aver.IsNotNull(gotObject1);
            gotObject1.See();
        }
        public void MockRocketOrdersCreate()
        {
            /* Arrange */
            IEnumerable <RocketOrder> got;

            /* Act */
            got = MockRockets.GetSimpleOrders();
            got.See();

            /* Assert */
            Aver.IsNotNull(got);
            Aver.IsTrue(got.Any());
            var gotObject1 = got.FirstOrDefault(x => x.Customer == MockConstants.TEST_CUSTOMER_1);

            Aver.IsNotNull(gotObject1);
            Aver.IsTrue(gotObject1.Spaceship.Height == 68); // 68 is default height of a space ship
        }
Beispiel #4
0
        public void CreateOneComplexRocket()
        {
            /* Arrange */
            IEnumerable <RocketOrder> got;

            /* Act */
            got = MockRockets.GetComplexOrders();
            //got.See();

            /* Assert */
            Aver.IsNotNull(got);
            Aver.IsTrue(got.Any());

            var gotDescription = RocketBuilder.CreateRocket(got.FirstOrDefault());

            gotDescription.See();

            Aver.IsTrue(!string.IsNullOrWhiteSpace(gotDescription));
        }
Beispiel #5
0
        public async Task BuildComplexRockets()
        {
            /* Arrange */
            IEnumerable <RocketOrder> got;

            /* Act */
            got = MockRockets.GetComplexOrders();
            //got.See();

            /* Assert */
            Aver.IsNotNull(got);
            Aver.IsTrue(got.Any());

            var builtRockets = RocketBuilder.Build(got);

            Aver.IsTrue(await builtRockets.AnyAsync());

            await foreach (var rocket in builtRockets)
            {
                rocket.See();
            }
        }