Beispiel #1
0
        public void GetRectanglesAmountFromCollection_ShouldReturnAmountOfRectangles_WhenParameterIsValid(IEnumerable enumerableCollection, int expectedResult)
        {
            // Act
            var result = PermutationGenerator.GetRectanglesAmountFromCollection(enumerableCollection);

            // Assert
            Assert.AreEqual(expectedResult, result, Delta);
        }
Beispiel #2
0
 public void GetRectanglesAmountFromCollection_ShouldThrownArgumentException_WhenCollectionCountIsLessThanTwo(IEnumerable enumerableCollection)
 {
     Assert.ThrowsException <ArgumentException>(
         () => PermutationGenerator.GetRectanglesAmountFromCollection(enumerableCollection),
         "Collection has to have at least two elements");
 }
Beispiel #3
0
 public void GetRectanglesAmountFromCollection_ShouldThrownArgumentNullException_WhenParameterIsNull(IEnumerable enumerableCollection)
 {
     Assert.ThrowsException <ArgumentNullException>(
         () => PermutationGenerator.GetRectanglesAmountFromCollection(enumerableCollection),
         "Argument can not be null");
 }