Пример #1
0
 private WebServerGod()
 {
     ServerGodInstance = new ServerGod();
 }
Пример #2
0
        public void SetUp()
        {
            Purchase1 = new Purchase {
                PurchaseID = 1, InvState = PurchaseState.OPEN, DatabaseKey = "db1", Desription = "Purchase1", Project = new Project {
                    ProjectName = "Project1"
                }, Supplier = new Supplier {
                    Name = "Supplier1"
                }
            };
            Purchase2 = new Purchase {
                PurchaseID = 2, InvState = PurchaseState.CLOSED, DatabaseKey = "db2", Desription = "Purchase2", Project = new Project {
                    ProjectName = "Project2"
                }, Supplier = new Supplier {
                    Name = "Supplier2"
                }
            };
            Purchase3 = new Purchase {
                PurchaseID = 3, InvState = PurchaseState.SENDTOMYOB, DatabaseKey = "db3", Desription = "Purchase3", Project = new Project {
                    ProjectName = "Project3"
                }, Supplier = new Supplier {
                    Name = "Supplier3"
                }
            };
            Purchase4 = new Purchase {
                PurchaseID = 4, InvState = PurchaseState.OPEN, DatabaseKey = "db4", Desription = "Purchase4", Project = new Project {
                    ProjectName = "Project4"
                }, Supplier = new Supplier {
                    Name = "Supplier4"
                }
            };
            Purchase5 = new Purchase {
                PurchaseID = 5, InvState = PurchaseState.SENDTOMYOB, DatabaseKey = "db5", Desription = "Purchase5", Project = new Project {
                    ProjectName = "Project5"
                }, Supplier = new Supplier {
                    Name = "Supplier5"
                }
            };

            Client1 = new Client {
                ConnectionID = "1", DatabaseKey = "db1", Username = "******", Password = "******"
            };
            Client2 = new Client {
                ConnectionID = "2", DatabaseKey = "db2", Username = "******", Password = "******"
            };
            Client3 = new Client {
                ConnectionID = "3", DatabaseKey = "db3", Username = "******", Password = "******"
            };
            Client4 = new Client {
                ConnectionID = "4", DatabaseKey = "db4", Username = "******", Password = "******"
            };
            Client5 = new Client {
                ConnectionID = "5", DatabaseKey = "db5", Username = "******", Password = "******"
            };
            Client6 = new Client {
                ConnectionID = "6", DatabaseKey = "db3", Username = "******", Password = "******"
            };

            MockPurchases = new List <Purchase> {
                Purchase1, Purchase2, Purchase3, Purchase4, Purchase5
            };
            MockRepository = new MockPurchasesRepository(MockPurchases);
            ServerGod      = new ServerGod(MockRepository);
        }