public DeserializeService ( System.Xml.Linq.XElement xml, ResourceType resourceType ) : Service | ||
xml | System.Xml.Linq.XElement | |
resourceType | ResourceType | |
Результат | Service |
public void PluginServicesDeserializeServiceWithValidXmlExpectedReturnsPluginService() { var xml = XmlResource.Fetch("PluginService"); var services = new PluginServicesMock(); var result = services.DeserializeService(xml, "PluginService"); PluginServiceTests.VerifyEmbeddedPluginService(result as PluginService); }
public void PluginServicesDeserializeServiceWithValidJsonExpectedReturnsPluginService() { var xml = XmlResource.Fetch("PluginService"); var service = new PluginService(xml); var services = new PluginServicesMock(); var result = services.DeserializeService(service.ToString()); PluginServiceTests.VerifyEmbeddedPluginService(result as PluginService); }
public void PluginServicesDeserializeServiceWithNullJsonExpectedThrowsArgumentNullException() { var services = new PluginServicesMock(); services.DeserializeService(null); }
public void PluginServicesDeserializeServiceWithNullXmlExpectedReturnsNewPluginService() { var services = new PluginServicesMock(); var result = services.DeserializeService(null, ResourceType.PluginService); Assert.AreEqual(result.ResourceID, Guid.Empty); }
public void PluginServicesDeserializeServiceWithInvalidJsonExpectedReturnsNewPluginService() { var services = new PluginServicesMock(); var result = services.DeserializeService("{'root' : 'hello' }"); Assert.AreEqual(result.ResourceID, Guid.Empty); }
public void PluginServicesDeserializeServiceWithNullJsonExpectedThrowsArgumentNullException() { var services = new PluginServicesMock(); services.DeserializeService(null); }