public void Create_ValidSupplier_ShouldStoreSupplierViaContext() { supplierDal.Create(new Supplier(43, "some name", "address", "*****@*****.**", "123123123", new SupplierGroup(102, "name"))); suppliers.Verify(s => s.Add(It.IsAny <SqlSupplier>()), Times.Once); context.Verify(c => c.SaveChanges(), Times.Once); }
public void CreateSupplier(int id, string name, string address, string emailAddress, string phoneNumber, SupplierGroup group) { var supplier = new Supplier(id, name, address, emailAddress, phoneNumber, group); supplierDal.Create(supplier); }