Exemplo n.º 1
0
        public void Disposal()
        {
            var i = new Instance();

            i.Dispose();

            VPNetAssert.ThrowsDisposed(_ => i.Data.GetUserAttributes(0));
            VPNetAssert.ThrowsDisposed(_ => i.Data.ListWorlds());
        }
Exemplo n.º 2
0
        public void Disposal()
        {
            var i = new Instance();

            i.Dispose();

            VPNetAssert.ThrowsDisposed(_ => i.Terrain.QueryTile(0, 0));
            VPNetAssert.ThrowsDisposed(_ => i.Terrain.QueryTile(0, 0, null));
            VPNetAssert.ThrowsDisposed(_ => i.Terrain.SetNode(Samples.TerrainNode, 0, 0));
        }
        public void Disposal()
        {
            var i = new Instance();

            i.Dispose();

            VPNetAssert.ThrowsDisposed(_ => i.Avatars.ClearUrl(0));
            VPNetAssert.ThrowsDisposed(_ => i.Avatars.Click(0));
            VPNetAssert.ThrowsDisposed(_ => i.Avatars.Click(0, Vector3.Zero));
            VPNetAssert.ThrowsDisposed(_ => i.Avatars.SendUrl(0, "", UrlTarget.Browser));
            VPNetAssert.ThrowsDisposed(_ => i.Avatars.Teleport(0, AvatarPosition.GroundZero));
            VPNetAssert.ThrowsDisposed(_ => i.Avatars.Teleport(0, "", AvatarPosition.GroundZero));
            VPNetAssert.ThrowsDisposed(_ => i.Avatars.Teleport(0, Vector3.Zero, 0, 0));
            VPNetAssert.ThrowsDisposed(_ => i.Avatars.Teleport(0, "", Vector3.Zero, 0, 0));
        }
Exemplo n.º 4
0
        public void Disposal()
        {
            var i = new Instance();

            i.Dispose();

            VPNetAssert.ThrowsDisposed(_ => i.Dispose());
            VPNetAssert.ThrowsDisposed(_ => i.ConsoleBroadcast("", "", ""));
            VPNetAssert.ThrowsDisposed(_ => i.ConsoleMessage(0, "", "", ""));
            VPNetAssert.ThrowsDisposed(_ => i.Enter(""));
            VPNetAssert.ThrowsDisposed(_ => i.Leave());
            VPNetAssert.ThrowsDisposed(_ => i.GoTo());
            VPNetAssert.ThrowsDisposed(_ => i.Login("", "", ""));
            VPNetAssert.ThrowsDisposed(_ => i.Pump());
            VPNetAssert.ThrowsDisposed(_ => i.Say(""));
        }
        public void Disposal()
        {
            var i = new Instance();

            i.Dispose();

            VPNetAssert.ThrowsDisposed(_ => i.Property.AddObject(Samples.VPObject));
            VPNetAssert.ThrowsDisposed(_ => i.Property.ChangeObject(Samples.VPObject));
            VPNetAssert.ThrowsDisposed(_ => i.Property.ClickObject(0));
            VPNetAssert.ThrowsDisposed(_ => i.Property.ClickObject(Samples.VPObject));
            VPNetAssert.ThrowsDisposed(_ => i.Property.ClickObject(0, Vector3.Zero));
            VPNetAssert.ThrowsDisposed(_ => i.Property.ClickObject(Samples.VPObject, Vector3.Zero));
            VPNetAssert.ThrowsDisposed(_ => i.Property.CreateObject("vase1.rwx", Vector3.Zero));
            VPNetAssert.ThrowsDisposed(_ => i.Property.CreateObject("vase1.rwx", Vector3.Zero, Rotation.Zero));
            VPNetAssert.ThrowsDisposed(_ => i.Property.DeleteObject(0));
            VPNetAssert.ThrowsDisposed(_ => i.Property.DeleteObject(Samples.VPObject));
            VPNetAssert.ThrowsDisposed(_ => i.Property.QueryCell(0, 0));
        }
Exemplo n.º 6
0
        public void Enter_Exceptions()
        {
            using (var cmdrData = new Instance())
            {
                VPNetAssert.ThrowsReasonCode(ReasonCode.NotInUniverse,
                                             _ => cmdrData.Enter(Settings.World)
                                             );

                cmdrData.TestLogin(Names.Data);

                VPNetAssert.ThrowsReasonCode(ReasonCode.WorldNotFound,
                                             _ => cmdrData.Enter(Strings.World404)
                                             );

                VPNetAssert.ThrowsReasonCode(ReasonCode.StringTooLong,
                                             _ => cmdrData.Enter(Strings.TooLong)
                                             );
            }
        }
Exemplo n.º 7
0
        public void Login_Exceptions()
        {
            using (var cmdrData = new Instance())
            {
                VPNetAssert.ThrowsReasonCode(ReasonCode.ConnectionError,
                                             _ => cmdrData.Login(Uniservers.Invalid, "inv", "???", "a")
                                             );

                VPNetAssert.ThrowsReasonCode(ReasonCode.Timeout,
                                             _ => cmdrData.Login(Uniservers.Timeout, "inv", "???", "a")
                                             );

                VPNetAssert.ThrowsReasonCode(ReasonCode.InvalidLogin,
                                             _ => cmdrData.Login(Settings.Username, "", "bot")
                                             );

                VPNetAssert.ThrowsReasonCode(ReasonCode.StringTooLong,
                                             _ => cmdrData.Login(Settings.Username, Settings.Password, Strings.TooLong)
                                             );
            }
        }
Exemplo n.º 8
0
 public void Goto_Exceptions()
 {
     using (var cmdrData = new Instance().TestLogin(Names.Data))
         VPNetAssert.ThrowsReasonCode(ReasonCode.NotInWorld, _ => cmdrData.GoTo());
 }