public void Text_Set_Get() { var sign = new SerializableSign(); sign.Text = "test"; Assert.Equal("test", sign.Text); }
public void Y_Set_Get() { var sign = new SerializableSign(); sign.Y = 100; Assert.Equal(100, sign.Y); }
public void X_Set_Get() { var sign = new SerializableSign(); sign.X = 256; Assert.Equal(256, sign.X); }
public void Index_Set_Get() { var sign = new SerializableSign(); sign.Index = 5; Assert.Equal(5, sign.Index); }
public void Read() { var length = SerializableSign.Read(_bytes, out var sign); Assert.Equal(_bytes.Length, length); Assert.Equal(5, sign.Index); Assert.Equal(256, sign.X); Assert.Equal(100, sign.Y); Assert.Equal("test", sign.Text); var bytes2 = new byte[1000]; var length2 = sign.Write(bytes2); Assert.Equal(length, length2); Assert.Equal(_bytes, bytes2[..length2]);
public void Name_SetNullValue_ThrowsArgumentNullException() { var sign = new SerializableSign(); Assert.Throws <ArgumentNullException>(() => sign.Text = null !); }
public void Name_GetNullValue() { var sign = new SerializableSign(); Assert.Equal(string.Empty, sign.Text); }