Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using CarrinhoDeCompras.Domain.Entidades;
- using CarrinhoDeCompras.Domain.Interfaces.Repositorios;
- using CarrinhoDeCompras.Infra.Data.EF.Repositorios;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- namespace CarrinhoDeCompras.Application.Test
- {
- [TestClass]
- public class OrdersTest
- {
- private IRepositorioOrders _repositorio;
- [TestMethod]
- public void InclirPedidos()
- {
- var order = new Orders()
- {
- CustomerID = 85,
- Customer = "VINET",
- EmployeeID = 5,
- OrderDate = DateTime.Now,
- RequiredDate = DateTime.Now,
- ShippedDate = DateTime.Now,
- ShipVia = 3,
- Freight = 13,
- ShipName = "Vins et alcools Chevalier",
- ShipAddress = "59 rue de l'Abbaye",
- ShipCity = "Reims",
- ShipPostalCode = "51100",
- ShipCountry = "France",
- };
- try
- {
- _repositorio = new RepositorioOrders();
- _repositorio.Add(order);
- }
- catch (Exception ex)
- {
- throw;
- }
- }
- }
- }
- public partial class Orders
- {
- public Orders()
- {
- this.OrderDetails = new HashSet<OrderDetails>();
- this.Employees = new Employees();
- this.Customers = new Customers();
- this.Shippers = new Shippers();
- }
- public int OrderID { get; set; }
- public int? CustomerID { get; set; }
- public string Customer { get; set; }
- public int? EmployeeID { get; set; }
- public DateTime? OrderDate { get; set; }
- public DateTime? RequiredDate { get; set; }
- public DateTime? ShippedDate { get; set; }
- public int ShipVia { get; set; }
- public decimal? Freight { get; set; }
- public string ShipName { get; set; }
- public string ShipAddress { get; set; }
- public string ShipCity { get; set; }
- public string ShipRegion { get; set; }
- public string ShipPostalCode { get; set; }
- public string ShipCountry { get; set; }
- public virtual Customers Customers { get; set; }
- public virtual Employees Employees { get; set; }
- public virtual ICollection<OrderDetails> OrderDetails { get; set; }
- public virtual Shippers Shippers { get; set; }
- }
Add Comment
Please, Sign In to add comment