Exemple #1
0
        /// <summary>
        /// Prepares the database for <see cref="TestInsertDirectorySoundGet"/> and returns the root directory.
        /// </summary>
        /// <returns></returns>
        protected async Task <SoundboxDirectory> TestInsertDirectorySoundGet_Prepare()
        {
            SoundboxDirectory directoryRoot = new SoundboxDirectory()
            {
                ID   = Guid.NewGuid(),
                Name = "Directory"
            };
            Sound sound = new Sound()
            {
                ID               = Guid.NewGuid(),
                Name             = "Name",
                FileName         = "FileName",
                AbsoluteFileName = "AbsoluteFileName",
                IconUrl          = "IconUrl",
                Tags             = new string[] { "1", "2", "3" },
                MetaData         = new SoundMetaData()
                {
                    Length = 17
                }
            };

            directoryRoot.AddChild(sound);

            //insert
            await Database.Insert(directoryRoot);

            await Database.Insert(sound);

            return(directoryRoot);
        }
Exemple #2
0
        /// <summary>
        /// Prepares the database for <see cref="TestInsertDirectoryDirectoryGet"/> and returns the root directory.
        /// </summary>
        /// <returns></returns>
        protected async Task <SoundboxDirectory> TestInsertDirectoryDirectoryGet_Prepare()
        {
            SoundboxDirectory directoryRoot = new SoundboxDirectory()
            {
                ID   = Guid.NewGuid(),
                Name = "Directory"
            };
            SoundboxDirectory directoryChild = new SoundboxDirectory()
            {
                ID      = Guid.NewGuid(),
                Name    = "Name",
                IconUrl = "IconUrl",
                Tags    = new string[] { "1", "2", "3" }
            };

            directoryRoot.AddChild(directoryChild);

            //insert
            await Database.Insert(directoryRoot);

            await Database.Insert(directoryChild);

            return(directoryRoot);
        }