예제 #1
0
        //Pending
        //[TestMethod]
        public void MongoHelper_UpdateProductDetails_IntegrationTest_ArthurClive()
        {
            //Arrange
            var productData  = BsonSerializer.Deserialize <Product>(MongoHelper.CheckForDatas("ProductSKU", "All-Art-Bangalore-Black-", null, null, "UnitTestDB", "Product"));
            var objectId     = productData.Id;
            var updateDesign = "Calcutta";
            var updateSKU    = "All-Art-Calcutta-Black-";

            //Act
            var result = MongoHelper.UpdateProductDetails(objectId, updateDesign, "ProductDesign", updateSKU).Result as bool?;

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(result, true);
        }
예제 #2
0
        //[TestMethod]
        public void MongoHelper_CheckForDatas_IntegrationTest_ArthurClive()
        {
            //Arrange
            //UnitTestHelper.InsertData_SampleCategory();
            var dbName         = "UnitTestDB";
            var collectionName = "Category";

            //Act
            var result = BsonSerializer.Deserialize <Category>(MongoHelper.CheckForDatas("ProductFor", "Men", "ProductType", "Tshirt", dbName, collectionName)) as Category;

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(result.ProductFor, "Men");
            Assert.AreEqual(result.ProductType, "Tshirt");
        }