public void Serialization_ValueTypePhase2() { ValueTypeTestData data = new ValueTypeTestData(4); object copy = SerializationManager.RoundTripSerializationForTesting(data); Assert.IsInstanceOfType(copy, typeof(ValueTypeTestData), "Deserialized result is of wrong type"); Assert.AreEqual <int>(4, ((ValueTypeTestData)copy).GetValue(), "Deserialized result is incorrect"); }
public void Serialization_ValueTypePhase2() { ValueTypeTestData data = new ValueTypeTestData(4); object copy = SerializationManager.RoundTripSerializationForTesting(data); Assert.IsAssignableFrom <ValueTypeTestData>(copy); Assert.Equal <int>(4, ((ValueTypeTestData)copy).GetValue()); }
public void Serialization_ValueTypePhase1() { ValueTypeTestData data = new ValueTypeTestData(4); object obj = SerializationManager.DeepCopy(data); Assert.IsInstanceOfType(obj, typeof(ValueTypeTestData), "Deserialized result is of wrong type"); Assert.AreEqual <int>(4, ((ValueTypeTestData)obj).GetValue(), "Deserialized result is incorrect"); }
public void Serialization_ValueTypePhase2() { ValueTypeTestData data = new ValueTypeTestData(4); object copy = SerializationManager.RoundTripSerializationForTesting(data); Assert.IsAssignableFrom<ValueTypeTestData>(copy); Assert.Equal<int>(4, ((ValueTypeTestData)copy).GetValue()); }
public void Serialization_ValueTypePhase1() { ValueTypeTestData data = new ValueTypeTestData(4); object obj = SerializationManager.DeepCopy(data); Assert.IsAssignableFrom <ValueTypeTestData>(obj); Assert.Equal <int>(4, ((ValueTypeTestData)obj).GetValue()); }
public void Serialization_ValueTypePhase1() { ValueTypeTestData data = new ValueTypeTestData(4); object obj = SerializationManager.DeepCopy(data); Assert.IsAssignableFrom<ValueTypeTestData>(obj); Assert.Equal<int>(4, ((ValueTypeTestData)obj).GetValue()); }
public void Serialization_ValueTypePhase2() { ValueTypeTestData data = new ValueTypeTestData(4); object copy = SerializationManager.RoundTripSerializationForTesting(data); Assert.IsInstanceOfType(copy, typeof(ValueTypeTestData), "Deserialized result is of wrong type"); Assert.AreEqual<int>(4, ((ValueTypeTestData)copy).GetValue(), "Deserialized result is incorrect"); }
public void Serialization_ValueTypePhase1() { ValueTypeTestData data = new ValueTypeTestData(4); object obj = SerializationManager.DeepCopy(data); Assert.IsInstanceOfType(obj, typeof(ValueTypeTestData), "Deserialized result is of wrong type"); Assert.AreEqual<int>(4, ((ValueTypeTestData)obj).GetValue(), "Deserialized result is incorrect"); }
public async Task Generic_GrainWithValueTypeState() { Guid id = Guid.NewGuid(); var grain = this.GrainFactory.GetGrain <IValueTypeTestGrain>(id); var initial = await grain.GetStateData(); Assert.Equal(new ValueTypeTestData(0), initial); var expectedValue = new ValueTypeTestData(42); await grain.SetStateData(expectedValue); Assert.Equal(expectedValue, await grain.GetStateData()); }
public Task SetStateData(ValueTypeTestData d) { State.StateData = d; return(TaskDone.Done); }