예제 #1
0
파일: Tests.cs 프로젝트: cDoru/Amanda
        public static void Should_Verify_Simple_Params()
        {
            dynamic client = new AmandaClient("http://localhost:15534/api");

            Action doNothingForFactor = () => client.DoNothingFor(1, 2.5);

            doNothingForFactor.ShouldThrow <ArgumentException>();
        }
예제 #2
0
파일: Tests.cs 프로젝트: cDoru/Amanda
        public static void Should_Succed_On_Exposed_Methods()
        {
            dynamic client = new AmandaClient("http://localhost:15534/api");

            var actions = new Action[]
            {
                () => client.DoNothing(),
                () => client.DoNothingFor(1),
                () => client.DoNothingForFactor(1.5, 2),
                () => client.GetWastedTime(),
                () => client.GetUsersUsername(new { ID = 1, Username = "******", Password = "******" }),
                () =>
                client.SpliceUsers(new { ID = 1, Username = "******", Password = "******" },
                                   new { ID = 2, Username = "******", Password = "******" })
            };

            foreach (var action in actions)
            {
                action.ShouldNotThrow();
            }
        }