Пример #1
0
            public void RequestsTheCorrectUrl()
            {
                var connection = Substitute.For<IApiConnection>();
                var client = new TeamsClient(connection);

                client.GetAllTeams("orgName");

                connection.Received().GetAll<Team>(Arg.Is<Uri>(u => u.ToString() == "orgs/orgName/teams"));
            }
Пример #2
0
            public void RequestsTheCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new TeamsClient(connection);

                client.GetAllTeams("orgName");

                connection.Received().GetAll <Team>(Arg.Is <Uri>(u => u.ToString() == "orgs/orgName/teams"));
            }
Пример #3
0
            public async Task EnsuresNonNullArguments()
            {
                var teams = new TeamsClient(Substitute.For<IApiConnection>());

                AssertEx.Throws<ArgumentNullException>(async () => await teams.GetAllTeams(null));
            }
Пример #4
0
            public void EnsuresNonNullArguments()
            {
                var teams = new TeamsClient(Substitute.For <IApiConnection>());

                Assert.Throws <ArgumentNullException>(() => teams.GetAllTeams(null));
            }
Пример #5
0
            public void EnsuresNonNullArguments()
            {
                var teams = new TeamsClient(Substitute.For<IApiConnection>());

                Assert.Throws<ArgumentNullException>(() => teams.GetAllTeams(null));
            }
Пример #6
0
            public async Task EnsuresNonNullArguments()
            {
                var teams = new TeamsClient(Substitute.For <IApiConnection>());

                AssertEx.Throws <ArgumentNullException>(async() => await teams.GetAllTeams(null));
            }