Пример #1
0
        public void GetAllInvoices()
        {
            TestHelper.InitDatabase();
            GetReady();
            var actRes   = controller.Get();
            var response = actRes.ExecuteAsync(CancellationToken.None).Result;

            Assert.IsNotNull(response.Content);
        }
Пример #2
0
        public void ChangeTown()
        {
            TestHelper.InitDatabase();
            GetReady();
            var actRes = controller.Put(4, new AgentModel()
            {
                Id = 4, Name = "Marlon", Towns = new List <AgentTown>()
                {
                    new AgentTown()
                    {
                        Id = 2
                    }
                }
            });
            var response = actRes.ExecuteAsync(CancellationToken.None).Result;

            Assert.IsTrue(response.IsSuccessStatusCode);
        }