Пример #1
0
        public void ContainsElementsByType()
        {
            var folder = new Folder();
            var item1  = new Item();
            var item2  = new AppVeyorBuild();

            folder.Add(item1);

            Assert.IsFalse(folder.ContainsElements(typeof(AppVeyorBuild)));

            item1.Add(item2);

            Assert.IsTrue(folder.ContainsElements(typeof(AppVeyorBuild)));
        }
Пример #2
0
        public void TestMethod1()
        {
            var appVeyorBuild = new AppVeyorBuild
            {
                AccountName = "AnyStatus",
                ProjectSlug = "api"
            };

            var appVeyorBuildMonitor = new AppVeyorBuildMonitor();

            appVeyorBuildMonitor.Handle(appVeyorBuild);

            Assert.AreNotEqual(State.None, appVeyorBuild.State, "State is None.");
            Assert.AreNotEqual(State.Error, appVeyorBuild.State, "State is Error.");
        }
Пример #3
0
        public async Task AppVeyor_DefaultBranch()
        {
            var appVeyorBuild = new AppVeyorBuild
            {
                AccountName = "AnyStatus",
                ProjectSlug = "api"
            };

            var appVeyorBuildMonitor = new AppVeyorBuildStatus();

            var request = HealthCheckRequest.Create(appVeyorBuild);

            await appVeyorBuildMonitor.Handle(request, CancellationToken.None);

            Assert.AreNotEqual(State.None, appVeyorBuild.State, "State is None.");
            Assert.AreNotEqual(State.Error, appVeyorBuild.State, "State is Error.");
        }