public void Constructor_CarIsNull_ThrowException() { ICarDataService carDataService = new DesignCarDataService(); //Parent entities Car car = null; var viewModelEdit = new CarEditViewModel(car, carDataService); }
public void Car_New_CanSaveCarIsTrue() { ICarDataService carDataService = new DesignCarDataService(); //Parent entities var viewModelEdit = new CarEditViewModel(carDataService); Assert.IsTrue(viewModelEdit.CanSaveCar); }
public void Constructor_CarDataServiceIsNull_ThrowException() { int id = 1; ICarDataService carDataService = null; //Parent entities var viewModelEdit = new CarEditViewModel(carDataService); }
public CarEditView(int id) : this() { var carDataService = ServiceProvider.Instance.CarDataService; //TO DO: Consider parent relations source (ex. are parent relations load manualy or from cached source for entire application). IEnumerable<UserProfile> userProfiles = new List<UserProfile>(); CarEditViewModel carEditViewModel = new CarEditViewModel(id, carDataService, userProfiles); this.DataContext = carEditViewModel; }