public void WhenYoussefOpensTheSprintListingPageForClosedSprints() { var youssef = cast.Get <Youssef>(); stage.ShineTheSpotlightOn(youssef); When(youssef).AttemptsTo(OpenTheirBrowserOn.ThePage(SprintList.ForClosedSprints())); }
public IActionResult PostCode([FromBody] SprintList sprintList, int code) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (code.Equals(0)) { Console.WriteLine(sprintList.numberOfSprints); if (iDatabaseServer.setSprintNumber(sprintList)) { sprintList.validated = true; } return(CreatedAtAction("PostCode", sprintList)); } if (code.Equals(1)) { Console.WriteLine(sprintList.duration); if (iDatabaseServer.setSprintDuration(sprintList)) { sprintList.validated = true; } return(CreatedAtAction("PostCode", sprintList)); } return(CreatedAtAction("PostCode", sprintList)); }
public void GivenYoussefHasOpenedTheSprintListingPage() { var youssef = cast.Get <Youssef>(); stage.ShineTheSpotlightOn(youssef); Given(youssef).WasAbleTo(OpenTheirBrowserOn.ThePage(SprintList.ForOpenSprints())); }
public void SetActiveSprint() { // In-memory database only exists while the connection is open var connection = new SqliteConnection("DataSource=:memory:"); connection.Open(); try { var options = new DbContextOptionsBuilder <ScrumContext>() .UseSqlite(connection) .Options; // Create the schema in the database using (var context = new ScrumContext(options)) { context.Database.EnsureCreated(); } // Run the test against one instance of the context using (var context = new ScrumContext(options)) { var service = new GroupRepository(context); SprintList sprintList = new SprintList(); sprintList.groupID = -1; sprintList.currentlyActiveSprint = 1; var set = service.SetActiveSprint(sprintList); Assert.AreEqual(true, set); Assert.AreEqual(1, context.SprintLists.Find(-1).CurrentlyActiveSprint); } } finally { connection.Close(); } }
protected override void PerformAs(IPerformer actor) { actor.Perform(OpenTheirBrowserOn.ThePage(SprintList.ForOpenSprints())); actor.Perform(Wait.Until(SprintList.SprintListTable).IsVisible()); actor.Perform(Navigate.ToAnotherPageByClicking(SprintList.TheSprintNamed(sprintTitle))); actor.Perform(Wait.Until(SprintDetail.SprintName).IsVisible()); }
public void WhenTheyOpenTheSprintListingPage() { var theActor = stage.GetTheActorInTheSpotlight(); When(theActor).AttemptsTo(OpenTheirBrowserOn.ThePage(SprintList.ForOpenSprints())); }
protected override DateTime PerformAs(IPerformer actor) { var startDateText = actor.Perform(TheText.Of(SprintList.SprintStartDate(sprintTitle))); return(DateTime.Parse(startDateText)); }
public Boolean SetSprintNumber(SprintList sprintList) { return(true); }
public Boolean SetSprintDuration(SprintList sprintList) { return(true); }