public async Task EnsuresNonNullArguments()
            {
                var teams = new TeamsClient(Substitute.For<IApiConnection>());

                await Assert.ThrowsAsync<ArgumentNullException>(() => teams.GetAll(null));
                await Assert.ThrowsAsync<ArgumentNullException>(() => teams.GetAll("orgName", null));
            }
            public async Task EnsuresNonNullArguments()
            {
                var teams = new TeamsClient(Substitute.For <IApiConnection>());

                await Assert.ThrowsAsync <ArgumentNullException>(() => teams.GetAll(null));

                await Assert.ThrowsAsync <ArgumentNullException>(() => teams.GetAll("orgName", null));
            }
Beispiel #3
0
            public void RequestsTheCorrectUrl()
            {
                var connection = Substitute.For <IApiConnection>();
                var client     = new TeamsClient(connection);

                client.GetAll("orgName");

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

                client.GetAll("orgName");

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

                client.GetAll("orgName");

                connection.Received().GetAll <Team>(
                    Arg.Is <Uri>(u => u.ToString() == "orgs/orgName/teams"),
                    null,
                    "application/vnd.github.hellcat-preview+json",
                    Args.ApiOptions);
            }
Beispiel #6
0
            public void EnsuresNonNullArguments()
            {
                var teams = new TeamsClient(Substitute.For <IApiConnection>());

                Assert.Throws <ArgumentNullException>(() => teams.GetAll(null));
            }
            public void EnsuresNonNullArguments()
            {
                var teams = new TeamsClient(Substitute.For<IApiConnection>());

                Assert.Throws<ArgumentNullException>(() => teams.GetAll(null));
            }