public void ConvertToJsonCamelCase_InputInValidXml_ReturnsException() { var xmlString = "wrongXML"; TestDelegate code = () => _xmlConverter.ConvertToJsonCamelCase(xmlString); Assert.That(code, Throws.Exception); }
private void ConvertFileSystemXmlFile(ConvertModel convert) { var data = _fileRepository.GetFileData(((FileSystemSourceModel)convert.Source).FullPath); string convertedString = string.Empty; switch (convert.Target.TargetFileType) { case TargetFileType.Json: convertedString = _xmlConverter.ConvertToJson(data); break; case TargetFileType.JsonCamelCase: convertedString = _xmlConverter.ConvertToJsonCamelCase(data); break; } _fileRepository.SaveFile(convertedString, convert.Target.FullPath); }