Here are the examples of the csharp api class NUnit.Framework.Assert.AreEqual(int, int, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
200 Examples
0
1. Example
Project: BetterCMS
Source File: FilesApiTests.cs
Source File: FilesApiTests.cs
[Test] public void Should_CRUD_File_Successfully() { Events.MediaManager/n ..... /n //View Source file for more details /n }
0
2. Example
Project: BetterCMS
Source File: FoldersApiTests.cs
Source File: FoldersApiTests.cs
[Test] public void Should_CRUD_Folder_Successfully() { // Attach to events. Events.MediaManagerEvents.Instance.MediaFolderCreated += Instance_EntityCreated; Events.MediaManagerEvents.Instance.MediaFolderUpdated += Instance_EntityUpdated; Events.MediaManagerEvents.Instance.MediaFolderDeleted += Instance_EntityDeleted; Events.MediaManagerEvents.Instance.MediaArchived += Instance_MediaArchived; Events.MediaManagerEvents.Instance.MediaUnarchived += Instance_MediaUnarchived; RunApiActionInTransaction((api, session) => Run(session, api.Media.Folders.Post, api.Media.Folder.Get, api.Media.Folder.Put, api.Media.Folder.Delete)); Assert.AreEqual(1, archivedMediaEventCount, "Archived media events fired count"); Assert.AreEqual(1, unarchivedMediaEventCount, "Unarchived media events fired count"); // Detach from events. Events.MediaManagerEvents.Instance.MediaFolderCreated -= Instance_EntityCreated; Events.MediaManagerEvents.Instance.MediaFolderUpdated -= Instance_EntityUpdated; Events.MediaManagerEvents.Instance.MediaFolderDeleted -= Instance_EntityDeleted; Events.MediaManagerEvents.Instance.MediaArchived -= Instance_MediaArchived; Events.MediaManagerEvents.Instance.MediaUnarchived -= Instance_MediaUnarchived; }
0
3. Example
Project: BetterCMS
Source File: ImagesApiTests.cs
Source File: ImagesApiTests.cs
[Test] public void Should_CRUD_Image_Successfully() { Events.MediaManage/n ..... /n //View Source file for more details /n }
0
4. Example
Project: BetterCMS
Source File: PageContentsApiTests.cs
Source File: PageContentsApiTests.cs
protected override void CheckCreateEvent() { CheckEventsCount(1, 0, 0); Assert.AreEqual(contentConfigredCount, setOptions ? 1 : 0, "Content configured events count"); }
0
5. Example
Project: BetterCMS
Source File: PageContentsApiTests.cs
Source File: PageContentsApiTests.cs
protected override void CheckUpdateEvent() { CheckEventsCount(1, updateOrder ? 1 : 0, 0); Assert.AreEqual(contentConfigredCount, setOptions ? 2 : 0, "Content configured events count"); }
0
6. Example
Project: BetterCMS
Source File: PagePropertiesApiTests.cs
Source File: PagePropertiesApiTests.cs
[Test] public void Should_CRUD_PageProperties_WithLayout_Successfully() { /n ..... /n //View Source file for more details /n }
0
7. Example
Project: BetterCMS
Source File: PagePropertiesApiTests.cs
Source File: PagePropertiesApiTests.cs
[Test] public void Should_CRUD_PageProperties_WithMasterPage_Successfully() { /n ..... /n //View Source file for more details /n }
0
8. Example
Project: BetterCMS
Source File: NodesTests.cs
Source File: NodesTests.cs
[Test] public void Should_CRUD_Node_Successfully() { // Attach to events Events.SitemapEvents.Instance.SitemapUpdated += Instance_SitemapUpdated; Events.SitemapEvents.Instance.SitemapNodeCreated += Instance_EntityCreated; Events.SitemapEvents.Instance.SitemapNodeUpdated += Instance_EntityUpdated; Events.SitemapEvents.Instance.SitemapNodeDeleted += Instance_EntityDeleted; RunApiActionInTransaction( (api, session) => { var sitemap = this.TestDataProvider.CreateNewSitemap(); session.SaveOrUpdate(sitemap); session.Flush(); SitemapId = sitemap.Id; Run(session, api.Pages.SitemapNew.Nodes.Post, api.Pages.SitemapNew.Node.Get, api.Pages.SitemapNew.Node.Put, api.Pages.SitemapNew.Node.Delete); }); Assert.AreEqual(3, updatedSitemapEventCount, "Updated sitemap events fired count"); // Detach from events Events.SitemapEvents.Instance.SitemapNodeCreated -= Instance_EntityCreated; Events.SitemapEvents.Instance.SitemapNodeUpdated -= Instance_EntityUpdated; Events.SitemapEvents.Instance.SitemapNodeDeleted -= Instance_EntityDeleted; }
0
9. Example
Project: BetterCMS
Source File: SitemapsTests.cs
Source File: SitemapsTests.cs
[Test] public void Should_CRUD_Sitemap_Successfully() { // Attach to events Events.SitemapEvents.Instance.SitemapCreated += Instance_EntityCreated; Events.SitemapEvents.Instance.SitemapUpdated += Instance_EntityUpdated; Events.SitemapEvents.Instance.SitemapDeleted += Instance_EntityDeleted; Events.SitemapEvents.Instance.SitemapNodeCreated += Instance_SitemapNodeCreated; Events.SitemapEvents.Instance.SitemapNodeDeleted += Instance_SitemapNodeDeleted; RunApiActionInTransaction((api, session) => Run(session, api.Pages.Sitemaps.Post, api.Pages.SitemapNew.Get, api.Pages.SitemapNew.Put, api.Pages.SitemapNew.Delete)); Assert.AreEqual(2, createdNodeEventCount, "Created node events fired count"); Assert.AreEqual(1, deletedNodeEventCount, "Deleted node events fired count"); // Detach from events Events.SitemapEvents.Instance.SitemapCreated -= Instance_EntityCreated; Events.SitemapEvents.Instance.SitemapUpdated -= Instance_EntityUpdated; Events.SitemapEvents.Instance.SitemapDeleted -= Instance_EntityDeleted; Events.SitemapEvents.Instance.SitemapNodeCreated -= Instance_SitemapNodeCreated; Events.SitemapEvents.Instance.SitemapNodeDeleted += Instance_SitemapNodeDeleted; }
0
10. Example
Project: BetterCMS
Source File: NodesApiTests.cs
Source File: NodesApiTests.cs
[Test] public void Should_CRUD_Node_Successfully() { // Attach to events Events.RootEvents.Instance.CategoryTreeUpdated += Instance_SitemapUpdated; Events.RootEvents.Instance.CategoryCreated += Instance_EntityCreated; Events.RootEvents.Instance.CategoryUpdated += Instance_EntityUpdated; Events.RootEvents.Instance.CategoryDeleted += Instance_EntityDeleted; RunApiActionInTransaction( (api, session) => { var categoryTree = this.TestDataProvider.CreateNewCategoryTree(); session.SaveOrUpdate(categoryTree); session.Flush(); CategoryTreeId = categoryTree.Id; Run(session, api.Root.Category.Nodes.Post, api.Root.Category.Node.Get, api.Root.Category.Node.Put, api.Root.Category.Node.Delete); }); Assert.AreEqual(3, updatedCategoryTreeEventCount, "Updated category tree events fired count"); // Detach from events Events.RootEvents.Instance.CategoryCreated -= Instance_EntityCreated; Events.RootEvents.Instance.CategoryUpdated -= Instance_EntityUpdated; Events.RootEvents.Instance.CategoryDeleted -= Instance_EntityDeleted; }
0
11. Example
Project: BetterCMS
Source File: CategoriesApiTests.cs
Source File: CategoriesApiTests.cs
[Test] public void Should_CRUD_CategoryTree_Successfully() { // Attach to events RootEvents.Instance.CategoryTreeCreated += Instance_EntityCreated; RootEvents.Instance.CategoryTreeUpdated += Instance_EntityUpdated; RootEvents.Instance.CategoryTreeDeleted += Instance_EntityDeleted; RootEvents.Instance.CategoryCreated += Instance_CategoryNodeCreated; RootEvents.Instance.CategoryDeleted += Instance_CategoryNodeDeleted; RunApiActionInTransaction((api, session) => Run(session, api.Root.Categories.Post, api.Root.Category.Get, api.Root.Category.Put, api.Root.Category.Delete)); Assert.AreEqual(2, createdNodeEventCount, "Created node events fired count"); Assert.AreEqual(1, deletedNodeEventCount, "Deleted node events fired count"); // Detach from events RootEvents.Instance.CategoryTreeCreated -= Instance_EntityCreated; RootEvents.Instance.CategoryTreeUpdated -= Instance_EntityUpdated; RootEvents.Instance.CategoryTreeDeleted -= Instance_EntityDeleted; RootEvents.Instance.CategoryCreated -= Instance_CategoryNodeCreated; RootEvents.Instance.CategoryDeleted += Instance_CategoryNodeDeleted; }
0
12. Example
Project: BetterCMS
Source File: ApiCrdIntegrationTestBase.cs
Source File: ApiCrdIntegrationTestBase.cs
protected void CheckEventsCount(int expectedCreatedCount, int expectedUpdatedCount, int expectedDeletedCount) { Assert.AreEqual(expectedCreatedCount, createdEventCount, "Created events fired count"); Assert.AreEqual(expectedUpdatedCount, updatedEventCount, "Updated events fired count"); Assert.AreEqual(expectedDeletedCount, deletedEventCount, "Deleted events fired count"); }
0
13. Example
Project: docopt.net
Source File: ValueObjectTests.cs
Source File: ValueObjectTests.cs
[Test] public void AsInt_int_evaluates_to_expected_value() { const int expected = 10; var systemUnderTest = new ValueObject(expected); Assert.AreEqual(expected, systemUnderTest.AsInt, "AsInt should return the value of the wrapped integer."); }
0
14. Example
Project: NPOI
Source File: TestEventRecordFactory.cs
Source File: TestEventRecordFactory.cs
private void CompareData(Record record, String message) { byte[] recData = record.Serialize(); for (int i = 0; i < recData.Length; i++) { Assert.AreEqual(recData[i], data[offset[0]++], message + " data byte " + i); } }
0
15. Example
Project: NPOI
Source File: TestDConRefRecord.cs
Source File: TestDConRefRecord.cs
[Test] public void TestGetSid() { DConRefRecord instance = new DConRefRecord(TestcaseRecordInputStream.Create(81, data1)); short expResult = 81; short result = instance.Sid; Assert.AreEqual(expResult, result, "SID"); }
0
16. Example
Project: NPOI
Source File: TestHSSFWorkbook.cs
Source File: TestHSSFWorkbook.cs
[Test] public void Bug50298() { HSSFWorkbook wb = HSSFTestDataSamples.OpenSampleWorkbook("50298.xls"); assertSheetOrder(wb, "Invoice", "Invoice1", "Digest", "Deferred", "Received"); ISheet sheet = wb.CloneSheet(0); assertSheetOrder(wb, "Invoice", "Invoice1", "Digest", "Deferred", "Received", "Invoice (2)"); wb.SetSheetName(wb.GetSheetIndex(sheet), "copy"); assertSheetOrder(wb, "Invoice", "Invoice1", "Digest", "Deferred", "Received", "copy"); wb.SetSheetOrder("copy", 0); assertSheetOrder(wb, "copy", "Invoice", "Invoice1", "Digest", "Deferred", "Received"); wb.RemoveSheetAt(0); assertSheetOrder(wb, "Invoice", "Invoice1", "Digest", "Deferred", "Received"); // check that the overall workbook serializes with its correct size int expected = wb.Workbook.Size; int written = wb.Workbook.Serialize(0, new byte[expected * 2]); Assert.AreEqual(expected, written, "Did not have the expected size when writing the workbook: written: " + written + ", but expected: " + expected); HSSFWorkbook read = HSSFTestDataSamples.WriteOutAndReadBack(wb); assertSheetOrder(read, "Invoice", "Invoice1", "Digest", "Deferred", "Received"); }
0
17. Example
Project: NPOI
Source File: TestHSSFWorkbook.cs
Source File: TestHSSFWorkbook.cs
[Test] public void Bug50298a() { HSSFWorkbook wb = HSSFTestDataSamples.O/n ..... /n //View Source file for more details /n }
0
18. Example
Project: NPOI
Source File: TestNPOIFSFileSystem.cs
Source File: TestNPOIFSFileSystem.cs
protected static void assertBATCount(NPOIFSFileSystem fs, int expectedBAT, int expectedXBAT) { int foundBAT = 0; int foundXBAT = 0; int sz = (int)(fs.Size / fs.GetBigBlockSize()); for (int i = 0; i < sz; i++) { if (fs.GetNextBlock(i) == POIFSConstants.FAT_SECTOR_BLOCK) { foundBAT++; } if (fs.GetNextBlock(i) == POIFSConstants.DIFAT_SECTOR_BLOCK) { foundXBAT++; } } Assert.AreEqual(expectedBAT, foundBAT, "Wrong number of BATs"); Assert.AreEqual(expectedXBAT, foundXBAT, "Wrong number of XBATs with " + expectedBAT + " BATs"); }
0
19. Example
Project: NPOI
Source File: TestDocumentBlock.cs
Source File: TestDocumentBlock.cs
[Test] public void TestRead() { DocumentBlock[] blocks = new DocumentBlock[4]; MemoryStream input = new MemoryStream(_testdata); for (int j = 0; j < 4; j++) { blocks[j] = new DocumentBlock(input, POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS); } for (int j = 1; j <= 2000; j += 17) { byte[] buffer = new byte[j]; int offset = 0; for (int k = 0; k < (2000 / j); k++) { DocumentBlock.Read(blocks, buffer, offset); for (int n = 0; n < buffer.Length; n++) { Assert.AreEqual(_testdata[(k * j) + n], buffer[n] , "checking byte " + (k * j) + n); } offset += j; } } }
0
20. Example
Project: NPOI
Source File: TestByteField.cs
Source File: TestByteField.cs
[Test] public void TestWriteToBytes() { ByteField field = new ByteField(0); byte[] array = new byte[ 1 ]; for (int j = 0; j < _test_array.Length; j++) { field.Value=_test_array[ j ]; field.WriteToBytes(array); Assert.AreEqual(_test_array[j], array[0], "testing "); } }
0
21. Example
Project: NPOI
Source File: TestIntegerField.cs
Source File: TestIntegerField.cs
[Test] public void TestWriteToBytes() { IntegerField field = new IntegerField(0); byte[] array = new byte[ 4 ]; for (int j = 0; j < _test_array.Length; j++) { field.Value=_test_array[ j ]; field.WriteToBytes(array); int val = array[ 3 ] << 24; val &= unchecked((int)0xFF000000); val += (array[ 2 ] << 16) & 0x00FF0000; val += (array[ 1 ] << 8) & 0x0000FF00; val += (array[ 0 ] & 0x000000FF); Assert.AreEqual(_test_array[j], val, "testing "); } }
0
22. Example
Project: NPOI
Source File: TestShortField.cs
Source File: TestShortField.cs
[Test] public void TestWriteToBytes() { ShortField field = new ShortField(0); byte[] array = new byte[2]; for (int j = 0; j < _test_array.Length; j++) { field.Value = _test_array[j]; field.WriteToBytes(array); short val = (short)(array[1] << 8); val &= unchecked((short)0xFF00); val += (short)(array[0] & 0x00FF); Assert.AreEqual(_test_array[j], val, "testing "); } }
0
23. Example
Project: DotSpatial
Source File: FeedManagerTests.cs
Source File: FeedManagerTests.cs
[TestMethod] public void RemoveFeedThatIsNotInTheListDoesNothing() { FeedManager.ClearFeeds(); Feed feed = new Feed { Name = "sample feed", Url = "https://example.com" }; FeedManager.Add(feed); var before = FeedManager.GetFeeds(); FeedManager.Remove(feed); var after = FeedManager.GetFeeds(); Assert.AreEqual(before.Count(), after.Count(), "The number of feeds should be the same if an attempt is made to remove a feed that is not in the list."); }
0
24. Example
Project: Thought.vCards
Source File: vCardSubpropertyCollectionTests.cs
Source File: vCardSubpropertyCollectionTests.cs
[Test] public void IndexOfAny_NoMatches_EmptyCollection() { vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); int index = subs.IndexOfAny( new string[] { "FIND1", "FIND2", "FIND3" }); Assert.AreEqual( -1, index, "No matches should have been found."); }
0
25. Example
Project: Thought.vCards
Source File: vCardSubpropertyCollectionTests.cs
Source File: vCardSubpropertyCollectionTests.cs
[Test] public void IndexOfAny_NoMatches_PopulatedCollection() { vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); subs.Add("NAME1"); subs.Add("NAME2"); subs.Add("NAME3"); int index = subs.IndexOfAny( new string[] { "FIND1", "FIND2", "FIND3" }); Assert.AreEqual( -1, index, "No matches should have been found."); }
0
26. Example
Project: AssertMessage
Source File: NunitTests.cs
Source File: NunitTests.cs
public void AreEqual_should_have_message_original_message() { var expected = 1; var actual = 2; Assert.AreEqual(expected, actual, "original_message"); }
0
27. Example
Project: imt-wanke-client
Source File: MemoryWriterTests.cs
Source File: MemoryWriterTests.cs
void Verify(byte[] buffer, int startOffset, int count, byte expected) { for (int i = startOffset; i < startOffset + count; i++) Assert.AreEqual(buffer[i], expected, "#" + i); }
0
28. Example
Project: imt-wanke-client
Source File: PeerTests.cs
Source File: PeerTests.cs
[Test] public void CorruptDictionary() { BEncodedList l = new BEncodedList(); BEncodedDictionary d = new BEncodedDictionary(); l.Add(d); IList<Peer> decoded = Peer.Decode(l); Assert.AreEqual(0, decoded.Count, "#1"); }
0
29. Example
Project: imt-wanke-client
Source File: PeerTests.cs
Source File: PeerTests.cs
[Test] public void CorruptString() { IList<Peer> p = Peer.Decode((BEncodedString)"1234"); Assert.AreEqual(0, p.Count, "#1"); byte[] b = new byte[] { 255, 255, 255, 255, 255, 255 }; p = Peer.Decode((BEncodedString)b); Assert.AreEqual(1, p.Count, "#2"); b = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; p = Peer.Decode((BEncodedString)b); Assert.AreEqual(1, p.Count, "#3"); }
0
30. Example
Project: 32feet
Source File: LanguageBaseListTests.cs
Source File: LanguageBaseListTests.cs
[Test] public void TestAllDefinedCharsetMappingRows() { int numberSuccessful, numberFailed; String resultText = LanguageBaseItem.TestAllDefinedEncodingMappingRows(out numberSuccessful, out numberFailed); int successExpected = 16; int failedExpected = 3; #if NETCF successExpected = 10; failedExpected = 9; #endif Assert.AreEqual(successExpected, numberSuccessful, "numberSuccessful"); Assert.AreEqual(failedExpected, numberFailed, "numberFailed"); //-Console.WriteLine(resultText); }
0
31. Example
Project: 32feet
Source File: TestLsnrRfcommPort.cs
Source File: TestLsnrRfcommPort.cs
public void AssertOpenServerNotCalled() { Assert.AreEqual(0, m_OpenServerCalled, "NOT OpenServerCalled"); }
0
32. Example
Project: 32feet
Source File: TestLsnrRfcommPort.cs
Source File: TestLsnrRfcommPort.cs
public void AssertOpenServerCalledAndClear(byte channel) { Assert.AreEqual(1, m_OpenServerCalled, "OpenServerCalled"); //Assert.AreEqual(address, m_ocAddress, "Address"); //Assert.AreEqual(channel, m_ocScn, "Channel"); // m_OpenServerCalled = 0; //... }
0
33. Example
Project: 32feet
Source File: Assertion.cs
Source File: Assertion.cs
static public void AssertEquals(string message, int expected, int actual) { NUnit.Framework.Assert.AreEqual(expected, actual, message); }
0
34. Example
Project: 32feet
Source File: Assertion.cs
Source File: Assertion.cs
static public void AssertEquals(string message, int expected, int actual) { NUnit.Framework.Assert.AreEqual(expected, actual, message); }
0
35. Example
Project: dlr
Source File: ScriptSourceTest.cs
Source File: ScriptSourceTest.cs
[Test] public void Execute_MultipleInvocation() { string singleExp = _codeSnippets[CodeType.SimpleExpressionOnePlusOne]; int expResult = 2; ScriptSource source = _testEng.CreateScriptSourceFromString(singleExp, SourceCodeKind.Expression); int testRuns = 10; object result; for (int i = 0; i < testRuns; i++) { result = source.Execute(_testEng.CreateScope()); Assert.AreEqual(expResult, (int)result, "Test Multiple Calls to Execute"); } }
0
36. Example
Project: dotnetmigrations
Source File: ScriptSplitterTests.cs
Source File: ScriptSplitterTests.cs
[Test] public void CanParseNestedComments() { const string script = @"/* select 1 /* nested comment */ go delete from users -- */"; var scripts = new ScriptSplitter(script); Assert.AreEqual(1, scripts.Count(), "This contains a comment and no scripts."); }
0
37. Example
Project: dotnetmigrations
Source File: ScriptSplitterTests.cs
Source File: ScriptSplitterTests.cs
[Test] public void CanParseSuccessiveGoStatements() { const string script = @"GO GO"; var scripts = new ScriptSplitter(script); Assert.AreEqual(0, scripts.Count(), "Expected no scripts since they would be empty."); }
0
38. Example
Project: dotnetmigrations
Source File: ScriptSplitterTests.cs
Source File: ScriptSplitterTests.cs
[Test] public void SemiColonDoesNotSplitScript() { const string script = "CREATE PROC Blah AS SELECT FOO; SELECT Bar;"; var scripts = new ScriptSplitter(script); Assert.AreEqual(1, scripts.Count(), "Expected no scripts since they would be empty."); }
0
39. Example
Project: keepassrpc
Source File: TestBufferedCharReader.cs
Source File: TestBufferedCharReader.cs
private static void AssertLineCounters(BufferedCharReader reader, int line, int pos) { Assert.AreEqual(line, reader.LineNumber, "LineNumber"); Assert.AreEqual(pos, reader.LinePosition, "LinePosition"); }
0
40. Example
Project: linq2db
Source File: SelectTests.cs
Source File: SelectTests.cs
[Test, DataContextSource(false)] public void MutiplySelect12(string context) { using (var db = GetDataContext(context)) { var q = from grandChild in db.GrandChild from child in db.Child where grandChild.ChildID.HasValue select grandChild; q.ToList(); var selectCount = ((DataConnection)db).LastQuery .Split(' ', '\t', '\n', '\r') .Count(s => s.Equals("select", StringComparison.OrdinalIgnoreCase)); Assert.AreEqual(1, selectCount, "Why do we need \"select from select\"??"); } }
0
41. Example
Project: DReAM
Source File: Split.cs
Source File: Split.cs
[Test] public void Split_can_handle_one_element() { // Arrange var array = new[] { 1 }; // Act var chunks = array.Split(100); // Assert Assert.AreEqual(1, chunks.Count(), "There should only be one chunk"); Assert.AreEqual(1, chunks.First().Count(), "Chunk should only contain one element"); }
0
42. Example
Project: msgpack-cli
Source File: MessagePackObjectDictionaryTest.cs
Source File: MessagePackObjectDictionaryTest.cs
[Test] public void ForEachTest() { var _dictionary = new MessagePackObjectDictionary(); _dictionary.Add( "key1", "value1" ); _dictionary.Add( "key2", "value2" ); _dictionary.Add( "key3", "value3" ); _dictionary.Add( "key4", "value4" ); int i = 0; foreach ( KeyValuePair<MessagePackObject, MessagePackObject> entry in _dictionary ) i++; Assert.AreEqual( 4, i, "fail1: foreach entry failed!" ); i = 0; foreach ( KeyValuePair<MessagePackObject, MessagePackObject> entry in ( ( IEnumerable )_dictionary ) ) i++; Assert.AreEqual( 4, i, "fail2: foreach entry failed!" ); i = 0; foreach ( DictionaryEntry entry in ( ( IDictionary )_dictionary ) ) i++; Assert.AreEqual( 4, i, "fail3: foreach entry failed!" ); }
0
43. Example
Project: n2cms
Source File: EnumerableAssert.cs
Source File: EnumerableAssert.cs
public static void Count(int count, IEnumerable list) { int i = 0; foreach (object o in list) ++i; Assert.AreEqual(count, i, "Expected list count " + count + " but was " + i); }
0
44. Example
Project: nhibernate-core
Source File: TransactionFixtureBase.cs
Source File: TransactionFixtureBase.cs
protected void AssertNoPersons() { using (var s = OpenSession()) using (var t = s.BeginTransaction()) { Assert.AreEqual(0, s.Query<Person>().Count(), "Entities found in database."); t.Commit(); } }
0
45. Example
Project: nhibernate-core
Source File: ObjectAssertion.cs
Source File: ObjectAssertion.cs
public static void AreEqual(DateTime expected, DateTime actual, bool useMilliseconds) { Assert.AreEqual(expected.Year, actual.Year, "Year"); Assert.AreEqual(expected.Month, actual.Month, "Month"); Assert.AreEqual(expected.Day, actual.Day, "Day"); Assert.AreEqual(expected.Hour, actual.Hour, "Hour"); Assert.AreEqual(expected.Minute, actual.Minute, "Minute"); Assert.AreEqual(expected.Second, actual.Second, "Second"); if (useMilliseconds) Assert.AreEqual(expected.Millisecond, actual.Millisecond, "Millisecond"); }
0
46. Example
Project: LinqToExcel
Source File: NamedRange_IntegrationTests.cs
Source File: NamedRange_IntegrationTests.cs
[Test] public void use_sheetData_where_null() { var factory = new ExcelQueryFactory(_excelFileName + "x", new LogManagerFactory()); var companies = from c in factory.NamedRange<Company>("NullCellCompanies") where c.EmployeeCount == null select c; Assert.AreEqual(2, companies.Count(), "Count"); }
0
47. Example
Project: LinqToExcel
Source File: NamedRange_IntegrationTests.cs
Source File: NamedRange_IntegrationTests.cs
[Test] public void use_row_where_null() { var factory = new ExcelQueryFactory(_excelFileName + "x", new LogManagerFactory()); var companies = from c in factory.NamedRange("NullCellCompanies") where c["EmployeeCount"] == null select c; Assert.AreEqual(2, companies.Count(), "Count"); }
0
48. Example
Project: LinqToExcel
Source File: NamedRange_IntegrationTests.cs
Source File: NamedRange_IntegrationTests.cs
[Test] public void use_row_no_header_where_null() { var factory = new ExcelQueryFactory(_excelFileName + "x", new LogManagerFactory()); var companies = from c in factory.NamedRangeNoHeader("NullCellCompanies") where c[2] == null select c; Assert.AreEqual(2, companies.Count(), "Count"); }
0
49. Example
Project: LinqToExcel
Source File: Range_IntegrationTests.cs
Source File: Range_IntegrationTests.cs
[Test] public void use_sheetData_where_null() { var factory = new ExcelQueryFactory(_excelFileName + "x", new LogManagerFactory()); var companies = from c in factory.WorksheetRange<Company>("A1", "D4", "NullCells") where c.EmployeeCount == null select c; Assert.AreEqual(2, companies.Count(), "Count"); }
0
50. Example
Project: LinqToExcel
Source File: Range_IntegrationTests.cs
Source File: Range_IntegrationTests.cs
[Test] public void use_row_where_null() { var factory = new ExcelQueryFactory(_excelFileName + "x", new LogManagerFactory()); var companies = from c in factory.WorksheetRange("A1", "D4", "NullCells") where c["EmployeeCount"] == null select c; Assert.AreEqual(2, companies.Count(), "Count"); }