public void StatboardShouldSerializeProperly() { StatboardDefinition chartDefinition = new StatboardDefinition { Name = "Statboard" }; Statboard chart = new Statboard(chartDefinition); IChartSerializer serializer = Mock.Create <IChartSerializer>(Behavior.Strict); serializer.Arrange(x => x.Serialize(Arg.IsAny <StatboardDefinition>())).Returns("").OccursOnce(); chart.Serialize(serializer); serializer.AssertAll(); }
public void MultiChartShouldSerializeProperly() { MultiChartDefinition chartDefinition = new MultiChartDefinition { Name = "MultiChart" }; MultiChart chart = new MultiChart(chartDefinition); IChartSerializer serializer = Mock.Create <IChartSerializer>(Behavior.Strict); serializer.Arrange(x => x.Serialize(Arg.IsAny <MultiChartDefinition>())).Returns("").OccursOnce(); chart.Serialize(serializer); serializer.AssertAll(); }