コード例 #1
0
        public void CreateOrderTest()
        {
            var bhv = Init();
            var id  = bhv.CreateOrder("test", "test", 200);

            var  order = api.FindOrderById(id);
            bool b     = order.Title == "test" && order.Description == "test" &&
                         order.Price == 200 && order.CreatorId == bhv.GetWorkerInfo().Id;

            Assert.True(b);
        }
コード例 #2
0
        private (Models.Order, Models.Order) CreateAndGetOrder()
        {
            Init();

            var order = new Models.Order
            {
                Title       = "test",
                Description = "test",
                Price       = 100500,
                CreatorId   = api.GetAllWorkers().First().Id,
                Status      = Models.Enums.Status.Created
            };

            var id      = api.AddNewOrder(order);
            var order_2 = api.FindOrderById(id);

            return(order, order_2);
        }