public void CreateOrUpdateAsyncWithDelegate()
            {
                DiSetup.FileDataServiceTests();
                DiSetup.InitializeFileEndpoints();

                IDataService dataService  = DiHelper.GetService <IDataService>(this.testPath);
                int          numberBefore = dataService.GetAllAsync <ValueObject <string> >("CreateOrUpdateAsyncTest5Action").GetAwaiter().GetResult().Count();

                List <ValueObject <string> > items = new List <ValueObject <string> >();

                items.Add(new ValueObject <string>("TestString1"));
                items.Add(new ValueObject <string>("TestString2"));
                items.Add(new ValueObject <string>("TestString3"));
                items.Add(new ValueObject <string>("TestString4"));

                dataService.CreateOrUpdateAsync <ValueObject <string> >("CreateOrUpdateAsyncTest5Action", items).GetAwaiter().GetResult();

                bool resultAdd    = dataService.CreateOrUpdateAsync <ValueObject <string> >("CreateOrUpdateAsyncTest5Action", new ValueObject <string>("TestString"), x => x.Value.Equals("DunnoYet")).GetAwaiter().GetResult();
                bool resultUpdate = dataService.CreateOrUpdateAsync <ValueObject <string> >("CreateOrUpdateAsyncTest5Action", new ValueObject <string>("TestString"), x => x.Value.Equals("TestString4")).GetAwaiter().GetResult();

                int numberAfterwards = dataService.GetAllAsync <ValueObject <string> >("CreateOrUpdateAsyncTest5Action").GetAwaiter().GetResult().Count();

                Assert.AreEqual(true, resultAdd);
                Assert.AreEqual(true, resultUpdate);
                Assert.AreEqual(5, numberAfterwards - numberBefore);
            }
            public void CreateOrUpdateAsyncAppend()
            {
                DiSetup.FileDataServiceTests();
                DiSetup.InitializeFileEndpoints();

                IDataService dataService = DiHelper.GetService <IDataService>(this.testPath);

                bool result = dataService.CreateOrUpdateAsync <ValueObject <string> >("CreateOrUpdateAsyncTest1Action", new ValueObject <string>("TestString")).GetAwaiter().GetResult();

                Assert.AreEqual(true, result);
            }
            public void DeleteAsync()
            {
                DiSetup.FileDataServiceTests();
                DiSetup.InitializeFileEndpoints();

                IDataService dataService = DiHelper.GetService <IDataService>(this.testPath);

                bool result = dataService.DeleteAsync <ValueObject <string> >("DeleteAsyncTest1Action", "Opel").GetAwaiter().GetResult();

                Assert.AreEqual(true, result);
            }
            public void GetAllAsyncInt()
            {
                DiSetup.FileDataServiceTests();
                DiSetup.InitializeFileEndpoints();

                IDataService dataService = DiHelper.GetService <IDataService>(this.testPath);

                var result = dataService.GetAllAsync <ValueObject <int> >("GetAsyncTest4Action").GetAwaiter().GetResult();

                Assert.IsNotNull(result);
                Assert.AreEqual(123, result.ToList()[0].Value);
            }
            public void CreateOrUpdateAsyncCreateNewWithLists()
            {
                DiSetup.FileDataServiceTests();
                DiSetup.InitializeFileEndpoints();

                IDataService dataService = DiHelper.GetService <IDataService>(this.testPath);
                List <ValueObject <string> > stringList = new List <ValueObject <string> >()
                {
                    new ValueObject <string>("a"), new ValueObject <string>("b"), new ValueObject <string>("c")
                };

                bool result = dataService.CreateOrUpdateAsync <ValueObject <string> >("CreateOrUpdateAsyncTest4Action", stringList).GetAwaiter().GetResult();

                Assert.AreEqual(true, result);
            }
            public void DeleteAsyncWithDelegate()
            {
                DiSetup.FileDataServiceTests();
                DiSetup.InitializeFileEndpoints();

                IDataService dataService           = DiHelper.GetService <IDataService>(this.testPath);
                List <ValueObject <string> > items = new List <ValueObject <string> >();

                items.Add(new ValueObject <string>("TestString1"));
                items.Add(new ValueObject <string>("TestString2"));
                items.Add(new ValueObject <string>("TestString3"));
                items.Add(new ValueObject <string>("TestString4"));

                dataService.CreateOrUpdateAsync <ValueObject <string> >("DeleteAsyncTest2Action", items).GetAwaiter().GetResult();
                bool result = dataService.DeleteAsync <ValueObject <string> >("DeleteAsyncTest2Action", x => x.Value.Equals("TestString3")).GetAwaiter().GetResult();

                Assert.AreEqual(true, result);
            }