public void TestClone2() { var template = new AnalyserTemplate { AnalyserPluginId = new AnalyserPluginId("nöknöökawdawd"), }; var actualTemplate = template.Clone(); actualTemplate.Should().NotBeNull(); actualTemplate.Should().NotBeSameAs(template); actualTemplate.AnalyserPluginId.Should().Be(template.AnalyserPluginId); }
public void TestClone1() { var analysisConfiguration = new Mock <ILogAnalyserConfiguration>(); analysisConfiguration.Setup(x => x.Clone()).Returns(new Mock <ILogAnalyserConfiguration>().Object); var template = new AnalyserTemplate { Configuration = analysisConfiguration.Object }; analysisConfiguration.Verify(x => x.Clone(), Times.Never); var clone = template.Clone(); clone.Should().NotBeNull(); clone.Should().NotBeSameAs(template); clone.Configuration.Should().NotBeNull(); clone.Configuration.Should().NotBeSameAs(analysisConfiguration.Object); analysisConfiguration.Verify(x => x.Clone(), Times.Once); }