public void SetBad() { var i1 = new Integer32(10); var i2 = new UInteger32(20); Assert.Throws <ArgumentException>(() => { i1.Set(i2); }); }
public void SetStringGood() { var i1 = new Integer32(10); i1.Set("20"); Assert.Equal(20, i1.Value); }
public void SetGood() { var i1 = new Integer32(10); var i2 = new Integer32(20); Assert.Equal(10, i1); i1.Set(i2); i2.Value = 30; Assert.Equal(20, i1.Value); Assert.Equal(30, i2.Value); }
public void SetStringBad() { var i1 = new Integer32(10); Assert.Throws <ArgumentException>(() => { i1.Set("Bad"); }); }
public void SetStringEmpty() { var i1 = new Integer32(10); Assert.Throws <ArgumentOutOfRangeException>(() => { i1.Set(string.Empty); }); }