コード例 #1
0
        public void AddCatalog(string name, string genus, double price)
        {
            TestCatalog catalog = new TestCatalog(name, genus, price, Guid.NewGuid().ToString());

            catalogs.Add(catalog);

            states.Add(new TestState(catalog, 0));
        }
コード例 #2
0
        public void AddCatalog(string name, string genus, double price, string uuid)
        {
            TestCatalog catalog = new TestCatalog(name, genus, price, uuid);

            catalogs.Add(catalog);

            states.Add(new TestState(catalog, 0));
        }
コード例 #3
0
        public IEvent GetEvent(int position)
        {
            TestUser user = new TestUser("name", "lastName", "niceUuid");

            TestCatalog catalog = new TestCatalog("name", "genus", 2, "catalogsUuid");
            TestState   state   = new TestState(catalog, 11);

            return(new TestBuyEvent(user, state, new DateTime(2021, 01, 01)));
        }
コード例 #4
0
        public void DeleteCatalog(string uuid)
        {
            TestCatalog catalog = (TestCatalog)catalogs.First(c => c.Uuid == uuid);

            catalogs.Remove(catalog);
        }
コード例 #5
0
        public IState GetState(int position)
        {
            TestCatalog catalog = new TestCatalog("name", "genus", 2, "catalogsUuid");

            return(new TestState(catalog, 10));
        }