本文整理汇总了C#中IObjectFactory.GetXmlSerializer方法的典型用法代码示例。如果您正苦于以下问题:C# IObjectFactory.GetXmlSerializer方法的具体用法?C# IObjectFactory.GetXmlSerializer怎么用?C# IObjectFactory.GetXmlSerializer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IObjectFactory
的用法示例。
在下文中一共展示了IObjectFactory.GetXmlSerializer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Vat7SaveServiceTest
public Vat7SaveServiceTest()
{
_budgetParams = new BudzetParametersCollection { NazwaUrzedu = "Test123", Regon = "1231341", Nip = "5353123" };
_vatParams = new Vat7PrintParams {Year = 2016, Month = 3, CelZlozenia = "2", KodUrzedu = "ee"};
_xml = XDocument.Parse("<vat7><rok>2099</rok></vat7>");
_vat7Data = new Vat7Data {P01 = 100.00, P02 = 200.00};
_versions = new List<Vat7Dao> {new Vat7Dao {Version = 1}, new Vat7Dao { Version = 3 } };
_session = new Session();
_objectFactory = Substitute.For<IObjectFactory>();
_vatObjectFactory = Substitute.For<IVatObjectFactory>();
_vatObjectFactory.ObjectFactory.Returns(_objectFactory);
_service = new Vat7SaveService(_vatObjectFactory);
_vatObjectFactory.GetVat7DictionaryProvider().GetVersions(_session, _vatParams.Year, _vatParams.Month).Returns(_versions);
_vatObjectFactory.GetVat7DataService().Get(_session, _vatParams.Year, _vatParams.Month).Returns(_vat7Data);
_objectFactory.GetXmlSerializer<Vat7Data>().Serialize(_vat7Data).Returns(_xml);
_objectFactory.GetBudzetParametersCollectionGetter().GetParameters(_session).Returns(_budgetParams);
}