public LocationTest() { address = new Address("1123 Fletcher St", "Tampa", "Florida"); sut = new lo.Location(address); userAddress = new Address("51 Viking Oak", "Tampa", "Florida"); user = new us.User("admin", "password", userAddress); }
public static bool SetLocation(lo.Location location, pdm.Address address) { var dataAddress = new Address() { Street = address.Street, City = address.City, State = address.State }; _db.Address.Add(dataAddress); var dataLocation = new Location() { AddressId = dataAddress.AddressId, OrderNumber = location.OrderNumber }; _db.Location.Add(dataLocation); var newLocation = _db.Location.Where(a => a.AddressId == dataLocation.AddressId).FirstOrDefault(); InitLocationInventory(newLocation.LocationId); return(_db.SaveChanges() == 3); }
public UserTest() { address = new Address("1123 Fletcher St", "Tampa", "Florida"); userAddress = new Address("51 Viking Oak", "Tampa", "Florida"); sut = new us.User("admin", "password", userAddress); location = new lo.Location(address); sut.CreateOrder(location.OrderNumber, location.Address); }
public static List <pi.Pizza> GetPizzaByLocation(lo.Location location) { var dataLocation = _db.Location.Where(l => l.LocationId == location.LocationId).FirstOrDefault(); if (dataLocation == null) { return(null); } return(GetPizzas(dataLocation.Order)); }
public OrderTest() { address = new Address("1123 Fletcher St", "Tampa", "Florida"); userAddress = new Address("51 Viking Oak", "Tampa", "Florida"); location = new lo.Location(address); user = new us.User("admin", "password", userAddress); sut = new ord.Order(user.Username, location.OrderNumber, location.Address); crust = new pi.Crust(); size = new pi.Size(); topping = new pi.Toppings(); }
public static bool SetLocation(lo.Location location, pdm.Address address) { return(LocationHelper.SetLocation(location, address)); }