void CreateClassWithOneEvent()
		{
			// Define imports.
			string code = 
				"from MyNamespace import MyClass";
			
			resolverHelper = new PythonResolverTestsHelper(code);
			myClass = resolverHelper.CreateClass("MyClass");
			myClassEvent = myClass.AddEvent("MyEvent");
			
			AddEventHandlerClass();
			
			resolverHelper.ProjectContent.SetClassToReturnFromGetClass("MyNamespace.MyClass", myClass);
		}
示例#2
0
		public void AddEvent_PassedEventName_ReturnsEventWithExpectedName()
		{
			MockClass c = new MockClass();
			IEvent myEvent = c.AddEvent("MyEvent");			
			string name = myEvent.Name;
			
			Assert.AreEqual("MyEvent", name);
		}
示例#3
0
		public void AddEvent_PassedEventName_AddsEventToClass()
		{
			MockClass c = new MockClass();
			c.AddEvent("MyEvent");
			
			IEvent myEvent = c.Events[0];
			string name = myEvent.Name;
			
			Assert.AreEqual("MyEvent", name);
		}