public void ParseArgumentsSetsFormatAndDefaultCultureWithInvalidCulture() { FormatCommand cmd = new FormatCommand(); cmd.ArgumentsString = @"""##,#"", ""aa-aa"""; Document doc = new Document(); var slide = new SlideElement(doc); ShapeElementBase element = (ShapeElementBase)(ShapeElementBaseTest.Create()); cmd.TargetElement = element; cmd.ParseArguments(); Assert.AreEqual("##,#", cmd.FormatString); Assert.AreEqual(CultureInfo.CurrentUICulture.Name, cmd.Culture.Name); }
public void ParseArgumentsSetsFormatAndCultureWithCulture() { FormatCommand cmd = new FormatCommand(); cmd.ArgumentsString = @"""##,#"", ""de-DE"""; Document doc = new Document(); var slide = new SlideElement(doc); ShapeElementBase element = (ShapeElementBase)(ShapeElementBaseTest.Create()); cmd.TargetElement = element; cmd.ParseArguments(); Assert.AreEqual("##,#", cmd.FormatString); Assert.AreEqual((new CultureInfo("de-DE")).Name, cmd.Culture.Name); }