Example #1
0
        public void PostAgentGood()
        {
            GetReady();
            var actRes = controller.Post(new AgentModel()
            {
                Name = "Amer", Towns = new List <AgentTown>()
                {
                    new AgentTown()
                    {
                        Id = 1
                    }
                }
            });
            var response = actRes.ExecuteAsync(CancellationToken.None).Result;

            Assert.IsTrue(response.IsSuccessStatusCode);
        }
Example #2
0
        public void PostAgentGood()
        {
            GetReady();
            var actRes = controller.Post(new AgentModel()
            {
                Name = "Iglesias"
            });
            var response = actRes.ExecuteAsync(CancellationToken.None).Result;

            Assert.IsTrue(response.IsSuccessStatusCode);
        }