Esempio n. 1
0
 public MolePushServerRecieverTests(PushServerFixture fixture)
 {
     Sender1F           = fixture.Sender1;
     Sender2F           = fixture.Sender2;
     ListnerF           = fixture.Listner;
     UserFormTuplFrodo1 = fixture.UserFormTuplFrodo1;
     UserFormTuplFrodo2 = fixture.UserFormTuplFrodo2;
 }
Esempio n. 2
0
        public PushServerFixture()
        {
            Listner = new PushServerListner();
            while (Listner.CryptoFactories == null || Listner.PossibleCrypto == null)
            {
            }
            Sender1 = new MolePushServerSender(Listner.CryptoFactories, Listner.PossibleCrypto);
            Sender2 = new MolePushServerSender(Listner.CryptoFactories, Listner.PossibleCrypto);
            var random = new Random();

            UserFormTuplFrodo1 = CreateForm(random: random, login: "******", ip: Listner.EndPoint.Address,
                                            listenPorts: true);
            UserFormTuplFrodo2 = CreateForm(random: random, login: "******", ip: Listner.EndPoint.Address,
                                            listenPorts: true);
            using (UserFormContext bdContext = new UserFormContext())
            {
                var users = bdContext.Users.ToArray();
                bdContext.RemoveRange(users);
                bdContext.SaveChanges();
            }

            PrepareProtoBufSerrializer();
        }