Skip to content

Commit

Permalink
Todos meus exercicios para o GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
francardoso93 committed Mar 25, 2021
1 parent cf5b2d8 commit 6faf387
Show file tree
Hide file tree
Showing 1,270 changed files with 24,130 additions and 1 deletion.
Binary file added AmazonTest/AmazonAssessment.zip
Binary file not shown.
29 changes: 29 additions & 0 deletions AmazonTest/exercise1-tests/ResultTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.Collections.Generic;
using Xunit;
using Exercise1;

namespace Exercise1_tests
{
public class ResultTest
{
public static TheoryData<List<int>, List<int>, List<int>, List<int>, int, long> testData
{
get
{
var data = new TheoryData<List<int>, List<int>, List<int>, List<int>, int, long>();
data.Add(new List<int> { 2, 3 }, new List<int> { 4 }, new List<int> { 2 }, new List<int> { 1, 2, 3 }, 10, 3);
data.Add(new List<int> { 4 }, new List<int> { 3, 4, 1 }, new List<int> { 3, 2 }, new List<int> { 4 }, 12, 2);
data.Add(new List<int> { 4 }, new List<int> { 3, 4, 1 }, new List<int> { 3, 2 }, new List<int> { 4 }, 3, 0); // Cannot buy all 4
return data;
}
}


[Theory, MemberData(nameof(testData))]
public void GetNumberOfOptions(List<int> priceOfJeans, List<int> priceOfShoes, List<int> priceOfSkirts, List<int> priceOfTops, int dollars, long expectedResult)
{
long currentResult = Result.GetNumberOfOptions(priceOfJeans, priceOfShoes, priceOfSkirts, priceOfTops, dollars);
Assert.Equal(expectedResult, currentResult);
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 6faf387

Please sign in to comment.