public void ArgumentNotNullObjectWithDefaultTest() { PersonProper nullPerson = null; var defaultPerson = RandomData.GenerateRefPerson <PersonProper>(); try { var result = nullPerson.ArgumentNotNull(defaultPerson); Assert.AreEqual(result, defaultPerson); } catch { Assert.Fail(); } }
public void ArgumentNotNullObjectTest() { var testPerson = RandomData.GenerateRefPerson <PersonProper>(); try { testPerson.ArgumentNotNull(); } catch { Assert.Fail(); } PersonProper nullPerson = null; _ = Assert.ThrowsException <ArgumentNullException>(() => nullPerson.ArgumentNotNull()); }