Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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" + '"' +
                                                   " />"));
        }
Ejemplo n.º 3
0
		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);
		}
Ejemplo n.º 4
0
		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" + '"' +
					" />"));
		}