public void ConstructorSetsCorrectEfenkaContext() //done by checking if getbyid works { EfenkaContextTestFactory.Create(); _sut = new DoorTypeRepository(EfenkaContextTestFactory.EfenkaContext); var doorType = new DoorType(); _sut.Add(doorType); var doorTypeFromDatabase = _sut.GetById(doorType.Id); Assert.That(doorTypeFromDatabase, Is.EqualTo(doorType)); }
public void ConstructorSetsCorrectEfenkaContext() //done by checking if getbyid works { EfenkaContextTestFactory.Create(); _sut = new CompanyRepository(EfenkaContextTestFactory.EfenkaContext); var company = new Company(); _sut.Add(company); var companyFromDatabase = _sut.GetById(company.Id); Assert.That(companyFromDatabase, Is.EqualTo(company)); }
public void ConstructorSetsCorrectEfenkaContext() //done by checking if getbyid works { EfenkaContextTestFactory.Create(); _sut = new SupplierRepository(EfenkaContextTestFactory.EfenkaContext); var supplier = new Supplier(); _sut.Add(supplier); var supplierFromDatabase = _sut.GetById(supplier.Id); Assert.That(supplierFromDatabase, Is.EqualTo(supplier)); }
public void ConstructorSetsCorrectEfenkaContext() //done by checking if getbyid works { EfenkaContextTestFactory.Create(); _sut = new PersonRepository(EfenkaContextTestFactory.EfenkaContext); var person = new Person(); _sut.Add(person); var personFromDatabase = _sut.GetById(person.Id); Assert.That(personFromDatabase, Is.EqualTo(person)); }
public void ConstructorSetsCorrectEfenkaContext() //done by checking if getbyid works { EfenkaContextTestFactory.Create(); _sut = new ExteriorColorRepository(EfenkaContextTestFactory.EfenkaContext); var exteriorColor = new ExteriorColor { BrandId = 1 }; _sut.Add(exteriorColor); var exteriorColorFromDatabase = _sut.GetById(exteriorColor.Id); Assert.That(exteriorColorFromDatabase, Is.EqualTo(exteriorColor)); }
public void Init() { EfenkaContextTestFactory.Create(); _sut = new RecordRepository(EfenkaContextTestFactory.EfenkaContext); }
public void Init() { EfenkaContextTestFactory.Create(); _sut = new EngineTypeRepository(EfenkaContextTestFactory.EfenkaContext); }
public void Init() { EfenkaContextTestFactory.Create(); _sut = new CorporationRepository(EfenkaContextTestFactory.EfenkaContext); }