Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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
        }
Exemplo n.º 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));
        }
Exemplo n.º 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();
            }
        }