Пример #1
0
        public async Task <Profile> CreateUser()
        {
            //create user
            KeyStoreProfileService service = new KeyStoreProfileService(new UserInputProviderFixture());

            return(await service.CreateProfile("testPlayer"));
        }
Пример #2
0
        private Profile[] GetUsers()
        {
            var users = new List <Profile>();

            users.Add(KeyStoreProfileService.CreateProfileDirect("user0", "0x779cd70609f0637ecf7449611b261411b281ee912456153d3fbdf762a8b21670"));
            users.Add(KeyStoreProfileService.CreateProfileDirect("user1", "0x63eacbf4503767f13c7ecdbf9b65d702913ce3d711e8386d71b8f2a2053c2b85"));
            return(users.ToArray());
        }
Пример #3
0
        public HoardServiceTests(HoardServiceFixture _hoardFixture)
        {
            hoardFixture = _hoardFixture;
            hoardFixture.InitializeFromConfig();
            HoardService = hoardFixture.HoardService;

            Assert.True(HoardService.Options.BCClientOptions is PlasmaClientOptions);

            playerProfile = KeyStoreProfileService.CreateProfileDirect("keyStore", "0xea93fd741e8508d4f9a5039761496c31b742001e88b88c260c2a47105e329d37");

            gameID = new GameID(BigInteger.Parse("2c3257614189ee907c819a4c92b04c6b9e6e9346051563e780d3c302e67e76b1", System.Globalization.NumberStyles.AllowHexSpecifier));

            //HoardService.Shutdown();
        }
Пример #4
0
        public void TestIdenticon()
        {
            Profile PlayerAccount = KeyStoreProfileService.CreateProfileDirect(
                "TestPlayer",
                "0x2370fd033278c143179d81c5526140625662b8daa446c22ee2d73db3707e620c");

            Hoard.Utils.Identicon identicon = new Hoard.Utils.Identicon(PlayerAccount.ID, 8);
            int w = 64, h = w;

            byte[] iconData = identicon.GetImageDataRGB(w);

            Assert.Equal(66, iconData[0]);
            Assert.Equal(12, iconData[1]);
            Assert.Equal(179, iconData[2]);

            Assert.Equal(208, iconData[10404]);
            Assert.Equal(111, iconData[10405]);
            Assert.Equal(51, iconData[10406]);
        }