public void GivenFilenameWhenWriteFileThenFileExists()
        {
            var serializer = new VersionInfoSerializer();

            serializer.Serialize(SerializationVersionEnum.V1, _tempPath);

            Assert.That(File.Exists(Path.Combine(_tempPath, DatacardConstants.VersionFile)), Is.True);
        }
        public void SerializeCreatesDestinationPath()
        {
            var serializer = new VersionInfoSerializer();

            serializer.Serialize(SerializationVersionEnum.V1, _tempPath);

            Assert.IsTrue(Directory.Exists(_tempPath));
        }
        public void GivenFilenameWhenSerializeDeserializeThenFileContainsCorrectVersionInfo()
        {
            var serializationVersion = SerializationVersionEnum.V1;
            var expectedVersion      = typeof(Plugin).Assembly.GetName().Version;

            var serializer = new VersionInfoSerializer();

            serializer.Serialize(serializationVersion, _tempPath);
            var result = serializer.Deserialize(_tempPath);

            Assert.That(result.PluginVersion, Is.EqualTo(expectedVersion));
            Assert.That(result.SerializationVersion, Is.EqualTo(serializationVersion));
        }