public GetAchievementSteps(
            TestHost testHost,
            AchievementDataHelper achievementDataHelper,
            MaturityCategoryDataHelper maturityCategoryDataHelper,
            MaturityLevelDataHelper maturityLevelDataHelper,
            UserDataHelper userDataHelper
            )
        {
            this.testHost = testHost;
            this.achievementDataHelper      = achievementDataHelper;
            this.maturityCategoryDataHelper = maturityCategoryDataHelper;
            this.maturityLevelDataHelper    = maturityLevelDataHelper;
            this.userDataHelper             = userDataHelper;

            /*
             *  Conversion from/to Unix timestamp is necessary here to mimic the
             *  same operation the server does when inserting into the DB, resulting
             *  in a DateTimeOffset to 3 decimal places after the seconds rather than 6,
             *  so 2020-08-09 16:05:15.7954576+00:00 becomes 2020-08-09 16:05:15.795+00:00
             */
            this.achievementDate = DateTimeOffset.FromUnixTimeMilliseconds
                                   (
                DateTimeOffset.Now
                .Subtract(TimeSpan.FromDays(7))
                .ToUniversalTime()
                .ToUnixTimeMilliseconds()
                                   );
            this.comment = "I did X, Y and Z to achieve this maturity level.";
        }
 public CreateMaturityLevelSteps(
     TestHost testHost,
     MaturityLevelDataHelper maturityLevelDataHelper,
     MaturityCategoryDataHelper maturityCategoryDataHelper
     )
 {
     this.testHost = testHost;
     this.maturityLevelDataHelper    = maturityLevelDataHelper;
     this.maturityCategoryDataHelper = maturityCategoryDataHelper;
 }
예제 #3
0
 public GetAllMaturityLevelsSteps(
     TestHost testHost,
     MaturityLevelDataHelper maturityLevelDataHelper,
     MaturityCategoryDataHelper maturityCategoryDataHelper
     )
 {
     this.testHost = testHost;
     this.maturityLevelDataHelper    = maturityLevelDataHelper;
     this.maturityCategoryDataHelper = maturityCategoryDataHelper;
     this.beltLevel   = BeltType.White;
     this.description = "Must have attended 3 security conferences.";
 }
예제 #4
0
 public DeleteMaturityLevelSteps(
     TestHost testHost,
     MaturityLevelDataHelper maturityLevelDataHelper,
     MaturityCategoryDataHelper maturityCategoryDataHelper
     )
 {
     this.testHost = testHost;
     this.maturityLevelDataHelper    = maturityLevelDataHelper;
     this.maturityCategoryDataHelper = maturityCategoryDataHelper;
     this.invalidId     = "invalid_id";
     this.nonExistentId = Guid.NewGuid();
 }
 public UpdateMaturityLevelSteps(
     TestHost testHost,
     MaturityLevelDataHelper maturityLevelDataHelper,
     MaturityCategoryDataHelper maturityCategoryDataHelper
     )
 {
     this.testHost = testHost;
     this.maturityLevelDataHelper    = maturityLevelDataHelper;
     this.maturityCategoryDataHelper = maturityCategoryDataHelper;
     this.invalidId          = "Invalid_ID";
     this.nonExistentId      = Guid.NewGuid();
     this.description        = "MaturityLevelDescription";
     this.updatedDescription = "UpdatedMaturityLevelDescription";
 }
예제 #6
0
 public CreateAchievementSteps(
     TestHost testHost,
     AchievementDataHelper achievementDataHelper,
     UserDataHelper userDataHelper,
     MaturityCategoryDataHelper maturityCategoryDataHelper,
     MaturityLevelDataHelper maturityLevelDataHelper
     )
 {
     this.testHost = testHost;
     this.achievementDataHelper      = achievementDataHelper;
     this.userDataHelper             = userDataHelper;
     this.maturityCategoryDataHelper = maturityCategoryDataHelper;
     this.maturityLevelDataHelper    = maturityLevelDataHelper;
 }