public void FromSupplierGroup_ValidInput_ShouldReturnSqlSupplierGroupWithCopiedValues() { var group = new SupplierGroup(supplierGroupId, supplierGroupName); var result = SqlSupplierGroup.FromSupplierGroup(group); Assert.NotNull(result); Assert.AreEqual(supplierGroupId, result.Id); Assert.AreEqual(supplierGroupName, result.Name); }
public static SqlSupplierGroup CreateSqlSupplierGroup() { var sqlSupplierGroup = new SqlSupplierGroup { Id = supplierGroupId, Name = supplierGroupName, Suppliers = new List <SqlSupplier>() }; sqlSupplierGroup.Suppliers.Add(SqlSupplierTests.CreateSqlSupplier()); return(sqlSupplierGroup); }
public void FromSupplierGroup_SupplierNull_ShouldThrow() { Assert.Throws <ArgumentNullException>(() => SqlSupplierGroup.FromSupplierGroup(null), "Supplier group can't be null."); }