//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldStoreTheSerialVersionIdOfAClassTheFirstTimeItsDeserialised() throws java.io.IOException, ClassNotFoundException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldStoreTheSerialVersionIdOfAClassTheFirstTimeItsDeserialised() { // given MemberIsAvailable memberIsAvailable = memberIsAvailable(); Payload payload = PayloadFor(memberIsAvailable); VersionMapper versionMapper = new VersionMapper(); // when (new LenientObjectInputStream(InputStreamFor(payload), versionMapper)).readObject(); // then //JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method: assertTrue(versionMapper.HasMappingFor(memberIsAvailable.GetType().FullName)); //JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method: assertEquals(SerialVersionUIDFor(memberIsAvailable), versionMapper.MappingFor(memberIsAvailable.GetType().FullName)); }
private long SerialVersionUIDFor(MemberIsAvailable memberIsAvailable) { return(ObjectStreamClass.lookup(memberIsAvailable.GetType()).SerialVersionUID); }