Exemplo n.º 1
0
        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));
        }
Exemplo n.º 3
0
        public void GivenYoussefHasOpenedTheSprintListingPage()
        {
            var youssef = cast.Get <Youssef>();

            stage.ShineTheSpotlightOn(youssef);
            Given(youssef).WasAbleTo(OpenTheirBrowserOn.ThePage(SprintList.ForOpenSprints()));
        }
Exemplo n.º 4
0
        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();
            }
        }
Exemplo n.º 5
0
 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());
 }
Exemplo n.º 6
0
        public void WhenTheyOpenTheSprintListingPage()
        {
            var theActor = stage.GetTheActorInTheSpotlight();

            When(theActor).AttemptsTo(OpenTheirBrowserOn.ThePage(SprintList.ForOpenSprints()));
        }
Exemplo n.º 7
0
        protected override DateTime PerformAs(IPerformer actor)
        {
            var startDateText = actor.Perform(TheText.Of(SprintList.SprintStartDate(sprintTitle)));

            return(DateTime.Parse(startDateText));
        }
Exemplo n.º 8
0
 public Boolean SetSprintNumber(SprintList sprintList)
 {
     return(true);
 }
Exemplo n.º 9
0
 public Boolean SetSprintDuration(SprintList sprintList)
 {
     return(true);
 }