Beispiel #1
0
        public void ExcludesNullDates()
        {
            PersonSetting personSetting = new PersonSetting {
                RawName = "currentUser"
            };
            List <BuildStatus> builds = new List <BuildStatus>
            {
                new BuildStatus {
                    RequestedBy = "currentUser", StartedTime = null
                },
            };
            var max = MaxBuildsInOneDay.GetMaxBuildsInOneDay(personSetting, builds);

            Assert.AreEqual(0, max);
        }
Beispiel #2
0
        public void OneBuildEachDay_MaxIsOne()
        {
            PersonSetting personSetting = new PersonSetting {
                RawName = "currentUser"
            };
            List <BuildStatus> builds = new List <BuildStatus>
            {
                new BuildStatus {
                    RequestedBy = "currentUser", StartedTime = new DateTime(2010, 1, 1, 1, 1, 1)
                },
                new BuildStatus {
                    RequestedBy = "currentUser", StartedTime = new DateTime(2010, 1, 2, 1, 1, 1)
                },
            };
            var max = MaxBuildsInOneDay.GetMaxBuildsInOneDay(personSetting, builds);

            Assert.AreEqual(1, max);
        }