Example #1
0
        public void StrainSeedCompanyTest()
        {
            //ARRANGE
            var seedCompany = new SeedCompany();

            //ACT
            seedCompany = (SeedCompany)StrainController.GetStrainSeedCompany("VUJCJ4TYMG000000000000000");

            //ASSERT
            Assert.IsNotNull(seedCompany);
            Assert.IsTrue(seedCompany.IsValid());

            //OUTPUT
            Console.WriteLine("Name: " + seedCompany.Name);
        }
        public void SingleSeedCompanyRequestTest()
        {
            //ARRANGE
            var seedCpmpany = new SeedCompany();

            //ACT
            seedCpmpany = SeedCompanyController.GetSeedCompany("VUJCJ00000000000000000000");

            //ASSERT
            Assert.IsNotNull(seedCpmpany);
            Assert.IsTrue(seedCpmpany.IsValid());
            Assert.IsTrue(seedCpmpany.Name == "Sensi Seeds");

            //OUTPUT
            Console.WriteLine("SeedCompany: " + seedCpmpany.Name);
        }
        public void SeedCompanyModelTest()
        {
            //ARRANGE
            string json = null;
            string path = "JSON/SeedCompany/SeedCompany.json";


            //ACT
            using (var reader = new StreamReader(path))
            {
                json = reader.ReadToEnd();
            }

            JObject     rawData     = JObject.Parse(json);
            SeedCompany seedCompany = rawData["data"].ToObject <SeedCompany>();


            //ASSERT
            Assert.IsNotNull(json);
            Assert.IsTrue(seedCompany.IsValid());

            //OUTPUT
            Console.WriteLine("Name: " + seedCompany.Name);
        }