コード例 #1
0
        public void TestGetAgentGroupReturnsEmpty()
        {
            var agent1 = new IoTEdgeAgent(
                1001,
                "name1",
                "version1",
                VstsAgentStatus.Online,
                true,
                new HashSet <AgentCapability>()
            {
                new AgentCapability("Agent.OS", "Linux")
            },
                new HashSet <AgentCapability>()
            {
                new AgentCapability("run-long-haul", "true")
            });

            Assert.AreEqual(string.Empty, agent1.GetAgentGroup());
        }
コード例 #2
0
        public void TestGetAgentGroupSuccess()
        {
            var agent1 = new IoTEdgeAgent(
                1001,
                "name1",
                "version1",
                VstsAgentStatus.Online,
                true,
                new HashSet <AgentCapability>()
            {
                new AgentCapability("Agent.OS", "Linux")
            },
                new HashSet <AgentCapability>()
            {
                new AgentCapability("run-long-haul", "true"),
                new AgentCapability("agent-group", "2")
            });

            Assert.AreEqual("2", agent1.GetAgentGroup());
        }