Exemplo n.º 1
0
        public void EncodingTest()
        {
            ContentReplacer_Accessor target = new ContentReplacer_Accessor(); // TODO: Initialize to an appropriate value
            Encoding expected = Encoding.UTF8;                                // TODO: Initialize to an appropriate value
            Encoding actual;

            target.Encoding = expected;
            actual          = target.Encoding;
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 2
0
        public void IndexOfTest()
        {
            ContentReplacer_Accessor target = new ContentReplacer_Accessor(); // TODO: Initialize to an appropriate value

            byte[] content           = null;                                  // TODO: Initialize to an appropriate value
            byte[] bytesToBeSearched = null;                                  // TODO: Initialize to an appropriate value
            int    startIndex        = 0;                                     // TODO: Initialize to an appropriate value
            int    expected          = 0;                                     // TODO: Initialize to an appropriate value
            int    actual;

            actual = target.IndexOf(content, bytesToBeSearched, startIndex);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 3
0
        public void ContentParametersTest()
        {
            ContentReplacer_Accessor target = new ContentReplacer_Accessor(); // TODO: Initialize to an appropriate value
            var param = new Dictionary <string, string>();

            param.Add("<barcode>", "8693332221117");
            param.Add("<name>", "plu1");
            IContentParameters expected = new ContentParameters(); // TODO: Initialize to an appropriate value
            IContentParameters actual;

            target.ContentParameters = expected;
            actual = target.ContentParameters;
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 4
0
        public void IsMatchTest()
        {
            ContentReplacer_Accessor target = new ContentReplacer_Accessor(); // TODO: Initialize to an appropriate value

            byte[] content = null;                                            // TODO: Initialize to an appropriate value
            int    index   = 0;                                               // TODO: Initialize to an appropriate value

            byte[] bytesToBeSearched = null;                                  // TODO: Initialize to an appropriate value
            bool   expected          = false;                                 // TODO: Initialize to an appropriate value
            bool   actual;

            actual = target.IsMatch(content, index, bytesToBeSearched);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 5
0
        public void ReplaceFirstOccuranceTest()
        {
            IFileContentReader fileReader = new Fake_FileContentReader();

            ContentReplacer_Accessor target = new ContentReplacer_Accessor(); // TODO: Initialize to an appropriate value

            byte[] oldContent  = fileReader.ReadAllAsByte();                  // TODO: Initialize to an appropriate value
            string toBeChanged = "<barcode>";                                 // TODO: Initialize to an appropriate value
            string newValue    = "8695556664448";                             // TODO: Initialize to an appropriate value

            byte[] expected = null;                                           // TODO: Initialize to an appropriate value
            byte[] actual;
            actual = target.ReplaceFirstOccurance(oldContent, toBeChanged, newValue);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }