Exemplo n.º 1
0
        public void CanSendEarChoregraphy()
        {
            Nabaztag myNabaz = new Nabaztag(ConfigurationManager.AppSettings["SerialNumber"], ConfigurationManager.AppSettings["Token"]);
            ChoregraphyEvent chorEvent = new ChoregraphyEvent("BodySplash chor", 10);

            chorEvent.AddCommand(new ChoregraphyEarCommand(myNabaz.LeftEar.WithAngleAndDirection(60, NabaztagEar.Direction.CouterClockwise), 10));
            chorEvent.AddCommand(new ChoregraphyEarCommand(myNabaz.RightEar.WithAngleAndDirection(60, NabaztagEar.Direction.Clockwise), 10));
            myNabaz.SendEvent(chorEvent);
        }
Exemplo n.º 2
0
        public void CanSendTts()
        {
            Nabaztag myNabaz = new Nabaztag(ConfigurationManager.AppSettings["SerialNumber"], ConfigurationManager.AppSettings["Token"]);
            Core.Events.TextEvent textEvent = new Nabazplayer.Core.Events.TextEvent("ceci est un test");
            textEvent.Voice = Nabazplayer.Core.Events.TextEvent.VoiceType.bruno22k;
            textEvent.Speed = 200;

            VioletApiResponse response =  myNabaz.SendEvent(textEvent);

            Assert.AreEqual(response.Message, "TTSSEND");
        }
Exemplo n.º 3
0
        public void CanSendEarAndLedChor()
        {
            Nabaztag myNabaz = new Nabaztag(ConfigurationManager.AppSettings["SerialNumber"], ConfigurationManager.AppSettings["Token"]);
            ChoregraphyEvent chorEvent = new ChoregraphyEvent("complex chor", 10);
            chorEvent.AddCommand(new ChoregraphyEarCommand(myNabaz.LeftEar.WithAngleAndDirection(80, NabaztagEar.Direction.Clockwise), 10));
            chorEvent.AddCommand(new ChoregraphyEarCommand(myNabaz.RightEar.WithAngleAndDirection(80, NabaztagEar.Direction.CouterClockwise), 20));

            chorEvent.AddCommand(new ChoregraphyLedCommand(myNabaz.HighLed.WithColor(Color.Red), 25));
            chorEvent.AddCommand(new ChoregraphyLedCommand(myNabaz.MiddleLed.WithColor(Color.Blue), 25));
            chorEvent.AddCommand(new ChoregraphyLedCommand(myNabaz.BottomLed.WithColor(Color.DarkBlue), 30));

            chorEvent.AddCommand(new ChoregraphyEarCommand(myNabaz.LeftEar.WithAngleAndDirection(80, NabaztagEar.Direction.CouterClockwise), 40));

            myNabaz.SendEvent(chorEvent);
        }
Exemplo n.º 4
0
        public void CanSendLedChoregraphy()
        {
            Nabaztag myNabaz = new Nabaztag(ConfigurationManager.AppSettings["SerialNumber"], ConfigurationManager.AppSettings["Token"]);
            ChoregraphyEvent chorEvent = new ChoregraphyEvent("BodySplash chor", 10);

            ChoregraphyLedCommand firstCommand = new ChoregraphyLedCommand(myNabaz.MiddleLed.WithColor(Color.Green), 10);
            firstCommand.Time = 1;

            ChoregraphyLedCommand secondCommand = new ChoregraphyLedCommand(myNabaz.LeftLed.WithColor(Color.Red), 10);
            secondCommand.Time = 2;

            chorEvent.AddCommand(firstCommand);
            chorEvent.AddCommand(secondCommand);

            myNabaz.SendEvent(chorEvent);
        }
Exemplo n.º 5
0
 public void CanSendMessage()
 {
     Nabaztag myNabaz = new Nabaztag(ConfigurationManager.AppSettings["SerialNumber"], ConfigurationManager.AppSettings["Token"]);
     VioletApiResponse respone =  myNabaz.SendEvent(new Core.Events.SendMessageEvent(1));
     Assert.AreNotEqual(respone.Message, "MESSAGENOTSEND");
 }
Exemplo n.º 6
0
        public void CanUseMultipleEvents()
        {
            Nabaztag myNabaz = new Nabaztag(ConfigurationManager.AppSettings["SerialNumber"], ConfigurationManager.AppSettings["Token"]);

            NabaztagEventColllection events = new NabaztagEventColllection();
            events.AddEvent(new Core.Events.LeftEarPositionEvent(0));
            events.AddEvent(new Core.Events.RightEarPositionEvent(0));
            events.AddEvent(new TextEvent("allez Julie!!! On se réveille un peu. Et oui je te parle depuis mon pc.", TextEvent.VoiceType.bruno22k));

            myNabaz.SendEvent(events);
        }
Exemplo n.º 7
0
 public void CanSendEvent()
 {
     Nabaztag myNabaz = new Nabaztag(ConfigurationManager.AppSettings["SerialNumber"], ConfigurationManager.AppSettings["Token"]);
     VioletApiResponse response = myNabaz.SendEvent(new MockEvent());
 }