示例#1
0
        public async Task CREATE_EliAllPointsTestUser()
        {
            DataFactory = ConfigurationHelper.SetPlatform(TenantsEnum.AllPoints);

            string identifier = "elibr-1234";
            var    testUser   = new TestUserAccount
            {
                Email = "*****@*****.**",
                AccountExternalIds = new TestExternalIdentifiers
                {
                    AccountMasterExtId = identifier,
                    ContactExtId       = identifier,
                    LoginExtId         = identifier,
                    UserExtId          = identifier
                },
                ContactInformation = new TestContactInformation
                {
                    Email       = "*****@*****.**",
                    CompanyName = "allpoints",
                    FirstName   = "eli",
                    LastName    = "barbarick",
                    PhoneNumber = "1234567890"
                }
            };
            await DataFactory.UserAccounts.CreateUserAccount(testUser);
        }
示例#2
0
        public LiteDBenchmark(ITestDataFactory testDataFactory)
        {
            db = new LiteDatabase($"filename={BenchConfig.TestDbFile}");
            var testCol = db.GetCollection <TestData>();
            var max     = testCol.Count();

            currentId   = max;
            dataFactory = testDataFactory;
        }
示例#3
0
        public CommerceServiceTest()
        {
            _updatedPrice = new ItemPrice
            {
                Buys = new Listing {Quantity = 100, UnitPrice = 125},
                Sells = new Listing {Quantity = 200, UnitPrice = 250}
            };

            _updatedListing = new ItemListing
            {
                Buys = new Listing[] {new Listing {Quantity = 100, UnitPrice = 125}},
                Sells = new Listing[] {new Listing {Quantity = 200, UnitPrice = 250}}
            };

            _tpWrapper = new TradingPostApiWrapperMock(_updatedPrice, _updatedListing);
            _testDataFactory = new TestDataFactory();
        }
示例#4
0
        public KVDBenchmark(ITestDataFactory testDataFactory)
        {
            string dataCatalog = Path.Combine(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "test_data");

            Directory.CreateDirectory(dataCatalog);
            env = new LightningEnvironment(dataCatalog, new EnvironmentConfiguration()
            {
                MapSize = 4294967296
            });
            env.MaxDatabases = 4;
            env.Open();
            using (var tx = env.BeginTransaction())
                using (var db = tx.OpenDatabase("test"))
                {
                    currentId = (int)tx.GetEntriesCount(db);
                }
            dataFactory = testDataFactory;
        }
示例#5
0
 public DataFreefreightforNonContiguous()
 {
     DataFactoryAllPoints = ConfigurationHelper.SetPlatform(TenantsEnum.AllPoints);
     DataFactoryFmp       = ConfigurationHelper.SetPlatform(TenantsEnum.Fmp);
 }
示例#6
0
 public TestDBInitializer(int totalSize, ITestDataFactory testDataFactory)
 {
     this.totalSize = totalSize;
     testFactory    = testDataFactory;
 }
示例#7
0
 public DataProximityMessages()
 {
     DataFactoryAllPoints = ConfigurationHelper.SetPlatform(TenantsEnum.AllPoints);
     DataFactoryFmp       = ConfigurationHelper.SetPlatform(TenantsEnum.Fmp);
 }
示例#8
0
        public async Task CREATE_AllPointsTestUsers()
        {
            DataFactory = ConfigurationHelper.SetPlatform(TenantsEnum.AllPoints);

            TestContactInformation genericContactInfo = new TestContactInformation
            {
                CompanyName = "allpoints company",
                Email       = "*****@*****.**",
                FirstName   = "johnny",
                LastName    = "doe",
                PhoneNumber = "1234567890",
            };

            List <TestUserAccount> allpointsUserAcounts = new List <TestUserAccount>
            {
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    ContactInformation = genericContactInfo,
                    AccountExternalIds = new TestExternalIdentifiers
                    {
                        AccountMasterExtId = "elitest123",
                        ContactExtId       = "elitest123",
                        LoginExtId         = "elitest123",
                        UserExtId          = "elitest123"
                    }
                },
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    ContactInformation = genericContactInfo,
                    AccountExternalIds = new TestExternalIdentifiers
                    {
                        AccountMasterExtId = "test-123",
                        LoginExtId         = "test-123",
                        ContactExtId       = "test-123",
                        UserExtId          = "test-123"
                    }
                },
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    ContactInformation = genericContactInfo,
                    AccountExternalIds = new TestExternalIdentifiers
                    {
                        AccountMasterExtId = "1257-B",
                        LoginExtId         = "1257-B",
                        ContactExtId       = "1257-B",
                        UserExtId          = "1257-B"
                    }
                },
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    ContactInformation = genericContactInfo,
                    AccountExternalIds = new TestExternalIdentifiers
                    {
                        AccountMasterExtId = "1509",
                        ContactExtId       = "contact-1509",
                        LoginExtId         = "login-1509",
                        UserExtId          = "user-1509"
                    }
                },
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    AccountExternalIds = new TestExternalIdentifiers
                    {
                        AccountMasterExtId = "A-1509-2",
                        ContactExtId       = "contact-A-1509-2",
                        LoginExtId         = "login-A-1509-2",
                        UserExtId          = "user-A-1509-2"
                    },
                    ContactInformation = genericContactInfo
                }
            };

            foreach (var user in allpointsUserAcounts)
            {
                await DataFactory.UserAccounts.CreateUserAccount(user);
            }
        }
示例#9
0
        public async Task CREATE_FmpTestUsers()
        {
            DataFactory = ConfigurationHelper.SetPlatform(TenantsEnum.Fmp);

            //generic contact information
            TestContactInformation contactInfo = new TestContactInformation
            {
                CompanyName = "fmp company",
                Email       = "*****@*****.**",
                FirstName   = "johnny",
                LastName    = "doe",
                PhoneNumber = "1234567890"
            };

            List <TestUserAccount> fmpUserAccounts = new List <TestUserAccount>
            {
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    AccountExternalIds = new TestExternalIdentifiers
                    {
                        AccountMasterExtId = "9509",
                        ContactExtId       = "contact-A-1923",
                        LoginExtId         = "login-A-1923",
                        UserExtId          = "user-A-1923"
                    },
                    ContactInformation = contactInfo
                },
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    AccountExternalIds = new TestExternalIdentifiers {
                        AccountMasterExtId = "A-1923",
                        ContactExtId       = "contact-A-1923",
                        LoginExtId         = "login-A-1923",
                        UserExtId          = "user-A-1923"
                    },
                    ContactInformation = contactInfo
                },
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    AccountExternalIds = new TestExternalIdentifiers
                    {
                        AccountMasterExtId = "19411",
                        ContactExtId       = "contact-19411",
                        LoginExtId         = "login-19411",
                        UserExtId          = "user-19411"
                    },
                    ContactInformation = contactInfo
                },
                new TestUserAccount
                {
                    Email = "*****@*****.**",
                    AccountExternalIds = new TestExternalIdentifiers
                    {
                        AccountMasterExtId = "A-1941",
                        ContactExtId       = "contact-A-1941",
                        LoginExtId         = "login-A-1941",
                        UserExtId          = "user-A-1941"
                    },
                    ContactInformation = contactInfo
                }
            };

            foreach (var user in fmpUserAccounts)
            {
                await DataFactory.UserAccounts.CreateUserAccount(user);
            }
        }