public void DistribuitedException_SerializeInfo() { var sut = new DistribuitedException(); var doc = new SerializationInfo(typeof(DistribuitedException), new FormatterConverter()); sut.GetObjectData(doc, new StreamingContext()); doc.GetValue("machineName", typeof(string)).Should().Be(Environment.MachineName); doc.GetValue("appDomainName", typeof(string)).Should().Be(AppDomain.CurrentDomain.FriendlyName); doc.GetValue("threadIdentity", typeof(string)).Should().Be(Thread.CurrentPrincipal.Identity.Name); doc.GetValue("windowsIdentity", typeof(string)).Should().Be(WindowsIdentity.GetCurrent().Name); }