public void OverwriteCreatedClass() { var sceneSpy = new Scene(); var spyGenerator = new SceneCodeGeneratorSpy(new MockService("", "TestProject"), sceneSpy, "TestScene"); spyGenerator.GenerateSourceCodeClass(); var firstClassString = spyGenerator.CreatedSourceClass; Assert.IsTrue(spyGenerator.CreatedSourceClass); sceneSpy.Add(new Button(new Rectangle())); spyGenerator.GenerateSourceCodeClass(); Assert.AreNotEqual(firstClassString, spyGenerator.CreatedClassString); }
public void CreateClassInProjectFolder() { var sceneSpy = new Scene(); var spyGenerator = new SceneCodeGeneratorSpy(new MockService("", "TestProject"), sceneSpy, "TestScene"); spyGenerator.GenerateSourceCodeClass(); Assert.IsTrue(spyGenerator.CreatedSourceClass); Assert.IsTrue( spyGenerator.csprojString.Contains("<Compile Include=" + '"' + "TestScene" + ".cs" + '"' + " />")); }