public void ToWorkClassCopyToMethodThrowsArgumentNullExceptionIfParameterIsNull() { ToWork testObject = new ToWork { AtTime = _rnd.NextTimeOfDay() }; testObject.CopyTo(null); Assert.Fail(); }
public void ToWorkClassCopyToMethodSetsTextPropertyOfParameter() { ToWork testObject = new ToWork { AtTime = _rnd.NextTimeOfDay(), Text = _rnd.NextString(_rnd.Next(64)) }; ToWork testTarget = new ToWork { AtTime = _rnd.NextTimeOfDay(), Text = _rnd.NextString(_rnd.Next(64)) }; testObject.CopyTo(testTarget); Assert.AreEqual(testObject.Text, testTarget.Text); }