Tortuga-TestMonkey icon indicating copy to clipboard operation
Tortuga-TestMonkey copied to clipboard

IBindingList Tests

Open Grauenwolf opened this issue 3 years ago • 0 comments

Old version

    @Tag("IBindingList")
	@TestAttribute
	public void @(Test.ClassName + "_IBindingList_AddNew")()
	{
		IBindingList objectUnderTest = CreateCollection();
		
		var originalCount = objectUnderTest.Count;

		if (objectUnderTest.AllowNew) 
		{
			objectUnderTest.AddNew();
			@Assert.AreEqual("originalCount + 1", "objectUnderTest.Count")
		}
	}		

    @Tag("IBindingList")
	@TestAttribute
	public void @(Test.ClassName + "_IBindingList_RemoveAt")()
	{
		IBindingList objectUnderTest = CreateCollection();

		var originalCount = objectUnderTest.Count;

		if (objectUnderTest.AllowRemove)
		{
			objectUnderTest.RemoveAt(0);
			@Assert.AreEqual("originalCount - 1", "objectUnderTest.Count")
		}
	}

    @Tag("IBindingList")
	@TestAttribute
	public void @(Test.ClassName + "_IBindingList_Remove")()
	{
		IBindingList objectUnderTest = CreateCollection();

		var originalCount = objectUnderTest.Count;

		if (objectUnderTest.AllowRemove)
		{
			objectUnderTest.Remove(objectUnderTest[0]);
			@Assert.AreEqual("originalCount - 1", "objectUnderTest.Count")
		}
	}

Grauenwolf avatar Jun 02 '21 01:06 Grauenwolf