-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d567e5
commit 6659036
Showing
3 changed files
with
88 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using AvansDevOps.Domain; | ||
using AvansDevOps.Domain.People; | ||
using FluentAssertions; | ||
|
||
namespace AvansDevOps.Tests.ProjectTests | ||
{ | ||
public class CreatesSprint | ||
{ | ||
// mocks staan hier | ||
public CreatesSprint() | ||
{ | ||
// mocks initialiseren | ||
} | ||
|
||
[Theory] | ||
[InlineData(TypeOfSprints.PARTIALPRODUCTSPRINT)] | ||
[InlineData(TypeOfSprints.RELEASESPRINT)] | ||
internal void CreatesSprint_AddsASprintOfTheCorrectConcreteTypeToTheSpintsListInTheProject(TypeOfSprints typeOfSprint) | ||
{ | ||
// Dirty code but can not be fixed :( | ||
Type concreteTypeOfSprint = null; | ||
if (typeOfSprint == TypeOfSprints.PARTIALPRODUCTSPRINT) | ||
{ | ||
concreteTypeOfSprint = typeof(PartialProductSprint); | ||
} | ||
else if (typeOfSprint == TypeOfSprints.RELEASESPRINT) | ||
{ | ||
concreteTypeOfSprint = typeof(ReleaseSprint); | ||
} | ||
|
||
// Arrange | ||
ProductOwner productOwner = new ProductOwner("Jan", "Jansen", "[email protected]", new List<NotificationPlatformPreferences> { NotificationPlatformPreferences.EMAIL }); | ||
Project project = new Project(productOwner, new LinkedList<BacklogItem>()); | ||
|
||
|
||
String name = "Sprint 1"; | ||
DateTime startDate = DateTime.Now; | ||
DateTime endDate = DateTime.Now.AddDays(14); | ||
ScrumMaster scrumMaster = new ScrumMaster("Piet", "Pietersen", "[email protected]", new List<NotificationPlatformPreferences> { NotificationPlatformPreferences.EMAIL }); | ||
LinkedList<Developer> developers = new LinkedList<Developer>(); | ||
LinkedList<Tester> testers = new LinkedList<Tester>(); | ||
LinkedList<BacklogItem> backlogitems = new LinkedList<BacklogItem>(); | ||
|
||
// Act | ||
project.CreateSprint(typeOfSprint, name, startDate, endDate, scrumMaster, developers, testers, backlogitems); | ||
|
||
// Assert | ||
project.GetMostRecentSprint().Should().BeOfType(concreteTypeOfSprint); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters