public void Test() { _original = (SampleDomainEvent) new SampleDomainEvent(1223, Guid.NewGuid()).CloneWithSaga(Guid.NewGuid()); var ser = new WireJsonSerializer(); var bytes = ser.ToBinary(_original); _restored = (SampleDomainEvent)ser.FromBinary(bytes, typeof(SampleDomainEvent)); }
public void Test() { _original = (SampleDomainEvent) new SampleDomainEvent(1223, Guid.NewGuid().ToString()).CloneForProcess(Guid.NewGuid().ToString()); var ser = new DomainSerializer(); var bytes = ser.ToBinary(_original); _restored = (SampleDomainEvent)ser.FromBinary(bytes, typeof(SampleDomainEvent)); //processId_should_be_equal() Assert.Equal(_original.ProcessId, _restored.ProcessId); //CreatedTime_should_be_equal() Assert.Equal(_original.CreatedTime, _restored.CreatedTime); //SourceId_should_be_equal() Assert.Equal(_original.SourceId, _restored.SourceId); //Parameter_should_be_equal() Assert.Equal(_original.Parameter, _restored.Parameter); }
protected void When(SampleDomainEvent domainEvent) { throw new System.NotImplementedException(); }