public void TestDeleteAll() { // arrange MySqlDataStoreConnection conn = new MySqlDataStoreConnection( "Server=143.110.159.170;Port=3306;Database=donstringham;Uid=donstringham;Pwd=letmein;" ); UserMySqlDataStore fixture = new UserMySqlDataStore(conn); // act fixture.DeleteAll(); var actual = fixture.ReadAll(); // assert Assert.AreEqual(0, actual.Length); }
public void TestReadAllOneRecord() { // arrange MySqlDataStoreConnection conn = new MySqlDataStoreConnection( "Server=143.110.159.170;Port=3306;Database=donstringham;Uid=donstringham;Pwd=letmein;" ); UserMySqlDataStore fixture = new UserMySqlDataStore(conn); UserEntity usr = new UserEntity(); usr.SetId("*****@*****.**"); usr.Name = "Example"; var Expected = typeof(IDomain[]); // act fixture.Create(usr); IDomain[] actual = fixture.ReadAll(); // assert Assert.IsInstanceOfType(actual, Expected); Assert.AreEqual(1, actual.Length); fixture.DeleteAll(); }