public void ItemIdCollectionSetRange() { tlog.Debug(tag, $"ItemIdCollectionSetRange START"); using (ItemIdCollection itemIdCollection = new ItemIdCollection(5)) { uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); try { testingTarget.SetRange(1, itemIdCollection); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception: Failed!"); } testingTarget.Dispose(); } tlog.Debug(tag, $"ItemIdCollectionSetRange END (OK)"); }
public void ItemIdCollectionReverseWithParameters() { tlog.Debug(tag, $"ItemIdCollectionReverseWithParameters START"); uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); testingTarget.Capacity = 5; try { testingTarget.Reverse(1, 2); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception: Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionReverseWithParameters END (OK)"); }
public void ItemIdCollectionCopyToWithCountLessThan0() { tlog.Debug(tag, $"ItemIdCollectionCopyToWithCountLessThan0 START"); uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); try { uint[] array = new uint[4]; testingTarget.CopyTo(0, array, 0, -1); } catch (ArgumentOutOfRangeException e) { tlog.Debug(tag, e.Message.ToString()); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionCopyToWithCountLessThan0 END (OK)"); Assert.Pass("Caught ArgumentOutOfRangeException : Passed!"); } }
public void ItemIdCollectionGetRange() { tlog.Debug(tag, $"ItemIdCollectionGetRange START"); using (ItemIdCollection itemIdCollection = new ItemIdCollection(5)) { var testingTarget = new ItemIdCollection(); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); testingTarget.AddRange(itemIdCollection); try { var result = testingTarget.GetRange(0, 0); Assert.IsInstanceOf <ItemIdCollection>(result, "Should be an Instance of ItemIdCollection!"); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception: Failed!"); } testingTarget.Dispose(); } tlog.Debug(tag, $"ItemIdCollectionGetRange END (OK)"); }
public void ItemIdCollectionCapacitySetValueLessThanSize() { tlog.Debug(tag, $"ItemIdCollectionCapacitySetValueLessThanSize START"); uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); tlog.Debug(tag, "Count : " + testingTarget.Count); tlog.Debug(tag, "Capacity : " + testingTarget.Capacity.ToString()); try { testingTarget.Capacity = 3; } catch (ArgumentOutOfRangeException e) { tlog.Debug(tag, e.Message.ToString()); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionCapacitySetValueLessThanSize END (OK)"); Assert.Pass("Caught ArgumentOutOfRangeException : Passed!"); } }
public void ItemIdCollectionConstructorWithCapacity() { tlog.Debug(tag, $"ItemIdCollectionConstructorWithCapacity START"); var testingTarget = new ItemIdCollection(5); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionConstructorWithCapacity END (OK)"); }
public void ItemIdCollectionConstructor() { tlog.Debug(tag, $"ItemIdCollectionConstructor START"); uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); Assert.IsFalse(testingTarget.IsFixedSize); Assert.IsFalse(testingTarget.IsReadOnly); Assert.IsFalse(testingTarget.IsSynchronized); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionConstructor END (OK)"); }
public void ItemIdCollectionRemove() { tlog.Debug(tag, $"ItemIdCollectionRemove START"); uint[] itemId = new uint[] { 1, 2, 3, 4, 3 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); testingTarget.Capacity = 5; Assert.AreEqual(true, testingTarget.Remove(3), "Should be equal!"); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionRemove END (OK)"); }
public void ItemIdCollectionContains() { tlog.Debug(tag, $"ItemIdCollectionContains START"); uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); testingTarget.Capacity = 5; Assert.IsTrue(testingTarget.Contains(2)); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionContains END (OK)"); }
public void ItemIdCollectionThis() { tlog.Debug(tag, $"ItemIdCollectionThis START"); uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); tlog.Debug(tag, testingTarget[1].ToString()); testingTarget[2] = 5; tlog.Debug(tag, testingTarget[2].ToString()); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionThis END (OK)"); }
public void ItemIdCollectionConstructorWithItemIdCollection() { tlog.Debug(tag, $"ItemIdCollectionConstructorWithItemIdCollection START"); uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var itemIdCollection = new ItemIdCollection(c); Assert.IsNotNull(itemIdCollection, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(itemIdCollection, "Should be an Instance of ItemIdCollection!"); var testingTarget = new ItemIdCollection(itemIdCollection); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); itemIdCollection.Dispose(); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionConstructorWithItemIdCollection END (OK)"); }
public void ItemIdCollectionCopyToWithNullArray() { tlog.Debug(tag, $"ItemIdCollectionCopyToWithNullArray START"); uint[] itemId = new uint[] { 1, 2, 3, 4 }; global::System.Collections.ICollection c = itemId; var testingTarget = new ItemIdCollection(c); Assert.IsNotNull(testingTarget, "Should be not null!"); Assert.IsInstanceOf <ItemIdCollection>(testingTarget, "Should be an Instance of ItemIdCollection!"); try { testingTarget.CopyTo(null); } catch (ArgumentNullException e) { tlog.Debug(tag, e.Message.ToString()); testingTarget.Dispose(); tlog.Debug(tag, $"ItemIdCollectionCopyToWithNullArray END (OK)"); Assert.Fail("Caught ArgumentNullException : Failed!"); } }