public void FromSupplier_ValidInput_ShouldReturnSqlSupplierWithCopiedValues() { var group = new SupplierGroup(101, "Initial supplier group"); var supplier = SupplierTests.CreateSupplier("*****@*****.**", group); var result = SqlSupplier.FromSupplier(supplier); Assert.NotNull(result); Assert.AreEqual(0, result.Id); Assert.AreEqual("John Doe", result.Name); Assert.AreEqual("Vaclavske Namesti 125", result.Address); Assert.AreEqual("*****@*****.**", result.EmailAddress); Assert.AreEqual("723123456", result.PhoneNumber); Assert.AreEqual(101, result.GroupId); }
public void FromSupplier_SupplierNull_ShouldThrow() { Assert.Throws <ArgumentNullException>(() => SqlSupplier.FromSupplier(null), "Supplier can't be null."); }