public void SetStructObjectWithValidTypesDoesNotThrowException() { MyStructType sample = new MyStructType { Color = "test", X = 3, Hidden = true, Angle = 3.14f }; Assert.DoesNotThrow(() => instance.SetValuesFrom(sample)); Assert.DoesNotThrow(output.Write); }
public void SendStructAndReceiveClassSample() { MyStructType obj = new MyStructType { Color = "test", X = 3, Hidden = true }; SendAndTakeObjectSample(obj); Sample sample = samples.Single(); MyClassType received = sample.Data.GetSampleAs <MyClassType>(); Assert.AreEqual("test", received.Color); Assert.AreEqual(3, received.X); Assert.AreEqual(true, received.Hidden); }